{"action":"created","comment":{"url":"https://api.github.com/repos/pytorch/pytorch/pulls/comments/172099817","pull_request_review_id":101058620,"id":172099817,"diff_hunk":"@@ -436,9 +446,12 @@ struct GraphFuser {\n       // handle inputs in reverse topological order as well...\n       // otherwise in f(a,a+b) it will appear a is used twice if we consider\n       // the f-a fusion before the f-(a+b) fusion first.\n-      value_list inputs = consumer->inputs();\n-      for(auto i : inputs) {\n-        JIT_ASSERT(topological_index.count(i->node()) > 0);\n+      value_list inputs;\n+      for(auto i : consumer->inputs()) {\n+        if (i->node()->owningBlock() == block) {\n+          inputs.push_back(i);\n+          JIT_ASSERT(topological_index.count(i->node()) > 0);\n+        }","path":"torch/csrc/jit/passes/graph_fuser.cpp","position":58,"original_position":58,"commit_id":"0459961b678a5852938429e41c4f7e5a847d59f4","original_commit_id":"0459961b678a5852938429e41c4f7e5a847d59f4","user":{"login":"zdevito","id":370202,"avatar_url":"https://avatars0.githubusercontent.com/u/370202?v=4","gravatar_id":"","url":"https://api.github.com/users/zdevito","html_url":"https://github.com/zdevito","followers_url":"https://api.github.com/users/zdevito/followers","following_url":"https://api.github.com/users/zdevito/following{/other_user}","gists_url":"https://api.github.com/users/zdevito/gists{/gist_id}","starred_url":"https://api.github.com/users/zdevito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zdevito/subscriptions","organizations_url":"https://api.github.com/users/zdevito/orgs","repos_url":"https://api.github.com/users/zdevito/repos","events_url":"https://api.github.com/users/zdevito/events{/privacy}","received_events_url":"https://api.github.com/users/zdevito/received_events","type":"User","site_admin":false},"body":"This was failing in James' beam search code. The topological order of the nodes is only defined for the current block under consider and this assert (and the later sort) fails before the isFusible check. The isFusible check is still necessary as well due to Chunking optimization. If we see more errors later, we should consider taking a different approach to where we check for suitable fusion edges.","created_at":"2018-03-05T06:33:48Z","updated_at":"2018-03-05T06:33:48Z","html_url":"https://github.com/pytorch/pytorch/pull/5517#discussion_r172099817","pull_request_url":"https://api.github.com/repos/pytorch/pytorch/pulls/5517","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/comments/172099817"},"html":{"href":"https://github.com/pytorch/pytorch/pull/5517#discussion_r172099817"},"pull_request":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/5517"}},"in_reply_to_id":172062529},"pull_request":{"url":"https://api.github.com/repos/pytorch/pytorch/pulls/5517","id":172423223,"html_url":"https://github.com/pytorch/pytorch/pull/5517","diff_url":"https://github.com/pytorch/pytorch/pull/5517.diff","patch_url":"https://github.com/pytorch/pytorch/pull/5517.patch","issue_url":"https://api.github.com/repos/pytorch/pytorch/issues/5517","number":5517,"state":"closed","locked":false,"title":"Big batch of fixes for JIT","user":{"login":"jamesr66a","id":4685384,"avatar_url":"https://avatars2.githubusercontent.com/u/4685384?v=4","gravatar_id":"","url":"https://api.github.com/users/jamesr66a","html_url":"https://github.com/jamesr66a","followers_url":"https://api.github.com/users/jamesr66a/followers","following_url":"https://api.github.com/users/jamesr66a/following{/other_user}","gists_url":"https://api.github.com/users/jamesr66a/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesr66a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesr66a/subscriptions","organizations_url":"https://api.github.com/users/jamesr66a/orgs","repos_url":"https://api.github.com/users/jamesr66a/repos","events_url":"https://api.github.com/users/jamesr66a/events{/privacy}","received_events_url":"https://api.github.com/users/jamesr66a/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-02T05:03:48Z","updated_at":"2018-03-05T06:33:48Z","closed_at":"2018-03-02T23:03:44Z","merged_at":"2018-03-02T23:03:44Z","merge_commit_sha":"60415cf0d2ebdfc57ed7a7ed0d2735249fdc5fd9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pytorch/pytorch/pulls/5517/commits","review_comments_url":"https://api.github.com/repos/pytorch/pytorch/pulls/5517/comments","review_comment_url":"https://api.github.com/repos/pytorch/pytorch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pytorch/pytorch/issues/5517/comments","statuses_url":"https://api.github.com/repos/pytorch/pytorch/statuses/0459961b678a5852938429e41c4f7e5a847d59f4","head":{"label":"jamesr66a:spfixes","ref":"spfixes","sha":"0459961b678a5852938429e41c4f7e5a847d59f4","user":{"login":"jamesr66a","id":4685384,"avatar_url":"https://avatars2.githubusercontent.com/u/4685384?v=4","gravatar_id":"","url":"https://api.github.com/users/jamesr66a","html_url":"https://github.com/jamesr66a","followers_url":"https://api.github.com/users/jamesr66a/followers","following_url":"https://api.github.com/users/jamesr66a/following{/other_user}","gists_url":"https://api.github.com/users/jamesr66a/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesr66a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesr66a/subscriptions","organizations_url":"https://api.github.com/users/jamesr66a/orgs","repos_url":"https://api.github.com/users/jamesr66a/repos","events_url":"https://api.github.com/users/jamesr66a/events{/privacy}","received_events_url":"https://api.github.com/users/jamesr66a/received_events","type":"User","site_admin":false},"repo":{"id":108300243,"name":"pytorch","full_name":"jamesr66a/pytorch","owner":{"login":"jamesr66a","id":4685384,"avatar_url":"https://avatars2.githubusercontent.com/u/4685384?v=4","gravatar_id":"","url":"https://api.github.com/users/jamesr66a","html_url":"https://github.com/jamesr66a","followers_url":"https://api.github.com/users/jamesr66a/followers","following_url":"https://api.github.com/users/jamesr66a/following{/other_user}","gists_url":"https://api.github.com/users/jamesr66a/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesr66a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesr66a/subscriptions","organizations_url":"https://api.github.com/users/jamesr66a/orgs","repos_url":"https://api.github.com/users/jamesr66a/repos","events_url":"https://api.github.com/users/jamesr66a/events{/privacy}","received_events_url":"https://api.github.com/users/jamesr66a/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jamesr66a/pytorch","description":"Tensors and Dynamic neural networks in Python  with strong GPU acceleration","fork":true,"url":"https://api.github.com/repos/jamesr66a/pytorch","forks_url":"https://api.github.com/repos/jamesr66a/pytorch/forks","keys_url":"https://api.github.com/repos/jamesr66a/pytorch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jamesr66a/pytorch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jamesr66a/pytorch/teams","hooks_url":"https://api.github.com/repos/jamesr66a/pytorch/hooks","issue_events_url":"https://api.github.com/repos/jamesr66a/pytorch/issues/events{/number}","events_url":"https://api.github.com/repos/jamesr66a/pytorch/events","assignees_url":"https://api.github.com/repos/jamesr66a/pytorch/assignees{/user}","branches_url":"https://api.github.com/repos/jamesr66a/pytorch/branches{/branch}","tags_url":"https://api.github.com/repos/jamesr66a/pytorch/tags","blobs_url":"https://api.github.com/repos/jamesr66a/pytorch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jamesr66a/pytorch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jamesr66a/pytorch/git/refs{/sha}","trees_url":"https://api.github.com/repos/jamesr66a/pytorch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jamesr66a/pytorch/statuses/{sha}","languages_url":"https://api.github.com/repos/jamesr66a/pytorch/languages","stargazers_url":"https://api.github.com/repos/jamesr66a/pytorch/stargazers","contributors_url":"https://api.github.com/repos/jamesr66a/pytorch/contributors","subscribers_url":"https://api.github.com/repos/jamesr66a/pytorch/subscribers","subscription_url":"https://api.github.com/repos/jamesr66a/pytorch/subscription","commits_url":"https://api.github.com/repos/jamesr66a/pytorch/commits{/sha}","git_commits_url":"https://api.github.com/repos/jamesr66a/pytorch/git/commits{/sha}","comments_url":"https://api.github.com/repos/jamesr66a/pytorch/comments{/number}","issue_comment_url":"https://api.github.com/repos/jamesr66a/pytorch/issues/comments{/number}","contents_url":"https://api.github.com/repos/jamesr66a/pytorch/contents/{+path}","compare_url":"https://api.github.com/repos/jamesr66a/pytorch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jamesr66a/pytorch/merges","archive_url":"https://api.github.com/repos/jamesr66a/pytorch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jamesr66a/pytorch/downloads","issues_url":"https://api.github.com/repos/jamesr66a/pytorch/issues{/number}","pulls_url":"https://api.github.com/repos/jamesr66a/pytorch/pulls{/number}","milestones_url":"https://api.github.com/repos/jamesr66a/pytorch/milestones{/number}","notifications_url":"https://api.github.com/repos/jamesr66a/pytorch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jamesr66a/pytorch/labels{/name}","releases_url":"https://api.github.com/repos/jamesr66a/pytorch/releases{/id}","deployments_url":"https://api.github.com/repos/jamesr66a/pytorch/deployments","created_at":"2017-10-25T17:06:33Z","updated_at":"2018-02-24T09:24:00Z","pushed_at":"2018-03-02T22:47:16Z","git_url":"git://github.com/jamesr66a/pytorch.git","ssh_url":"git@github.com:jamesr66a/pytorch.git","clone_url":"https://github.com/jamesr66a/pytorch.git","svn_url":"https://github.com/jamesr66a/pytorch","homepage":"http://pytorch.org","size":23884,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"pytorch:master","ref":"master","sha":"2d4212274ec219fecbf010a9eddc652d75047d16","user":{"login":"pytorch","id":21003710,"avatar_url":"https://avatars3.githubusercontent.com/u/21003710?v=4","gravatar_id":"","url":"https://api.github.com/users/pytorch","html_url":"https://github.com/pytorch","followers_url":"https://api.github.com/users/pytorch/followers","following_url":"https://api.github.com/users/pytorch/following{/other_user}","gists_url":"https://api.github.com/users/pytorch/gists{/gist_id}","starred_url":"https://api.github.com/users/pytorch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pytorch/subscriptions","organizations_url":"https://api.github.com/users/pytorch/orgs","repos_url":"https://api.github.com/users/pytorch/repos","events_url":"https://api.github.com/users/pytorch/events{/privacy}","received_events_url":"https://api.github.com/users/pytorch/received_events","type":"Organization","site_admin":false},"repo":{"id":65600975,"name":"pytorch","full_name":"pytorch/pytorch","owner":{"login":"pytorch","id":21003710,"avatar_url":"https://avatars3.githubusercontent.com/u/21003710?v=4","gravatar_id":"","url":"https://api.github.com/users/pytorch","html_url":"https://github.com/pytorch","followers_url":"https://api.github.com/users/pytorch/followers","following_url":"https://api.github.com/users/pytorch/following{/other_user}","gists_url":"https://api.github.com/users/pytorch/gists{/gist_id}","starred_url":"https://api.github.com/users/pytorch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pytorch/subscriptions","organizations_url":"https://api.github.com/users/pytorch/orgs","repos_url":"https://api.github.com/users/pytorch/repos","events_url":"https://api.github.com/users/pytorch/events{/privacy}","received_events_url":"https://api.github.com/users/pytorch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pytorch/pytorch","description":"Tensors and Dynamic neural networks in Python  with strong GPU acceleration","fork":false,"url":"https://api.github.com/repos/pytorch/pytorch","forks_url":"https://api.github.com/repos/pytorch/pytorch/forks","keys_url":"https://api.github.com/repos/pytorch/pytorch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pytorch/pytorch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pytorch/pytorch/teams","hooks_url":"https://api.github.com/repos/pytorch/pytorch/hooks","issue_events_url":"https://api.github.com/repos/pytorch/pytorch/issues/events{/number}","events_url":"https://api.github.com/repos/pytorch/pytorch/events","assignees_url":"https://api.github.com/repos/pytorch/pytorch/assignees{/user}","branches_url":"https://api.github.com/repos/pytorch/pytorch/branches{/branch}","tags_url":"https://api.github.com/repos/pytorch/pytorch/tags","blobs_url":"https://api.github.com/repos/pytorch/pytorch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pytorch/pytorch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pytorch/pytorch/git/refs{/sha}","trees_url":"https://api.github.com/repos/pytorch/pytorch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pytorch/pytorch/statuses/{sha}","languages_url":"https://api.github.com/repos/pytorch/pytorch/languages","stargazers_url":"https://api.github.com/repos/pytorch/pytorch/stargazers","contributors_url":"https://api.github.com/repos/pytorch/pytorch/contributors","subscribers_url":"https://api.github.com/repos/pytorch/pytorch/subscribers","subscription_url":"https://api.github.com/repos/pytorch/pytorch/subscription","commits_url":"https://api.github.com/repos/pytorch/pytorch/commits{/sha}","git_commits_url":"https://api.github.com/repos/pytorch/pytorch/git/commits{/sha}","comments_url":"https://api.github.com/repos/pytorch/pytorch/comments{/number}","issue_comment_url":"https://api.github.com/repos/pytorch/pytorch/issues/comments{/number}","contents_url":"https://api.github.com/repos/pytorch/pytorch/contents/{+path}","compare_url":"https://api.github.com/repos/pytorch/pytorch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pytorch/pytorch/merges","archive_url":"https://api.github.com/repos/pytorch/pytorch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pytorch/pytorch/downloads","issues_url":"https://api.github.com/repos/pytorch/pytorch/issues{/number}","pulls_url":"https://api.github.com/repos/pytorch/pytorch/pulls{/number}","milestones_url":"https://api.github.com/repos/pytorch/pytorch/milestones{/number}","notifications_url":"https://api.github.com/repos/pytorch/pytorch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pytorch/pytorch/labels{/name}","releases_url":"https://api.github.com/repos/pytorch/pytorch/releases{/id}","deployments_url":"https://api.github.com/repos/pytorch/pytorch/deployments","created_at":"2016-08-13T05:26:41Z","updated_at":"2018-03-05T06:12:49Z","pushed_at":"2018-03-05T04:25:31Z","git_url":"git://github.com/pytorch/pytorch.git","ssh_url":"git@github.com:pytorch/pytorch.git","clone_url":"https://github.com/pytorch/pytorch.git","svn_url":"https://github.com/pytorch/pytorch","homepage":"http://pytorch.org","size":23893,"stargazers_count":12696,"watchers_count":12696,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2683,"mirror_url":null,"archived":false,"open_issues_count":791,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":2683,"open_issues":791,"watchers":12696,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/5517"},"html":{"href":"https://github.com/pytorch/pytorch/pull/5517"},"issue":{"href":"https://api.github.com/repos/pytorch/pytorch/issues/5517"},"comments":{"href":"https://api.github.com/repos/pytorch/pytorch/issues/5517/comments"},"review_comments":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/5517/comments"},"review_comment":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/5517/commits"},"statuses":{"href":"https://api.github.com/repos/pytorch/pytorch/statuses/0459961b678a5852938429e41c4f7e5a847d59f4"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"zdevito"}}