{"action":"created","comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/comments/75976784","id":75976784,"diff_hunk":"@@ -33,6 +33,20 @@ struct SelectFunctor<GPUDevice, T> {\n };\n \n template <typename T>\n+struct SelectScalarFunctor<GPUDevice, T> {\n+  void operator()(const GPUDevice& d, typename TTypes<T>::Flat out,\n+                  typename TTypes<bool>::ConstScalar cond,\n+                  typename TTypes<T>::ConstFlat then_flat,\n+                  typename TTypes<T>::ConstFlat else_flat) {\n+    if (cond()){","path":"tensorflow/core/kernels/cwise_op_gpu_select.cu.cc","position":9,"original_position":9,"commit_id":"60290e35ee2b53e7ea07b62bf344d0b93ee5b505","original_commit_id":"60290e35ee2b53e7ea07b62bf344d0b93ee5b505","user":{"login":"vrv","id":463737,"avatar_url":"https://avatars.githubusercontent.com/u/463737?v=3","gravatar_id":"","url":"https://api.github.com/users/vrv","html_url":"https://github.com/vrv","followers_url":"https://api.github.com/users/vrv/followers","following_url":"https://api.github.com/users/vrv/following{/other_user}","gists_url":"https://api.github.com/users/vrv/gists{/gist_id}","starred_url":"https://api.github.com/users/vrv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrv/subscriptions","organizations_url":"https://api.github.com/users/vrv/orgs","repos_url":"https://api.github.com/users/vrv/repos","events_url":"https://api.github.com/users/vrv/events{/privacy}","received_events_url":"https://api.github.com/users/vrv/received_events","type":"User","site_admin":false},"body":"I believe this is evaluating cond() as if it were in CPU memory, but it's likely in GPU memory, so it's segfaulting trying to derefernce GPU memory as CPU memory, I believe.","created_at":"2016-08-24T00:26:59Z","updated_at":"2016-08-24T00:26:59Z","html_url":"https://github.com/tensorflow/tensorflow/pull/3995#discussion_r75976784","pull_request_url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/3995","_links":{"self":{"href":"https://api.github.com/repos/tensorflow/tensorflow/pulls/comments/75976784"},"html":{"href":"https://github.com/tensorflow/tensorflow/pull/3995#discussion_r75976784"},"pull_request":{"href":"https://api.github.com/repos/tensorflow/tensorflow/pulls/3995"}}},"pull_request":{"url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/3995","id":82442997,"html_url":"https://github.com/tensorflow/tensorflow/pull/3995","diff_url":"https://github.com/tensorflow/tensorflow/pull/3995.diff","patch_url":"https://github.com/tensorflow/tensorflow/pull/3995.patch","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/3995","number":3995,"state":"open","locked":false,"title":"extend tf.select to broadcast a scalar condition #3945","user":{"login":"Mistobaan","id":112599,"avatar_url":"https://avatars.githubusercontent.com/u/112599?v=3","gravatar_id":"","url":"https://api.github.com/users/Mistobaan","html_url":"https://github.com/Mistobaan","followers_url":"https://api.github.com/users/Mistobaan/followers","following_url":"https://api.github.com/users/Mistobaan/following{/other_user}","gists_url":"https://api.github.com/users/Mistobaan/gists{/gist_id}","starred_url":"https://api.github.com/users/Mistobaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mistobaan/subscriptions","organizations_url":"https://api.github.com/users/Mistobaan/orgs","repos_url":"https://api.github.com/users/Mistobaan/repos","events_url":"https://api.github.com/users/Mistobaan/events{/privacy}","received_events_url":"https://api.github.com/users/Mistobaan/received_events","type":"User","site_admin":false},"body":"This is WIP. The test fails on my machine for the GPU version. Comments are welcome.","created_at":"2016-08-23T21:18:31Z","updated_at":"2016-08-24T00:26:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7083a1c85e18c61e312239ec3b17ac0eaa6afe6f","assignee":{"login":"keveman","id":229914,"avatar_url":"https://avatars.githubusercontent.com/u/229914?v=3","gravatar_id":"","url":"https://api.github.com/users/keveman","html_url":"https://github.com/keveman","followers_url":"https://api.github.com/users/keveman/followers","following_url":"https://api.github.com/users/keveman/following{/other_user}","gists_url":"https://api.github.com/users/keveman/gists{/gist_id}","starred_url":"https://api.github.com/users/keveman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keveman/subscriptions","organizations_url":"https://api.github.com/users/keveman/orgs","repos_url":"https://api.github.com/users/keveman/repos","events_url":"https://api.github.com/users/keveman/events{/privacy}","received_events_url":"https://api.github.com/users/keveman/received_events","type":"User","site_admin":false},"assignees":[{"login":"keveman","id":229914,"avatar_url":"https://avatars.githubusercontent.com/u/229914?v=3","gravatar_id":"","url":"https://api.github.com/users/keveman","html_url":"https://github.com/keveman","followers_url":"https://api.github.com/users/keveman/followers","following_url":"https://api.github.com/users/keveman/following{/other_user}","gists_url":"https://api.github.com/users/keveman/gists{/gist_id}","starred_url":"https://api.github.com/users/keveman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keveman/subscriptions","organizations_url":"https://api.github.com/users/keveman/orgs","repos_url":"https://api.github.com/users/keveman/repos","events_url":"https://api.github.com/users/keveman/events{/privacy}","received_events_url":"https://api.github.com/users/keveman/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/3995/commits","review_comments_url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/3995/comments","review_comment_url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/3995/comments","statuses_url":"https://api.github.com/repos/tensorflow/tensorflow/statuses/60290e35ee2b53e7ea07b62bf344d0b93ee5b505","head":{"label":"Mistobaan:feature/add-tf-select-scalar-3945","ref":"feature/add-tf-select-scalar-3945","sha":"60290e35ee2b53e7ea07b62bf344d0b93ee5b505","user":{"login":"Mistobaan","id":112599,"avatar_url":"https://avatars.githubusercontent.com/u/112599?v=3","gravatar_id":"","url":"https://api.github.com/users/Mistobaan","html_url":"https://github.com/Mistobaan","followers_url":"https://api.github.com/users/Mistobaan/followers","following_url":"https://api.github.com/users/Mistobaan/following{/other_user}","gists_url":"https://api.github.com/users/Mistobaan/gists{/gist_id}","starred_url":"https://api.github.com/users/Mistobaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mistobaan/subscriptions","organizations_url":"https://api.github.com/users/Mistobaan/orgs","repos_url":"https://api.github.com/users/Mistobaan/repos","events_url":"https://api.github.com/users/Mistobaan/events{/privacy}","received_events_url":"https://api.github.com/users/Mistobaan/received_events","type":"User","site_admin":false},"repo":{"id":48553295,"name":"tensorflow","full_name":"Mistobaan/tensorflow","owner":{"login":"Mistobaan","id":112599,"avatar_url":"https://avatars.githubusercontent.com/u/112599?v=3","gravatar_id":"","url":"https://api.github.com/users/Mistobaan","html_url":"https://github.com/Mistobaan","followers_url":"https://api.github.com/users/Mistobaan/followers","following_url":"https://api.github.com/users/Mistobaan/following{/other_user}","gists_url":"https://api.github.com/users/Mistobaan/gists{/gist_id}","starred_url":"https://api.github.com/users/Mistobaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mistobaan/subscriptions","organizations_url":"https://api.github.com/users/Mistobaan/orgs","repos_url":"https://api.github.com/users/Mistobaan/repos","events_url":"https://api.github.com/users/Mistobaan/events{/privacy}","received_events_url":"https://api.github.com/users/Mistobaan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Mistobaan/tensorflow","description":" Open source software library for numerical computation using data flow graphs.","fork":true,"url":"https://api.github.com/repos/Mistobaan/tensorflow","forks_url":"https://api.github.com/repos/Mistobaan/tensorflow/forks","keys_url":"https://api.github.com/repos/Mistobaan/tensorflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mistobaan/tensorflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mistobaan/tensorflow/teams","hooks_url":"https://api.github.com/repos/Mistobaan/tensorflow/hooks","issue_events_url":"https://api.github.com/repos/Mistobaan/tensorflow/issues/events{/number}","events_url":"https://api.github.com/repos/Mistobaan/tensorflow/events","assignees_url":"https://api.github.com/repos/Mistobaan/tensorflow/assignees{/user}","branches_url":"https://api.github.com/repos/Mistobaan/tensorflow/branches{/branch}","tags_url":"https://api.github.com/repos/Mistobaan/tensorflow/tags","blobs_url":"https://api.github.com/repos/Mistobaan/tensorflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mistobaan/tensorflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mistobaan/tensorflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mistobaan/tensorflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mistobaan/tensorflow/statuses/{sha}","languages_url":"https://api.github.com/repos/Mistobaan/tensorflow/languages","stargazers_url":"https://api.github.com/repos/Mistobaan/tensorflow/stargazers","contributors_url":"https://api.github.com/repos/Mistobaan/tensorflow/contributors","subscribers_url":"https://api.github.com/repos/Mistobaan/tensorflow/subscribers","subscription_url":"https://api.github.com/repos/Mistobaan/tensorflow/subscription","commits_url":"https://api.github.com/repos/Mistobaan/tensorflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mistobaan/tensorflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mistobaan/tensorflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mistobaan/tensorflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mistobaan/tensorflow/contents/{+path}","compare_url":"https://api.github.com/repos/Mistobaan/tensorflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mistobaan/tensorflow/merges","archive_url":"https://api.github.com/repos/Mistobaan/tensorflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mistobaan/tensorflow/downloads","issues_url":"https://api.github.com/repos/Mistobaan/tensorflow/issues{/number}","pulls_url":"https://api.github.com/repos/Mistobaan/tensorflow/pulls{/number}","milestones_url":"https://api.github.com/repos/Mistobaan/tensorflow/milestones{/number}","notifications_url":"https://api.github.com/repos/Mistobaan/tensorflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mistobaan/tensorflow/labels{/name}","releases_url":"https://api.github.com/repos/Mistobaan/tensorflow/releases{/id}","deployments_url":"https://api.github.com/repos/Mistobaan/tensorflow/deployments","created_at":"2015-12-24T18:30:20Z","updated_at":"2016-06-25T01:13:40Z","pushed_at":"2016-08-23T21:35:10Z","git_url":"git://github.com/Mistobaan/tensorflow.git","ssh_url":"git@github.com:Mistobaan/tensorflow.git","clone_url":"https://github.com/Mistobaan/tensorflow.git","svn_url":"https://github.com/Mistobaan/tensorflow","homepage":"http://tensorflow.org","size":54475,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"tensorflow:master","ref":"master","sha":"cc3153a7a0a23533d14ead34db37e4ccd7892079","user":{"login":"tensorflow","id":15658638,"avatar_url":"https://avatars.githubusercontent.com/u/15658638?v=3","gravatar_id":"","url":"https://api.github.com/users/tensorflow","html_url":"https://github.com/tensorflow","followers_url":"https://api.github.com/users/tensorflow/followers","following_url":"https://api.github.com/users/tensorflow/following{/other_user}","gists_url":"https://api.github.com/users/tensorflow/gists{/gist_id}","starred_url":"https://api.github.com/users/tensorflow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tensorflow/subscriptions","organizations_url":"https://api.github.com/users/tensorflow/orgs","repos_url":"https://api.github.com/users/tensorflow/repos","events_url":"https://api.github.com/users/tensorflow/events{/privacy}","received_events_url":"https://api.github.com/users/tensorflow/received_events","type":"Organization","site_admin":false},"repo":{"id":45717250,"name":"tensorflow","full_name":"tensorflow/tensorflow","owner":{"login":"tensorflow","id":15658638,"avatar_url":"https://avatars.githubusercontent.com/u/15658638?v=3","gravatar_id":"","url":"https://api.github.com/users/tensorflow","html_url":"https://github.com/tensorflow","followers_url":"https://api.github.com/users/tensorflow/followers","following_url":"https://api.github.com/users/tensorflow/following{/other_user}","gists_url":"https://api.github.com/users/tensorflow/gists{/gist_id}","starred_url":"https://api.github.com/users/tensorflow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tensorflow/subscriptions","organizations_url":"https://api.github.com/users/tensorflow/orgs","repos_url":"https://api.github.com/users/tensorflow/repos","events_url":"https://api.github.com/users/tensorflow/events{/privacy}","received_events_url":"https://api.github.com/users/tensorflow/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tensorflow/tensorflow","description":"Computation using data flow graphs for scalable machine learning","fork":false,"url":"https://api.github.com/repos/tensorflow/tensorflow","forks_url":"https://api.github.com/repos/tensorflow/tensorflow/forks","keys_url":"https://api.github.com/repos/tensorflow/tensorflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tensorflow/tensorflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tensorflow/tensorflow/teams","hooks_url":"https://api.github.com/repos/tensorflow/tensorflow/hooks","issue_events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/events{/number}","events_url":"https://api.github.com/repos/tensorflow/tensorflow/events","assignees_url":"https://api.github.com/repos/tensorflow/tensorflow/assignees{/user}","branches_url":"https://api.github.com/repos/tensorflow/tensorflow/branches{/branch}","tags_url":"https://api.github.com/repos/tensorflow/tensorflow/tags","blobs_url":"https://api.github.com/repos/tensorflow/tensorflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tensorflow/tensorflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tensorflow/tensorflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/tensorflow/tensorflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tensorflow/tensorflow/statuses/{sha}","languages_url":"https://api.github.com/repos/tensorflow/tensorflow/languages","stargazers_url":"https://api.github.com/repos/tensorflow/tensorflow/stargazers","contributors_url":"https://api.github.com/repos/tensorflow/tensorflow/contributors","subscribers_url":"https://api.github.com/repos/tensorflow/tensorflow/subscribers","subscription_url":"https://api.github.com/repos/tensorflow/tensorflow/subscription","commits_url":"https://api.github.com/repos/tensorflow/tensorflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/tensorflow/tensorflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/tensorflow/tensorflow/contents/{+path}","compare_url":"https://api.github.com/repos/tensorflow/tensorflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tensorflow/tensorflow/merges","archive_url":"https://api.github.com/repos/tensorflow/tensorflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tensorflow/tensorflow/downloads","issues_url":"https://api.github.com/repos/tensorflow/tensorflow/issues{/number}","pulls_url":"https://api.github.com/repos/tensorflow/tensorflow/pulls{/number}","milestones_url":"https://api.github.com/repos/tensorflow/tensorflow/milestones{/number}","notifications_url":"https://api.github.com/repos/tensorflow/tensorflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/labels{/name}","releases_url":"https://api.github.com/repos/tensorflow/tensorflow/releases{/id}","deployments_url":"https://api.github.com/repos/tensorflow/tensorflow/deployments","created_at":"2015-11-07T01:19:20Z","updated_at":"2016-08-24T00:20:37Z","pushed_at":"2016-08-24T00:23:27Z","git_url":"git://github.com/tensorflow/tensorflow.git","ssh_url":"git@github.com:tensorflow/tensorflow.git","clone_url":"https://github.com/tensorflow/tensorflow.git","svn_url":"https://github.com/tensorflow/tensorflow","homepage":"http://tensorflow.org","size":223423,"stargazers_count":30433,"watchers_count":30433,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12804,"mirror_url":null,"open_issues_count":504,"forks":12804,"open_issues":504,"watchers":30433,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tensorflow/tensorflow/pulls/3995"},"html":{"href":"https://github.com/tensorflow/tensorflow/pull/3995"},"issue":{"href":"https://api.github.com/repos/tensorflow/tensorflow/issues/3995"},"comments":{"href":"https://api.github.com/repos/tensorflow/tensorflow/issues/3995/comments"},"review_comments":{"href":"https://api.github.com/repos/tensorflow/tensorflow/pulls/3995/comments"},"review_comment":{"href":"https://api.github.com/repos/tensorflow/tensorflow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tensorflow/tensorflow/pulls/3995/commits"},"statuses":{"href":"https://api.github.com/repos/tensorflow/tensorflow/statuses/60290e35ee2b53e7ea07b62bf344d0b93ee5b505"}}}}
{"actor":{"display_login":"vrv"}}