{"action":"created","comment":{"url":"https://api.github.com/repos/pytorch/pytorch/pulls/comments/331600252","pull_request_review_id":297604804,"id":331600252,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMzMTYwMDI1Mg==","diff_hunk":"@@ -235,6 +235,60 @@ PyObject * THCPModule_emptyCache(PyObject *_unused, PyObject *noargs)\n   Py_RETURN_NONE;\n }\n \n+PyObject * THCPModule_memoryEventCounts(PyObject *_unused, PyObject *arg)\n+{\n+  HANDLE_TH_ERRORS\n+  THPUtils_assert(THPUtils_checkLong(arg), \"invalid argument to memory_allocated\");\n+  int device = (int) THPUtils_unpackLong(arg);\n+\n+  PyObject* result = PyDict_New();\n+\n+  #define _RESULT_SET_UNSIGNED_LONG(name, val) \\  // NOLINT: allow function-like macro","path":"torch/csrc/cuda/Module.cpp","position":12,"original_position":12,"commit_id":"b144d057b2211c2773f5175d07a96e3dfeea0b7f","original_commit_id":"b144d057b2211c2773f5175d07a96e3dfeea0b7f","user":{"login":"jma127","id":2780434,"node_id":"MDQ6VXNlcjI3ODA0MzQ=","avatar_url":"https://avatars2.githubusercontent.com/u/2780434?v=4","gravatar_id":"","url":"https://api.github.com/users/jma127","html_url":"https://github.com/jma127","followers_url":"https://api.github.com/users/jma127/followers","following_url":"https://api.github.com/users/jma127/following{/other_user}","gists_url":"https://api.github.com/users/jma127/gists{/gist_id}","starred_url":"https://api.github.com/users/jma127/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jma127/subscriptions","organizations_url":"https://api.github.com/users/jma127/orgs","repos_url":"https://api.github.com/users/jma127/repos","events_url":"https://api.github.com/users/jma127/events{/privacy}","received_events_url":"https://api.github.com/users/jma127/received_events","type":"User","site_admin":false},"body":"Fair point – will change ","created_at":"2019-10-04T17:08:58Z","updated_at":"2019-10-04T17:08:58Z","html_url":"https://github.com/pytorch/pytorch/pull/27361#discussion_r331600252","pull_request_url":"https://api.github.com/repos/pytorch/pytorch/pulls/27361","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/comments/331600252"},"html":{"href":"https://github.com/pytorch/pytorch/pull/27361#discussion_r331600252"},"pull_request":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/27361"}},"in_reply_to_id":331568815},"pull_request":{"url":"https://api.github.com/repos/pytorch/pytorch/pulls/27361","id":324508722,"node_id":"MDExOlB1bGxSZXF1ZXN0MzI0NTA4NzIy","html_url":"https://github.com/pytorch/pytorch/pull/27361","diff_url":"https://github.com/pytorch/pytorch/pull/27361.diff","patch_url":"https://github.com/pytorch/pytorch/pull/27361.patch","issue_url":"https://api.github.com/repos/pytorch/pytorch/issues/27361","number":27361,"state":"open","locked":false,"title":"Instrumentation of CUDA memory allocator event counts","user":{"login":"jma127","id":2780434,"node_id":"MDQ6VXNlcjI3ODA0MzQ=","avatar_url":"https://avatars2.githubusercontent.com/u/2780434?v=4","gravatar_id":"","url":"https://api.github.com/users/jma127","html_url":"https://github.com/jma127","followers_url":"https://api.github.com/users/jma127/followers","following_url":"https://api.github.com/users/jma127/following{/other_user}","gists_url":"https://api.github.com/users/jma127/gists{/gist_id}","starred_url":"https://api.github.com/users/jma127/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jma127/subscriptions","organizations_url":"https://api.github.com/users/jma127/orgs","repos_url":"https://api.github.com/users/jma127/repos","events_url":"https://api.github.com/users/jma127/events{/privacy}","received_events_url":"https://api.github.com/users/jma127/received_events","type":"User","site_admin":false},"body":"Adds the capability to track and report event counts of the\r\nCUDA memory allocator. This includes both explicit cudaMallocs/cudaFrees\r\nand \"internal\" events (block creation, block release, block splits,\r\nblock cache flush).\r\n","created_at":"2019-10-04T04:55:38Z","updated_at":"2019-10-04T17:08:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"78059c14cf20ea3394adf0b1c1305c9e1dc44d97","assignee":null,"assignees":[],"requested_reviewers":[{"login":"ezyang","id":13564,"node_id":"MDQ6VXNlcjEzNTY0","avatar_url":"https://avatars0.githubusercontent.com/u/13564?v=4","gravatar_id":"","url":"https://api.github.com/users/ezyang","html_url":"https://github.com/ezyang","followers_url":"https://api.github.com/users/ezyang/followers","following_url":"https://api.github.com/users/ezyang/following{/other_user}","gists_url":"https://api.github.com/users/ezyang/gists{/gist_id}","starred_url":"https://api.github.com/users/ezyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezyang/subscriptions","organizations_url":"https://api.github.com/users/ezyang/orgs","repos_url":"https://api.github.com/users/ezyang/repos","events_url":"https://api.github.com/users/ezyang/events{/privacy}","received_events_url":"https://api.github.com/users/ezyang/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1076930055,"node_id":"MDU6TGFiZWwxMDc2OTMwMDU1","url":"https://api.github.com/repos/pytorch/pytorch/labels/module:%20cuda","name":"module: cuda","color":"f7e101","default":false},{"id":912691507,"node_id":"MDU6TGFiZWw5MTI2OTE1MDc=","url":"https://api.github.com/repos/pytorch/pytorch/labels/module:%20internals","name":"module: internals","color":"f7e101","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/pytorch/pytorch/pulls/27361/commits","review_comments_url":"https://api.github.com/repos/pytorch/pytorch/pulls/27361/comments","review_comment_url":"https://api.github.com/repos/pytorch/pytorch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pytorch/pytorch/issues/27361/comments","statuses_url":"https://api.github.com/repos/pytorch/pytorch/statuses/b144d057b2211c2773f5175d07a96e3dfeea0b7f","head":{"label":"jma127:master","ref":"master","sha":"b144d057b2211c2773f5175d07a96e3dfeea0b7f","user":{"login":"jma127","id":2780434,"node_id":"MDQ6VXNlcjI3ODA0MzQ=","avatar_url":"https://avatars2.githubusercontent.com/u/2780434?v=4","gravatar_id":"","url":"https://api.github.com/users/jma127","html_url":"https://github.com/jma127","followers_url":"https://api.github.com/users/jma127/followers","following_url":"https://api.github.com/users/jma127/following{/other_user}","gists_url":"https://api.github.com/users/jma127/gists{/gist_id}","starred_url":"https://api.github.com/users/jma127/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jma127/subscriptions","organizations_url":"https://api.github.com/users/jma127/orgs","repos_url":"https://api.github.com/users/jma127/repos","events_url":"https://api.github.com/users/jma127/events{/privacy}","received_events_url":"https://api.github.com/users/jma127/received_events","type":"User","site_admin":false},"repo":{"id":212624900,"node_id":"MDEwOlJlcG9zaXRvcnkyMTI2MjQ5MDA=","name":"pytorch","full_name":"jma127/pytorch","private":false,"owner":{"login":"jma127","id":2780434,"node_id":"MDQ6VXNlcjI3ODA0MzQ=","avatar_url":"https://avatars2.githubusercontent.com/u/2780434?v=4","gravatar_id":"","url":"https://api.github.com/users/jma127","html_url":"https://github.com/jma127","followers_url":"https://api.github.com/users/jma127/followers","following_url":"https://api.github.com/users/jma127/following{/other_user}","gists_url":"https://api.github.com/users/jma127/gists{/gist_id}","starred_url":"https://api.github.com/users/jma127/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jma127/subscriptions","organizations_url":"https://api.github.com/users/jma127/orgs","repos_url":"https://api.github.com/users/jma127/repos","events_url":"https://api.github.com/users/jma127/events{/privacy}","received_events_url":"https://api.github.com/users/jma127/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jma127/pytorch","description":"Tensors and Dynamic neural networks in Python with strong GPU acceleration","fork":true,"url":"https://api.github.com/repos/jma127/pytorch","forks_url":"https://api.github.com/repos/jma127/pytorch/forks","keys_url":"https://api.github.com/repos/jma127/pytorch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jma127/pytorch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jma127/pytorch/teams","hooks_url":"https://api.github.com/repos/jma127/pytorch/hooks","issue_events_url":"https://api.github.com/repos/jma127/pytorch/issues/events{/number}","events_url":"https://api.github.com/repos/jma127/pytorch/events","assignees_url":"https://api.github.com/repos/jma127/pytorch/assignees{/user}","branches_url":"https://api.github.com/repos/jma127/pytorch/branches{/branch}","tags_url":"https://api.github.com/repos/jma127/pytorch/tags","blobs_url":"https://api.github.com/repos/jma127/pytorch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jma127/pytorch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jma127/pytorch/git/refs{/sha}","trees_url":"https://api.github.com/repos/jma127/pytorch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jma127/pytorch/statuses/{sha}","languages_url":"https://api.github.com/repos/jma127/pytorch/languages","stargazers_url":"https://api.github.com/repos/jma127/pytorch/stargazers","contributors_url":"https://api.github.com/repos/jma127/pytorch/contributors","subscribers_url":"https://api.github.com/repos/jma127/pytorch/subscribers","subscription_url":"https://api.github.com/repos/jma127/pytorch/subscription","commits_url":"https://api.github.com/repos/jma127/pytorch/commits{/sha}","git_commits_url":"https://api.github.com/repos/jma127/pytorch/git/commits{/sha}","comments_url":"https://api.github.com/repos/jma127/pytorch/comments{/number}","issue_comment_url":"https://api.github.com/repos/jma127/pytorch/issues/comments{/number}","contents_url":"https://api.github.com/repos/jma127/pytorch/contents/{+path}","compare_url":"https://api.github.com/repos/jma127/pytorch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jma127/pytorch/merges","archive_url":"https://api.github.com/repos/jma127/pytorch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jma127/pytorch/downloads","issues_url":"https://api.github.com/repos/jma127/pytorch/issues{/number}","pulls_url":"https://api.github.com/repos/jma127/pytorch/pulls{/number}","milestones_url":"https://api.github.com/repos/jma127/pytorch/milestones{/number}","notifications_url":"https://api.github.com/repos/jma127/pytorch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jma127/pytorch/labels{/name}","releases_url":"https://api.github.com/repos/jma127/pytorch/releases{/id}","deployments_url":"https://api.github.com/repos/jma127/pytorch/deployments","created_at":"2019-10-03T16:20:30Z","updated_at":"2019-10-04T05:17:35Z","pushed_at":"2019-10-04T05:17:32Z","git_url":"git://github.com/jma127/pytorch.git","ssh_url":"git@github.com:jma127/pytorch.git","clone_url":"https://github.com/jma127/pytorch.git","svn_url":"https://github.com/jma127/pytorch","homepage":"https://pytorch.org","size":241756,"stargazers_count":0,"watchers_count":0,"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,"disabled":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pytorch:master","ref":"master","sha":"42e7eb0426190e07339f03d4e6afb61b7ff5ae9c","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":"2019-10-04T17:04:58Z","pushed_at":"2019-10-04T17:08:23Z","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":"https://pytorch.org","size":242028,"stargazers_count":32061,"watchers_count":32061,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7924,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":4284,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":7924,"open_issues":4284,"watchers":32061,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/27361"},"html":{"href":"https://github.com/pytorch/pytorch/pull/27361"},"issue":{"href":"https://api.github.com/repos/pytorch/pytorch/issues/27361"},"comments":{"href":"https://api.github.com/repos/pytorch/pytorch/issues/27361/comments"},"review_comments":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/27361/comments"},"review_comment":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pytorch/pytorch/pulls/27361/commits"},"statuses":{"href":"https://api.github.com/repos/pytorch/pytorch/statuses/b144d057b2211c2773f5175d07a96e3dfeea0b7f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jma127"}}