{"action":"created","comment":{"url":"https://api.github.com/repos/pytorch/pytorch/pulls/comments/235513137","pull_request_review_id":177397341,"id":235513137,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTUxMzEzNw==","diff_hunk":"@@ -5,6 +5,8 @@\n namespace caffe2 {\n \n CAFFE_DEFINE_PREALLOCATED_KNOWN_TYPE(12, Tensor);\n+using TensorImplPtr = c10::intrusive_ptr<at::TensorImpl, at::UndefinedTensorImpl>;","path":"caffe2/core/tensor.cc","position":4,"original_position":4,"commit_id":"9c88bb21dcaf1a0af2bc68a842a3bfcc1a536733","original_commit_id":"9c88bb21dcaf1a0af2bc68a842a3bfcc1a536733","user":{"login":"jerryzh168","id":4958441,"node_id":"MDQ6VXNlcjQ5NTg0NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/4958441?v=4","gravatar_id":"","url":"https://api.github.com/users/jerryzh168","html_url":"https://github.com/jerryzh168","followers_url":"https://api.github.com/users/jerryzh168/followers","following_url":"https://api.github.com/users/jerryzh168/following{/other_user}","gists_url":"https://api.github.com/users/jerryzh168/gists{/gist_id}","starred_url":"https://api.github.com/users/jerryzh168/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerryzh168/subscriptions","organizations_url":"https://api.github.com/users/jerryzh168/orgs","repos_url":"https://api.github.com/users/jerryzh168/repos","events_url":"https://api.github.com/users/jerryzh168/events{/privacy}","received_events_url":"https://api.github.com/users/jerryzh168/received_events","type":"User","site_admin":false},"body":"sure","created_at":"2018-11-21T19:23:14Z","updated_at":"2018-11-21T19:23:14Z","html_url":"https://github.com/pytorch/pytorch/pull/14136#discussion_r235513137","pull_request_url":"https://api.github.com/repos/pytorch/pytorch/pulls/14136","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/comments/235513137"},"html":{"href":"https://github.com/pytorch/pytorch/pull/14136#discussion_r235513137"},"pull_request":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/14136"}},"in_reply_to_id":235506587},"pull_request":{"url":"https://api.github.com/repos/pytorch/pytorch/pulls/14136","id":231691640,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxNjkxNjQw","html_url":"https://github.com/pytorch/pytorch/pull/14136","diff_url":"https://github.com/pytorch/pytorch/pull/14136.diff","patch_url":"https://github.com/pytorch/pytorch/pull/14136.patch","issue_url":"https://api.github.com/repos/pytorch/pytorch/issues/14136","number":14136,"state":"open","locked":false,"title":"[wip][pt1][tensor] BlobGetMutableTensor returns Tensor","user":{"login":"jerryzh168","id":4958441,"node_id":"MDQ6VXNlcjQ5NTg0NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/4958441?v=4","gravatar_id":"","url":"https://api.github.com/users/jerryzh168","html_url":"https://github.com/jerryzh168","followers_url":"https://api.github.com/users/jerryzh168/followers","following_url":"https://api.github.com/users/jerryzh168/following{/other_user}","gists_url":"https://api.github.com/users/jerryzh168/gists{/gist_id}","starred_url":"https://api.github.com/users/jerryzh168/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerryzh168/subscriptions","organizations_url":"https://api.github.com/users/jerryzh168/orgs","repos_url":"https://api.github.com/users/jerryzh168/repos","events_url":"https://api.github.com/users/jerryzh168/events{/privacy}","received_events_url":"https://api.github.com/users/jerryzh168/received_events","type":"User","site_admin":false},"body":"Stack:\n&nbsp;&nbsp;&nbsp;&nbsp;:black_circle:&nbsp; **#14136 [wip][pt1][tensor] BlobGetMutableTensor returns Tensor**&nbsp;&nbsp;[:yellow_heart:](https://our.internmc.facebook.com/intern/diff/D12934074/)\n\nSince now Tensor is a shared_ptr, it doesn't make sense to have Tensor* around anymore,\nthis diff is changing Tensor* to Tensor in the interface.\nWe'll store pointer to intrusive_ptr to TensorImpl in Tensor and create Tensor object on  the fly\nwhen returning from BlobGetMutableTensor.\nAnother motivation is we want Blob to store intrusive_ptr of TensorImpl because IValue can store intrusive ptr. Without this change, IValue will have to store Blob which is an extra level of indirection.\n\nThis diff should be rebased on the diffs that removes Resize/ResizeLike+mutable_data\n\nTo remove Tensor*, we'll do following\n```\nauto* Y = Ouptut(0);\nY->mutable_data...\n```\n-->\n```\nauto Y = Output(0);\nY.mutable_data...\n```\n\nBut to run clangr codemod, we'll keep both APIs in different names, e.g. `Output` and `XOutput`, and do the refactor and then delete the old method and rename the new method into the old one.\nFor example for `Output`, we'll first codemod the callsites from `Output` to `XOutput`, then delete the old `Output` and rename `XOutput` to `Output` in the end.\n\n\nDifferential Revision: [D12934074](https://our.internmc.facebook.com/intern/diff/D12934074/)","created_at":"2018-11-17T00:33:26Z","updated_at":"2018-11-21T19:23:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e6481188d82aec86ec0189129b189622abcce4c4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pytorch/pytorch/pulls/14136/commits","review_comments_url":"https://api.github.com/repos/pytorch/pytorch/pulls/14136/comments","review_comment_url":"https://api.github.com/repos/pytorch/pytorch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pytorch/pytorch/issues/14136/comments","statuses_url":"https://api.github.com/repos/pytorch/pytorch/statuses/9c88bb21dcaf1a0af2bc68a842a3bfcc1a536733","head":{"label":"pytorch:export-D12934074","ref":"export-D12934074","sha":"9c88bb21dcaf1a0af2bc68a842a3bfcc1a536733","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-11-21T18:44:42Z","pushed_at":"2018-11-21T19:16:45Z","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":89357,"stargazers_count":21501,"watchers_count":21501,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5133,"mirror_url":null,"archived":false,"open_issues_count":2166,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":5133,"open_issues":2166,"watchers":21501,"default_branch":"master"}},"base":{"label":"pytorch:master","ref":"master","sha":"55e1b1ec3ea629f620c78e8c3c4357cf499604ca","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-11-21T18:44:42Z","pushed_at":"2018-11-21T19:16:45Z","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":89357,"stargazers_count":21501,"watchers_count":21501,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5133,"mirror_url":null,"archived":false,"open_issues_count":2166,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":5133,"open_issues":2166,"watchers":21501,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/14136"},"html":{"href":"https://github.com/pytorch/pytorch/pull/14136"},"issue":{"href":"https://api.github.com/repos/pytorch/pytorch/issues/14136"},"comments":{"href":"https://api.github.com/repos/pytorch/pytorch/issues/14136/comments"},"review_comments":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/14136/comments"},"review_comment":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/14136/commits"},"statuses":{"href":"https://api.github.com/repos/pytorch/pytorch/statuses/9c88bb21dcaf1a0af2bc68a842a3bfcc1a536733"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jerryzh168"}}