{"action":"opened","issue":{"url":"https://api.github.com/repos/clMathLibraries/clBLAS/issues/165","labels_url":"https://api.github.com/repos/clMathLibraries/clBLAS/issues/165/labels{/name}","comments_url":"https://api.github.com/repos/clMathLibraries/clBLAS/issues/165/comments","events_url":"https://api.github.com/repos/clMathLibraries/clBLAS/issues/165/events","html_url":"https://github.com/clMathLibraries/clBLAS/issues/165","id":113226699,"number":165,"title":"Autogemm kernels are global, rather than per-context","user":{"login":"hughperkins","id":123560,"avatar_url":"https://avatars.githubusercontent.com/u/123560?v=3","gravatar_id":"","url":"https://api.github.com/users/hughperkins","html_url":"https://github.com/hughperkins","followers_url":"https://api.github.com/users/hughperkins/followers","following_url":"https://api.github.com/users/hughperkins/following{/other_user}","gists_url":"https://api.github.com/users/hughperkins/gists{/gist_id}","starred_url":"https://api.github.com/users/hughperkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hughperkins/subscriptions","organizations_url":"https://api.github.com/users/hughperkins/orgs","repos_url":"https://api.github.com/users/hughperkins/repos","events_url":"https://api.github.com/users/hughperkins/events{/privacy}","received_events_url":"https://api.github.com/users/hughperkins/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-25T13:51:41Z","updated_at":"2015-10-25T13:51:41Z","closed_at":null,"body":"Autogemm kernels are global, rather than per-context.\r\n\r\nYou can see this eg in `build/include/AutoGemmIncludes/AutoGemmClKernels.cpp`\r\n\r\nI reckon this means that if you create two contexts, eg for two different GPUs, and run GEMM on each, then the program will seg-fault.\r\n\r\nOf course, you can work around this by using eg mpi: one process per GPU, but that has its own issues, eg IPC overhead.  Given that it shouldnt be hard to make the global variables per-context, I reckon making the kernels and so on per-context is the correct solution to this.\r\n"}}