{"action":"created","comment":{"url":"https://api.github.com/repos/Theano/Theano/pulls/comments/41331867","id":41331867,"diff_hunk":"@@ -1363,27 +1394,30 @@ def local_avg_pool_dnn_grad_stride(node):\n @register_opt('cudnn')\n @local_optimizer([GpuSoftmax])\n def local_softmax_dnn(node):\n-    if not dnn_available():\n-        return\n     if isinstance(node.op, GpuSoftmax):\n+        if not dnn_available(node.outputs[0].type.context_name):\n+            return\n         ins = node.inputs[0].dimshuffle(0, 1, 'x', 'x')\n         ins = gpu_contiguous(ins)\n         out = GpuDnnSoftmax('accurate', 'channel')(ins)\n-        out = as_gpuarray_variable(out.dimshuffle(0, 1))\n+        out = as_gpuarray_variable(out.dimshuffle(0, 1), out.type.context_name)\n         return [out]\n \n \n @register_opt('cudnn')\n @local_optimizer([GpuElemwise])\n def local_log_softmax_dnn(node):\n-    if not dnn_available() or version() < 3000:\n-        # No log-softmax before cudnn v3\n-        return\n+    # This looks for GpuDnnSoftmax so we know that we have cudnn.\n     if (isinstance(node.op, GpuElemwise) and\n             isinstance(node.op.scalar_op, Log) and\n             node.inputs[0].owner and\n             isinstance(node.inputs[0].owner.op, GpuDnnSoftmax) and\n             len(node.inputs[0].clients) == 1):\n+        # Don't move this call to version outside the condition, it\n+        # needs to be here.","path":"theano/sandbox/gpuarray/dnn.py","position":383,"original_position":383,"commit_id":"95580db62db6715ce762f4b900d3d5c316885273","original_commit_id":"95580db62db6715ce762f4b900d3d5c316885273","user":{"login":"abergeron","id":1002504,"avatar_url":"https://avatars.githubusercontent.com/u/1002504?v=3","gravatar_id":"","url":"https://api.github.com/users/abergeron","html_url":"https://github.com/abergeron","followers_url":"https://api.github.com/users/abergeron/followers","following_url":"https://api.github.com/users/abergeron/following{/other_user}","gists_url":"https://api.github.com/users/abergeron/gists{/gist_id}","starred_url":"https://api.github.com/users/abergeron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abergeron/subscriptions","organizations_url":"https://api.github.com/users/abergeron/orgs","repos_url":"https://api.github.com/users/abergeron/repos","events_url":"https://api.github.com/users/abergeron/events{/privacy}","received_events_url":"https://api.github.com/users/abergeron/received_events","type":"User","site_admin":false},"body":"Because you need to have called dnn_available() at least once before calling version().","created_at":"2015-10-06T22:38:06Z","updated_at":"2015-10-06T22:38:06Z","html_url":"https://github.com/Theano/Theano/pull/3482#discussion_r41331867","pull_request_url":"https://api.github.com/repos/Theano/Theano/pulls/3482","_links":{"self":{"href":"https://api.github.com/repos/Theano/Theano/pulls/comments/41331867"},"html":{"href":"https://github.com/Theano/Theano/pull/3482#discussion_r41331867"},"pull_request":{"href":"https://api.github.com/repos/Theano/Theano/pulls/3482"}}},"pull_request":{"url":"https://api.github.com/repos/Theano/Theano/pulls/3482","id":46648414,"html_url":"https://github.com/Theano/Theano/pull/3482","diff_url":"https://github.com/Theano/Theano/pull/3482.diff","patch_url":"https://github.com/Theano/Theano/pull/3482.patch","issue_url":"https://api.github.com/repos/Theano/Theano/issues/3482","number":3482,"state":"open","locked":false,"title":"Multi-gpu support","user":{"login":"abergeron","id":1002504,"avatar_url":"https://avatars.githubusercontent.com/u/1002504?v=3","gravatar_id":"","url":"https://api.github.com/users/abergeron","html_url":"https://github.com/abergeron","followers_url":"https://api.github.com/users/abergeron/followers","following_url":"https://api.github.com/users/abergeron/following{/other_user}","gists_url":"https://api.github.com/users/abergeron/gists{/gist_id}","starred_url":"https://api.github.com/users/abergeron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abergeron/subscriptions","organizations_url":"https://api.github.com/users/abergeron/orgs","repos_url":"https://api.github.com/users/abergeron/repos","events_url":"https://api.github.com/users/abergeron/events{/privacy}","received_events_url":"https://api.github.com/users/abergeron/received_events","type":"User","site_admin":false},"body":"This adds support for multi-gpu in gpuarray.\r\n\r\nTo the best of my knowledge it passes all tests and works correctly.","created_at":"2015-10-02T15:30:23Z","updated_at":"2015-10-06T22:38:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"86cd5039d241ce0bfe3a92d6937b2da21836a5ab","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Theano/Theano/pulls/3482/commits","review_comments_url":"https://api.github.com/repos/Theano/Theano/pulls/3482/comments","review_comment_url":"https://api.github.com/repos/Theano/Theano/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Theano/Theano/issues/3482/comments","statuses_url":"https://api.github.com/repos/Theano/Theano/statuses/95580db62db6715ce762f4b900d3d5c316885273","head":{"label":"abergeron:multi_gpu_new2","ref":"multi_gpu_new2","sha":"95580db62db6715ce762f4b900d3d5c316885273","user":{"login":"abergeron","id":1002504,"avatar_url":"https://avatars.githubusercontent.com/u/1002504?v=3","gravatar_id":"","url":"https://api.github.com/users/abergeron","html_url":"https://github.com/abergeron","followers_url":"https://api.github.com/users/abergeron/followers","following_url":"https://api.github.com/users/abergeron/following{/other_user}","gists_url":"https://api.github.com/users/abergeron/gists{/gist_id}","starred_url":"https://api.github.com/users/abergeron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abergeron/subscriptions","organizations_url":"https://api.github.com/users/abergeron/orgs","repos_url":"https://api.github.com/users/abergeron/repos","events_url":"https://api.github.com/users/abergeron/events{/privacy}","received_events_url":"https://api.github.com/users/abergeron/received_events","type":"User","site_admin":false},"repo":{"id":2264121,"name":"Theano","full_name":"abergeron/Theano","owner":{"login":"abergeron","id":1002504,"avatar_url":"https://avatars.githubusercontent.com/u/1002504?v=3","gravatar_id":"","url":"https://api.github.com/users/abergeron","html_url":"https://github.com/abergeron","followers_url":"https://api.github.com/users/abergeron/followers","following_url":"https://api.github.com/users/abergeron/following{/other_user}","gists_url":"https://api.github.com/users/abergeron/gists{/gist_id}","starred_url":"https://api.github.com/users/abergeron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abergeron/subscriptions","organizations_url":"https://api.github.com/users/abergeron/orgs","repos_url":"https://api.github.com/users/abergeron/repos","events_url":"https://api.github.com/users/abergeron/events{/privacy}","received_events_url":"https://api.github.com/users/abergeron/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abergeron/Theano","description":"Optimizing GPU-meta-programming code generating array oriented optimizing math compiler in Python","fork":true,"url":"https://api.github.com/repos/abergeron/Theano","forks_url":"https://api.github.com/repos/abergeron/Theano/forks","keys_url":"https://api.github.com/repos/abergeron/Theano/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abergeron/Theano/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abergeron/Theano/teams","hooks_url":"https://api.github.com/repos/abergeron/Theano/hooks","issue_events_url":"https://api.github.com/repos/abergeron/Theano/issues/events{/number}","events_url":"https://api.github.com/repos/abergeron/Theano/events","assignees_url":"https://api.github.com/repos/abergeron/Theano/assignees{/user}","branches_url":"https://api.github.com/repos/abergeron/Theano/branches{/branch}","tags_url":"https://api.github.com/repos/abergeron/Theano/tags","blobs_url":"https://api.github.com/repos/abergeron/Theano/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abergeron/Theano/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abergeron/Theano/git/refs{/sha}","trees_url":"https://api.github.com/repos/abergeron/Theano/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abergeron/Theano/statuses/{sha}","languages_url":"https://api.github.com/repos/abergeron/Theano/languages","stargazers_url":"https://api.github.com/repos/abergeron/Theano/stargazers","contributors_url":"https://api.github.com/repos/abergeron/Theano/contributors","subscribers_url":"https://api.github.com/repos/abergeron/Theano/subscribers","subscription_url":"https://api.github.com/repos/abergeron/Theano/subscription","commits_url":"https://api.github.com/repos/abergeron/Theano/commits{/sha}","git_commits_url":"https://api.github.com/repos/abergeron/Theano/git/commits{/sha}","comments_url":"https://api.github.com/repos/abergeron/Theano/comments{/number}","issue_comment_url":"https://api.github.com/repos/abergeron/Theano/issues/comments{/number}","contents_url":"https://api.github.com/repos/abergeron/Theano/contents/{+path}","compare_url":"https://api.github.com/repos/abergeron/Theano/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abergeron/Theano/merges","archive_url":"https://api.github.com/repos/abergeron/Theano/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abergeron/Theano/downloads","issues_url":"https://api.github.com/repos/abergeron/Theano/issues{/number}","pulls_url":"https://api.github.com/repos/abergeron/Theano/pulls{/number}","milestones_url":"https://api.github.com/repos/abergeron/Theano/milestones{/number}","notifications_url":"https://api.github.com/repos/abergeron/Theano/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abergeron/Theano/labels{/name}","releases_url":"https://api.github.com/repos/abergeron/Theano/releases{/id}","created_at":"2011-08-24T20:28:59Z","updated_at":"2015-05-08T20:34:01Z","pushed_at":"2015-10-06T15:23:48Z","git_url":"git://github.com/abergeron/Theano.git","ssh_url":"git@github.com:abergeron/Theano.git","clone_url":"https://github.com/abergeron/Theano.git","svn_url":"https://github.com/abergeron/Theano","homepage":"http://www.deeplearning.net/software/theano","size":46561,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"Theano:master","ref":"master","sha":"c4f1ede234b98be838f3c47f9654b6938dbc0da3","user":{"login":"Theano","id":970517,"avatar_url":"https://avatars.githubusercontent.com/u/970517?v=3","gravatar_id":"","url":"https://api.github.com/users/Theano","html_url":"https://github.com/Theano","followers_url":"https://api.github.com/users/Theano/followers","following_url":"https://api.github.com/users/Theano/following{/other_user}","gists_url":"https://api.github.com/users/Theano/gists{/gist_id}","starred_url":"https://api.github.com/users/Theano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Theano/subscriptions","organizations_url":"https://api.github.com/users/Theano/orgs","repos_url":"https://api.github.com/users/Theano/repos","events_url":"https://api.github.com/users/Theano/events{/privacy}","received_events_url":"https://api.github.com/users/Theano/received_events","type":"Organization","site_admin":false},"repo":{"id":2183193,"name":"Theano","full_name":"Theano/Theano","owner":{"login":"Theano","id":970517,"avatar_url":"https://avatars.githubusercontent.com/u/970517?v=3","gravatar_id":"","url":"https://api.github.com/users/Theano","html_url":"https://github.com/Theano","followers_url":"https://api.github.com/users/Theano/followers","following_url":"https://api.github.com/users/Theano/following{/other_user}","gists_url":"https://api.github.com/users/Theano/gists{/gist_id}","starred_url":"https://api.github.com/users/Theano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Theano/subscriptions","organizations_url":"https://api.github.com/users/Theano/orgs","repos_url":"https://api.github.com/users/Theano/repos","events_url":"https://api.github.com/users/Theano/events{/privacy}","received_events_url":"https://api.github.com/users/Theano/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Theano/Theano","description":"Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. It can use GPUs and perform efficient symbolic differentiation.","fork":false,"url":"https://api.github.com/repos/Theano/Theano","forks_url":"https://api.github.com/repos/Theano/Theano/forks","keys_url":"https://api.github.com/repos/Theano/Theano/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Theano/Theano/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Theano/Theano/teams","hooks_url":"https://api.github.com/repos/Theano/Theano/hooks","issue_events_url":"https://api.github.com/repos/Theano/Theano/issues/events{/number}","events_url":"https://api.github.com/repos/Theano/Theano/events","assignees_url":"https://api.github.com/repos/Theano/Theano/assignees{/user}","branches_url":"https://api.github.com/repos/Theano/Theano/branches{/branch}","tags_url":"https://api.github.com/repos/Theano/Theano/tags","blobs_url":"https://api.github.com/repos/Theano/Theano/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Theano/Theano/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Theano/Theano/git/refs{/sha}","trees_url":"https://api.github.com/repos/Theano/Theano/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Theano/Theano/statuses/{sha}","languages_url":"https://api.github.com/repos/Theano/Theano/languages","stargazers_url":"https://api.github.com/repos/Theano/Theano/stargazers","contributors_url":"https://api.github.com/repos/Theano/Theano/contributors","subscribers_url":"https://api.github.com/repos/Theano/Theano/subscribers","subscription_url":"https://api.github.com/repos/Theano/Theano/subscription","commits_url":"https://api.github.com/repos/Theano/Theano/commits{/sha}","git_commits_url":"https://api.github.com/repos/Theano/Theano/git/commits{/sha}","comments_url":"https://api.github.com/repos/Theano/Theano/comments{/number}","issue_comment_url":"https://api.github.com/repos/Theano/Theano/issues/comments{/number}","contents_url":"https://api.github.com/repos/Theano/Theano/contents/{+path}","compare_url":"https://api.github.com/repos/Theano/Theano/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Theano/Theano/merges","archive_url":"https://api.github.com/repos/Theano/Theano/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Theano/Theano/downloads","issues_url":"https://api.github.com/repos/Theano/Theano/issues{/number}","pulls_url":"https://api.github.com/repos/Theano/Theano/pulls{/number}","milestones_url":"https://api.github.com/repos/Theano/Theano/milestones{/number}","notifications_url":"https://api.github.com/repos/Theano/Theano/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Theano/Theano/labels{/name}","releases_url":"https://api.github.com/repos/Theano/Theano/releases{/id}","created_at":"2011-08-10T03:48:06Z","updated_at":"2015-10-06T15:08:20Z","pushed_at":"2015-10-06T22:19:52Z","git_url":"git://github.com/Theano/Theano.git","ssh_url":"git@github.com:Theano/Theano.git","clone_url":"https://github.com/Theano/Theano.git","svn_url":"https://github.com/Theano/Theano","homepage":"http://www.deeplearning.net/software/theano","size":65511,"stargazers_count":2096,"watchers_count":2096,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":761,"mirror_url":null,"open_issues_count":494,"forks":761,"open_issues":494,"watchers":2096,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Theano/Theano/pulls/3482"},"html":{"href":"https://github.com/Theano/Theano/pull/3482"},"issue":{"href":"https://api.github.com/repos/Theano/Theano/issues/3482"},"comments":{"href":"https://api.github.com/repos/Theano/Theano/issues/3482/comments"},"review_comments":{"href":"https://api.github.com/repos/Theano/Theano/pulls/3482/comments"},"review_comment":{"href":"https://api.github.com/repos/Theano/Theano/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Theano/Theano/pulls/3482/commits"},"statuses":{"href":"https://api.github.com/repos/Theano/Theano/statuses/95580db62db6715ce762f4b900d3d5c316885273"}}}}