{"action":"created","comment":{"url":"https://api.github.com/repos/Theano/Theano/pulls/comments/86585592","pull_request_review_id":7239252,"id":86585592,"diff_hunk":"@@ -108,15 +103,25 @@ def _generate_op_string(self, node):\n         inps, outs = self._get_vnames(node)\n         scal_v_ins = [get_scal(i.dtype)() for i in node.inputs]\n \n-        fake_node = self.scalar_op.make_node(*scal_v_ins)\n+        # As float16 isn't a c type and most GPU don't compute on it,\n+        # We convert the computation to float32, and let libgpuarray\n+        # load in float16 and cast to float32 and do the reverse for\n+        # the output.\n+        scalar_op = self.scalar_op\n+        if isinstance(scalar_op, Composite):\n+            s = scalar_op.clone_float32()\n+            scalar_op = s\n+        fake_node = scalar_op.make_node(*scal_v_ins)\n         scal_v_out = fake_node.outputs\n         assert len(scal_v_out) == len(node.outputs)\n \n         kop = fake_node.op.c_code(fake_node, 'elem_scalar',\n                                   inps, outs,\n                                   dict(fail='return;'))\n \n-        assert 'npy_float16' not in kop\n+        if isinstance(scalar_op, Composite):\n+            # Other op like cast should handle float16 themself.\n+            assert 'npy_float16' not in kop","path":"theano/gpuarray/elemwise.py","position":36,"original_position":36,"commit_id":"12c78b339ff7323116fc41ed21c712d16397ba55","original_commit_id":"12c78b339ff7323116fc41ed21c712d16397ba55","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":"We need to handle float16 here, otherwise we will get bad results again.  There is no special handling for it in the scalar ops.\r\n\r\nSo if the assert triggered we can't just patch over it like this.","created_at":"2016-11-04T16:44:37Z","updated_at":"2016-11-04T16:44:37Z","html_url":"https://github.com/Theano/Theano/pull/5181#discussion_r86585592","pull_request_url":"https://api.github.com/repos/Theano/Theano/pulls/5181","_links":{"self":{"href":"https://api.github.com/repos/Theano/Theano/pulls/comments/86585592"},"html":{"href":"https://github.com/Theano/Theano/pull/5181#discussion_r86585592"},"pull_request":{"href":"https://api.github.com/repos/Theano/Theano/pulls/5181"}}},"pull_request":{"url":"https://api.github.com/repos/Theano/Theano/pulls/5181","id":92366195,"html_url":"https://github.com/Theano/Theano/pull/5181","diff_url":"https://github.com/Theano/Theano/pull/5181.diff","patch_url":"https://github.com/Theano/Theano/pull/5181.patch","issue_url":"https://api.github.com/repos/Theano/Theano/issues/5181","number":5181,"state":"open","locked":false,"title":"[REG, CRASH] fix crash related to float16 introduced in gh-5077","user":{"login":"nouiz","id":180987,"avatar_url":"https://avatars.githubusercontent.com/u/180987?v=3","gravatar_id":"","url":"https://api.github.com/users/nouiz","html_url":"https://github.com/nouiz","followers_url":"https://api.github.com/users/nouiz/followers","following_url":"https://api.github.com/users/nouiz/following{/other_user}","gists_url":"https://api.github.com/users/nouiz/gists{/gist_id}","starred_url":"https://api.github.com/users/nouiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nouiz/subscriptions","organizations_url":"https://api.github.com/users/nouiz/orgs","repos_url":"https://api.github.com/users/nouiz/repos","events_url":"https://api.github.com/users/nouiz/events{/privacy}","received_events_url":"https://api.github.com/users/nouiz/received_events","type":"User","site_admin":false},"body":"Fix gh-5077","created_at":"2016-11-04T15:54:39Z","updated_at":"2016-11-04T16:44:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f043798065193e4991e2f9ae775e6738db23df1b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Theano/Theano/pulls/5181/commits","review_comments_url":"https://api.github.com/repos/Theano/Theano/pulls/5181/comments","review_comment_url":"https://api.github.com/repos/Theano/Theano/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Theano/Theano/issues/5181/comments","statuses_url":"https://api.github.com/repos/Theano/Theano/statuses/12c78b339ff7323116fc41ed21c712d16397ba55","head":{"label":"nouiz:fix_gh-5077","ref":"fix_gh-5077","sha":"12c78b339ff7323116fc41ed21c712d16397ba55","user":{"login":"nouiz","id":180987,"avatar_url":"https://avatars.githubusercontent.com/u/180987?v=3","gravatar_id":"","url":"https://api.github.com/users/nouiz","html_url":"https://github.com/nouiz","followers_url":"https://api.github.com/users/nouiz/followers","following_url":"https://api.github.com/users/nouiz/following{/other_user}","gists_url":"https://api.github.com/users/nouiz/gists{/gist_id}","starred_url":"https://api.github.com/users/nouiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nouiz/subscriptions","organizations_url":"https://api.github.com/users/nouiz/orgs","repos_url":"https://api.github.com/users/nouiz/repos","events_url":"https://api.github.com/users/nouiz/events{/privacy}","received_events_url":"https://api.github.com/users/nouiz/received_events","type":"User","site_admin":false},"repo":{"id":2255296,"name":"Theano","full_name":"nouiz/Theano","owner":{"login":"nouiz","id":180987,"avatar_url":"https://avatars.githubusercontent.com/u/180987?v=3","gravatar_id":"","url":"https://api.github.com/users/nouiz","html_url":"https://github.com/nouiz","followers_url":"https://api.github.com/users/nouiz/followers","following_url":"https://api.github.com/users/nouiz/following{/other_user}","gists_url":"https://api.github.com/users/nouiz/gists{/gist_id}","starred_url":"https://api.github.com/users/nouiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nouiz/subscriptions","organizations_url":"https://api.github.com/users/nouiz/orgs","repos_url":"https://api.github.com/users/nouiz/repos","events_url":"https://api.github.com/users/nouiz/events{/privacy}","received_events_url":"https://api.github.com/users/nouiz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nouiz/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":true,"url":"https://api.github.com/repos/nouiz/Theano","forks_url":"https://api.github.com/repos/nouiz/Theano/forks","keys_url":"https://api.github.com/repos/nouiz/Theano/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nouiz/Theano/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nouiz/Theano/teams","hooks_url":"https://api.github.com/repos/nouiz/Theano/hooks","issue_events_url":"https://api.github.com/repos/nouiz/Theano/issues/events{/number}","events_url":"https://api.github.com/repos/nouiz/Theano/events","assignees_url":"https://api.github.com/repos/nouiz/Theano/assignees{/user}","branches_url":"https://api.github.com/repos/nouiz/Theano/branches{/branch}","tags_url":"https://api.github.com/repos/nouiz/Theano/tags","blobs_url":"https://api.github.com/repos/nouiz/Theano/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nouiz/Theano/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nouiz/Theano/git/refs{/sha}","trees_url":"https://api.github.com/repos/nouiz/Theano/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nouiz/Theano/statuses/{sha}","languages_url":"https://api.github.com/repos/nouiz/Theano/languages","stargazers_url":"https://api.github.com/repos/nouiz/Theano/stargazers","contributors_url":"https://api.github.com/repos/nouiz/Theano/contributors","subscribers_url":"https://api.github.com/repos/nouiz/Theano/subscribers","subscription_url":"https://api.github.com/repos/nouiz/Theano/subscription","commits_url":"https://api.github.com/repos/nouiz/Theano/commits{/sha}","git_commits_url":"https://api.github.com/repos/nouiz/Theano/git/commits{/sha}","comments_url":"https://api.github.com/repos/nouiz/Theano/comments{/number}","issue_comment_url":"https://api.github.com/repos/nouiz/Theano/issues/comments{/number}","contents_url":"https://api.github.com/repos/nouiz/Theano/contents/{+path}","compare_url":"https://api.github.com/repos/nouiz/Theano/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nouiz/Theano/merges","archive_url":"https://api.github.com/repos/nouiz/Theano/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nouiz/Theano/downloads","issues_url":"https://api.github.com/repos/nouiz/Theano/issues{/number}","pulls_url":"https://api.github.com/repos/nouiz/Theano/pulls{/number}","milestones_url":"https://api.github.com/repos/nouiz/Theano/milestones{/number}","notifications_url":"https://api.github.com/repos/nouiz/Theano/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nouiz/Theano/labels{/name}","releases_url":"https://api.github.com/repos/nouiz/Theano/releases{/id}","deployments_url":"https://api.github.com/repos/nouiz/Theano/deployments","created_at":"2011-08-23T13:23:37Z","updated_at":"2016-09-09T22:35:49Z","pushed_at":"2016-11-04T16:07:06Z","git_url":"git://github.com/nouiz/Theano.git","ssh_url":"git@github.com:nouiz/Theano.git","clone_url":"https://github.com/nouiz/Theano.git","svn_url":"https://github.com/nouiz/Theano","homepage":"http://www.deeplearning.net/software/theano","size":71576,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":0,"forks":5,"open_issues":0,"watchers":7,"default_branch":"master"}},"base":{"label":"Theano:master","ref":"master","sha":"fe1083e81514550eb7ca5ad79c5cb5f777cf148c","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}","deployments_url":"https://api.github.com/repos/Theano/Theano/deployments","created_at":"2011-08-10T03:48:06Z","updated_at":"2016-11-04T15:22:01Z","pushed_at":"2016-11-04T16:20:47Z","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":80019,"stargazers_count":4903,"watchers_count":4903,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1734,"mirror_url":null,"open_issues_count":725,"forks":1734,"open_issues":725,"watchers":4903,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Theano/Theano/pulls/5181"},"html":{"href":"https://github.com/Theano/Theano/pull/5181"},"issue":{"href":"https://api.github.com/repos/Theano/Theano/issues/5181"},"comments":{"href":"https://api.github.com/repos/Theano/Theano/issues/5181/comments"},"review_comments":{"href":"https://api.github.com/repos/Theano/Theano/pulls/5181/comments"},"review_comment":{"href":"https://api.github.com/repos/Theano/Theano/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Theano/Theano/pulls/5181/commits"},"statuses":{"href":"https://api.github.com/repos/Theano/Theano/statuses/12c78b339ff7323116fc41ed21c712d16397ba55"}}}}
{"actor":{"display_login":"abergeron"}}