{"action":"created","comment":{"url":"https://api.github.com/repos/pytorch/pytorch/pulls/comments/227210419","pull_request_review_id":167191477,"id":227210419,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNzIxMDQxOQ==","diff_hunk":"@@ -1499,11 +1553,27 @@ struct to_ir {\n \n   std::shared_ptr<SugaredValue> emitApplyExpr(Apply &apply, size_t n_binders) {\n     auto sv = emitSugaredExpr(apply.callee(), 1);\n-    auto inputs = getNamedValues(apply.inputs(), true);\n     auto attributes = fmap(apply.attributes(), [&](const Attribute& attr) {\n       return NamedValue(attr.range(), attr.name().name(), emitExpr(attr.value()));\n     });\n-    return sv->call(apply.callee().range(), method, inputs, attributes, n_binders);\n+\n+    auto loc = apply.callee().range();\n+    if (sv->kind() == \"fork\") {\n+      JIT_ASSERT(attributes.size() == 0);","path":"torch/csrc/jit/script/compiler.cpp","position":73,"original_position":73,"commit_id":"5461791afd902ed40b39e559c31a0eaf7b967e8e","original_commit_id":"5461791afd902ed40b39e559c31a0eaf7b967e8e","user":{"login":"zdevito","id":370202,"node_id":"MDQ6VXNlcjM3MDIwMg==","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":"You have to throw a user interpretable error for every user-hittable thing. Asserts are only appropriate for errors that indicate a bug in the compiler.\r\n```torch.jit.fork(foo, a=5)` will trigger attributes.```","created_at":"2018-10-23T03:20:11Z","updated_at":"2018-10-23T03:37:14Z","html_url":"https://github.com/pytorch/pytorch/pull/12976#discussion_r227210419","pull_request_url":"https://api.github.com/repos/pytorch/pytorch/pulls/12976","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/comments/227210419"},"html":{"href":"https://github.com/pytorch/pytorch/pull/12976#discussion_r227210419"},"pull_request":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/12976"}}},"pull_request":{"url":"https://api.github.com/repos/pytorch/pytorch/pulls/12976","id":224877280,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0ODc3Mjgw","html_url":"https://github.com/pytorch/pytorch/pull/12976","diff_url":"https://github.com/pytorch/pytorch/pull/12976.diff","patch_url":"https://github.com/pytorch/pytorch/pull/12976.patch","issue_url":"https://api.github.com/repos/pytorch/pytorch/issues/12976","number":12976,"state":"open","locked":false,"title":"Add Future to IValue","user":{"login":"highker","id":2192913,"node_id":"MDQ6VXNlcjIxOTI5MTM=","avatar_url":"https://avatars0.githubusercontent.com/u/2192913?v=4","gravatar_id":"","url":"https://api.github.com/users/highker","html_url":"https://github.com/highker","followers_url":"https://api.github.com/users/highker/followers","following_url":"https://api.github.com/users/highker/following{/other_user}","gists_url":"https://api.github.com/users/highker/gists{/gist_id}","starred_url":"https://api.github.com/users/highker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highker/subscriptions","organizations_url":"https://api.github.com/users/highker/orgs","repos_url":"https://api.github.com/users/highker/repos","events_url":"https://api.github.com/users/highker/events{/privacy}","received_events_url":"https://api.github.com/users/highker/received_events","type":"User","site_admin":false},"body":"Future now is an IValue. prim::Wait now is replaced by aten::wait\r\n\r\nThis PR is built on top of #12925","created_at":"2018-10-23T02:49:10Z","updated_at":"2018-10-23T03:37:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5d656baf6b9a13b7a58a42ff891df2eaca9c4a91","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jamesr66a","id":4685384,"node_id":"MDQ6VXNlcjQ2ODUzODQ=","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}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pytorch/pytorch/pulls/12976/commits","review_comments_url":"https://api.github.com/repos/pytorch/pytorch/pulls/12976/comments","review_comment_url":"https://api.github.com/repos/pytorch/pytorch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pytorch/pytorch/issues/12976/comments","statuses_url":"https://api.github.com/repos/pytorch/pytorch/statuses/5461791afd902ed40b39e559c31a0eaf7b967e8e","head":{"label":"highker:future-ivalue","ref":"future-ivalue","sha":"5461791afd902ed40b39e559c31a0eaf7b967e8e","user":{"login":"highker","id":2192913,"node_id":"MDQ6VXNlcjIxOTI5MTM=","avatar_url":"https://avatars0.githubusercontent.com/u/2192913?v=4","gravatar_id":"","url":"https://api.github.com/users/highker","html_url":"https://github.com/highker","followers_url":"https://api.github.com/users/highker/followers","following_url":"https://api.github.com/users/highker/following{/other_user}","gists_url":"https://api.github.com/users/highker/gists{/gist_id}","starred_url":"https://api.github.com/users/highker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highker/subscriptions","organizations_url":"https://api.github.com/users/highker/orgs","repos_url":"https://api.github.com/users/highker/repos","events_url":"https://api.github.com/users/highker/events{/privacy}","received_events_url":"https://api.github.com/users/highker/received_events","type":"User","site_admin":false},"repo":{"id":130912899,"node_id":"MDEwOlJlcG9zaXRvcnkxMzA5MTI4OTk=","name":"pytorch","full_name":"highker/pytorch","private":false,"owner":{"login":"highker","id":2192913,"node_id":"MDQ6VXNlcjIxOTI5MTM=","avatar_url":"https://avatars0.githubusercontent.com/u/2192913?v=4","gravatar_id":"","url":"https://api.github.com/users/highker","html_url":"https://github.com/highker","followers_url":"https://api.github.com/users/highker/followers","following_url":"https://api.github.com/users/highker/following{/other_user}","gists_url":"https://api.github.com/users/highker/gists{/gist_id}","starred_url":"https://api.github.com/users/highker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highker/subscriptions","organizations_url":"https://api.github.com/users/highker/orgs","repos_url":"https://api.github.com/users/highker/repos","events_url":"https://api.github.com/users/highker/events{/privacy}","received_events_url":"https://api.github.com/users/highker/received_events","type":"User","site_admin":false},"html_url":"https://github.com/highker/pytorch","description":"Tensors and Dynamic neural networks in Python  with strong GPU acceleration","fork":true,"url":"https://api.github.com/repos/highker/pytorch","forks_url":"https://api.github.com/repos/highker/pytorch/forks","keys_url":"https://api.github.com/repos/highker/pytorch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/highker/pytorch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/highker/pytorch/teams","hooks_url":"https://api.github.com/repos/highker/pytorch/hooks","issue_events_url":"https://api.github.com/repos/highker/pytorch/issues/events{/number}","events_url":"https://api.github.com/repos/highker/pytorch/events","assignees_url":"https://api.github.com/repos/highker/pytorch/assignees{/user}","branches_url":"https://api.github.com/repos/highker/pytorch/branches{/branch}","tags_url":"https://api.github.com/repos/highker/pytorch/tags","blobs_url":"https://api.github.com/repos/highker/pytorch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/highker/pytorch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/highker/pytorch/git/refs{/sha}","trees_url":"https://api.github.com/repos/highker/pytorch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/highker/pytorch/statuses/{sha}","languages_url":"https://api.github.com/repos/highker/pytorch/languages","stargazers_url":"https://api.github.com/repos/highker/pytorch/stargazers","contributors_url":"https://api.github.com/repos/highker/pytorch/contributors","subscribers_url":"https://api.github.com/repos/highker/pytorch/subscribers","subscription_url":"https://api.github.com/repos/highker/pytorch/subscription","commits_url":"https://api.github.com/repos/highker/pytorch/commits{/sha}","git_commits_url":"https://api.github.com/repos/highker/pytorch/git/commits{/sha}","comments_url":"https://api.github.com/repos/highker/pytorch/comments{/number}","issue_comment_url":"https://api.github.com/repos/highker/pytorch/issues/comments{/number}","contents_url":"https://api.github.com/repos/highker/pytorch/contents/{+path}","compare_url":"https://api.github.com/repos/highker/pytorch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/highker/pytorch/merges","archive_url":"https://api.github.com/repos/highker/pytorch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/highker/pytorch/downloads","issues_url":"https://api.github.com/repos/highker/pytorch/issues{/number}","pulls_url":"https://api.github.com/repos/highker/pytorch/pulls{/number}","milestones_url":"https://api.github.com/repos/highker/pytorch/milestones{/number}","notifications_url":"https://api.github.com/repos/highker/pytorch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/highker/pytorch/labels{/name}","releases_url":"https://api.github.com/repos/highker/pytorch/releases{/id}","deployments_url":"https://api.github.com/repos/highker/pytorch/deployments","created_at":"2018-04-24T20:57:23Z","updated_at":"2018-10-18T22:59:12Z","pushed_at":"2018-10-23T02:47:31Z","git_url":"git://github.com/highker/pytorch.git","ssh_url":"git@github.com:highker/pytorch.git","clone_url":"https://github.com/highker/pytorch.git","svn_url":"https://github.com/highker/pytorch","homepage":"http://pytorch.org","size":79264,"stargazers_count":1,"watchers_count":1,"language":"C++","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":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"pytorch:master","ref":"master","sha":"bc1d96ca985241752485ba02d0b609283192b49c","user":{"login":"pytorch","id":21003710,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMDAzNzEw","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,"node_id":"MDEwOlJlcG9zaXRvcnk2NTYwMDk3NQ==","name":"pytorch","full_name":"pytorch/pytorch","private":false,"owner":{"login":"pytorch","id":21003710,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMDAzNzEw","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},"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-10-23T03:36:11Z","pushed_at":"2018-10-23T03:17:19Z","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":81056,"stargazers_count":20278,"watchers_count":20278,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4801,"mirror_url":null,"archived":false,"open_issues_count":1962,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":4801,"open_issues":1962,"watchers":20278,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/12976"},"html":{"href":"https://github.com/pytorch/pytorch/pull/12976"},"issue":{"href":"https://api.github.com/repos/pytorch/pytorch/issues/12976"},"comments":{"href":"https://api.github.com/repos/pytorch/pytorch/issues/12976/comments"},"review_comments":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/12976/comments"},"review_comment":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/12976/commits"},"statuses":{"href":"https://api.github.com/repos/pytorch/pytorch/statuses/5461791afd902ed40b39e559c31a0eaf7b967e8e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"zdevito"}}