{"action":"created","comment":{"url":"https://api.github.com/repos/Theano/Theano/pulls/comments/31579949","id":31579949,"diff_hunk":"@@ -1141,6 +1142,74 @@ def local_gpu_print_op(node):\n     return False\n \n \n+@register_opt()\n+@local_optimizer([PdbBreakpoint])\n+def local_gpu_pdbbreakpoint_op(node):\n+    if isinstance(node.op, PdbBreakpoint):\n+\n+        old_inputs = node.inputs\n+        old_outputs = node.outputs\n+\n+        new_inputs = node.inputs[:1]\n+        input_transfered = []\n+\n+        # Propagate the transfers to gpu through the PdbBreakpoint node\n+        # while leaving the PdbBreakpoint node fully on the host","path":"theano/sandbox/cuda/opt.py","position":24,"original_position":24,"commit_id":"15f30cda5694f80a432f9d4577eb6e55414e9571","original_commit_id":"15f30cda5694f80a432f9d4577eb6e55414e9571","user":{"login":"lamblin","id":178249,"avatar_url":"https://avatars.githubusercontent.com/u/178249?v=3","gravatar_id":"","url":"https://api.github.com/users/lamblin","html_url":"https://github.com/lamblin","followers_url":"https://api.github.com/users/lamblin/followers","following_url":"https://api.github.com/users/lamblin/following{/other_user}","gists_url":"https://api.github.com/users/lamblin/gists{/gist_id}","starred_url":"https://api.github.com/users/lamblin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lamblin/subscriptions","organizations_url":"https://api.github.com/users/lamblin/orgs","repos_url":"https://api.github.com/users/lamblin/repos","events_url":"https://api.github.com/users/lamblin/events{/privacy}","received_events_url":"https://api.github.com/users/lamblin/received_events","type":"User","site_admin":false},"body":"I think that comment should be updated.","created_at":"2015-06-02T22:57:08Z","updated_at":"2015-06-02T22:57:08Z","html_url":"https://github.com/Theano/Theano/pull/2423#discussion_r31579949","pull_request_url":"https://api.github.com/repos/Theano/Theano/pulls/2423","_links":{"self":{"href":"https://api.github.com/repos/Theano/Theano/pulls/comments/31579949"},"html":{"href":"https://github.com/Theano/Theano/pull/2423#discussion_r31579949"},"pull_request":{"href":"https://api.github.com/repos/Theano/Theano/pulls/2423"}}},"pull_request":{"url":"https://api.github.com/repos/Theano/Theano/pulls/2423","id":27683135,"html_url":"https://github.com/Theano/Theano/pull/2423","diff_url":"https://github.com/Theano/Theano/pull/2423.diff","patch_url":"https://github.com/Theano/Theano/pull/2423.patch","issue_url":"https://api.github.com/repos/Theano/Theano/issues/2423","number":2423,"state":"open","locked":false,"title":"Add breakpoint Op to Theano","user":{"login":"carriepl","id":832811,"avatar_url":"https://avatars.githubusercontent.com/u/832811?v=3","gravatar_id":"","url":"https://api.github.com/users/carriepl","html_url":"https://github.com/carriepl","followers_url":"https://api.github.com/users/carriepl/followers","following_url":"https://api.github.com/users/carriepl/following{/other_user}","gists_url":"https://api.github.com/users/carriepl/gists{/gist_id}","starred_url":"https://api.github.com/users/carriepl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carriepl/subscriptions","organizations_url":"https://api.github.com/users/carriepl/orgs","repos_url":"https://api.github.com/users/carriepl/repos","events_url":"https://api.github.com/users/carriepl/events{/privacy}","received_events_url":"https://api.github.com/users/carriepl/received_events","type":"User","site_admin":false},"body":"This is just a small utility class to allow a user to put a conditional breakpoint, with pdb, inside the execution of a Theano function. It is implemented in a similar way to the Print() op in that it's a identity-like op with a side effect. It takes multiple inputs and the first one needs to be a 0d tensor and is interpreted as the condition that will decide the activation of the breakpoint. When, during execution, that condition is evaluated to True, the breakpoint will be activated. The subsequent inputs are interpreted as the variables the user wants to monitor and will be made available to the user when the conditional breakpoint activates.\r\n\r\nI am not sure what the best way to test this class would be. It is easy enough to test that the breakpoint doesn't activate in a particular case but testing that it does activate seems a little bit more subtle.","created_at":"2015-01-20T14:55:56Z","updated_at":"2015-06-02T22:57:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b0e0f37f25de648f0c91d1f66ea835ee05e7ccf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Theano/Theano/pulls/2423/commits","review_comments_url":"https://api.github.com/repos/Theano/Theano/pulls/2423/comments","review_comment_url":"https://api.github.com/repos/Theano/Theano/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Theano/Theano/issues/2423/comments","statuses_url":"https://api.github.com/repos/Theano/Theano/statuses/15f30cda5694f80a432f9d4577eb6e55414e9571","head":{"label":"carriepl:breakpoint","ref":"breakpoint","sha":"15f30cda5694f80a432f9d4577eb6e55414e9571","user":{"login":"carriepl","id":832811,"avatar_url":"https://avatars.githubusercontent.com/u/832811?v=3","gravatar_id":"","url":"https://api.github.com/users/carriepl","html_url":"https://github.com/carriepl","followers_url":"https://api.github.com/users/carriepl/followers","following_url":"https://api.github.com/users/carriepl/following{/other_user}","gists_url":"https://api.github.com/users/carriepl/gists{/gist_id}","starred_url":"https://api.github.com/users/carriepl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carriepl/subscriptions","organizations_url":"https://api.github.com/users/carriepl/orgs","repos_url":"https://api.github.com/users/carriepl/repos","events_url":"https://api.github.com/users/carriepl/events{/privacy}","received_events_url":"https://api.github.com/users/carriepl/received_events","type":"User","site_admin":false},"repo":{"id":18150468,"name":"Theano","full_name":"carriepl/Theano","owner":{"login":"carriepl","id":832811,"avatar_url":"https://avatars.githubusercontent.com/u/832811?v=3","gravatar_id":"","url":"https://api.github.com/users/carriepl","html_url":"https://github.com/carriepl","followers_url":"https://api.github.com/users/carriepl/followers","following_url":"https://api.github.com/users/carriepl/following{/other_user}","gists_url":"https://api.github.com/users/carriepl/gists{/gist_id}","starred_url":"https://api.github.com/users/carriepl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carriepl/subscriptions","organizations_url":"https://api.github.com/users/carriepl/orgs","repos_url":"https://api.github.com/users/carriepl/repos","events_url":"https://api.github.com/users/carriepl/events{/privacy}","received_events_url":"https://api.github.com/users/carriepl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/carriepl/Theano","description":"Optimizing GPU-meta-programming code generating array oriented optimizing math compiler in Python","fork":true,"url":"https://api.github.com/repos/carriepl/Theano","forks_url":"https://api.github.com/repos/carriepl/Theano/forks","keys_url":"https://api.github.com/repos/carriepl/Theano/keys{/key_id}","collaborators_url":"https://api.github.com/repos/carriepl/Theano/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/carriepl/Theano/teams","hooks_url":"https://api.github.com/repos/carriepl/Theano/hooks","issue_events_url":"https://api.github.com/repos/carriepl/Theano/issues/events{/number}","events_url":"https://api.github.com/repos/carriepl/Theano/events","assignees_url":"https://api.github.com/repos/carriepl/Theano/assignees{/user}","branches_url":"https://api.github.com/repos/carriepl/Theano/branches{/branch}","tags_url":"https://api.github.com/repos/carriepl/Theano/tags","blobs_url":"https://api.github.com/repos/carriepl/Theano/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/carriepl/Theano/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/carriepl/Theano/git/refs{/sha}","trees_url":"https://api.github.com/repos/carriepl/Theano/git/trees{/sha}","statuses_url":"https://api.github.com/repos/carriepl/Theano/statuses/{sha}","languages_url":"https://api.github.com/repos/carriepl/Theano/languages","stargazers_url":"https://api.github.com/repos/carriepl/Theano/stargazers","contributors_url":"https://api.github.com/repos/carriepl/Theano/contributors","subscribers_url":"https://api.github.com/repos/carriepl/Theano/subscribers","subscription_url":"https://api.github.com/repos/carriepl/Theano/subscription","commits_url":"https://api.github.com/repos/carriepl/Theano/commits{/sha}","git_commits_url":"https://api.github.com/repos/carriepl/Theano/git/commits{/sha}","comments_url":"https://api.github.com/repos/carriepl/Theano/comments{/number}","issue_comment_url":"https://api.github.com/repos/carriepl/Theano/issues/comments{/number}","contents_url":"https://api.github.com/repos/carriepl/Theano/contents/{+path}","compare_url":"https://api.github.com/repos/carriepl/Theano/compare/{base}...{head}","merges_url":"https://api.github.com/repos/carriepl/Theano/merges","archive_url":"https://api.github.com/repos/carriepl/Theano/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/carriepl/Theano/downloads","issues_url":"https://api.github.com/repos/carriepl/Theano/issues{/number}","pulls_url":"https://api.github.com/repos/carriepl/Theano/pulls{/number}","milestones_url":"https://api.github.com/repos/carriepl/Theano/milestones{/number}","notifications_url":"https://api.github.com/repos/carriepl/Theano/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/carriepl/Theano/labels{/name}","releases_url":"https://api.github.com/repos/carriepl/Theano/releases{/id}","created_at":"2014-03-26T19:13:49Z","updated_at":"2014-09-10T14:19:14Z","pushed_at":"2015-06-02T16:40:02Z","git_url":"git://github.com/carriepl/Theano.git","ssh_url":"git@github.com:carriepl/Theano.git","clone_url":"https://github.com/carriepl/Theano.git","svn_url":"https://github.com/carriepl/Theano","homepage":"http://www.deeplearning.net/software/theano","size":34805,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Theano:master","ref":"master","sha":"2846a3aaea2e5add2cc0f0078b513689c9683324","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-06-02T15:59:05Z","pushed_at":"2015-06-02T20:42:14Z","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":54931,"stargazers_count":1548,"watchers_count":1548,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":579,"mirror_url":null,"open_issues_count":399,"forks":579,"open_issues":399,"watchers":1548,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Theano/Theano/pulls/2423"},"html":{"href":"https://github.com/Theano/Theano/pull/2423"},"issue":{"href":"https://api.github.com/repos/Theano/Theano/issues/2423"},"comments":{"href":"https://api.github.com/repos/Theano/Theano/issues/2423/comments"},"review_comments":{"href":"https://api.github.com/repos/Theano/Theano/pulls/2423/comments"},"review_comment":{"href":"https://api.github.com/repos/Theano/Theano/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Theano/Theano/pulls/2423/commits"},"statuses":{"href":"https://api.github.com/repos/Theano/Theano/statuses/15f30cda5694f80a432f9d4577eb6e55414e9571"}}}}