{"action":"created","issue":{"url":"https://api.github.com/repos/pytorch/pytorch/issues/13785","repository_url":"https://api.github.com/repos/pytorch/pytorch","labels_url":"https://api.github.com/repos/pytorch/pytorch/issues/13785/labels{/name}","comments_url":"https://api.github.com/repos/pytorch/pytorch/issues/13785/comments","events_url":"https://api.github.com/repos/pytorch/pytorch/issues/13785/events","html_url":"https://github.com/pytorch/pytorch/pull/13785","id":379291615,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5Nzk1MzI2","number":13785,"title":" Avoid grabbing DeviceGuard in at::empty when possible","user":{"login":"zou3519","id":5652049,"node_id":"MDQ6VXNlcjU2NTIwNDk=","avatar_url":"https://avatars3.githubusercontent.com/u/5652049?v=4","gravatar_id":"","url":"https://api.github.com/users/zou3519","html_url":"https://github.com/zou3519","followers_url":"https://api.github.com/users/zou3519/followers","following_url":"https://api.github.com/users/zou3519/following{/other_user}","gists_url":"https://api.github.com/users/zou3519/gists{/gist_id}","starred_url":"https://api.github.com/users/zou3519/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zou3519/subscriptions","organizations_url":"https://api.github.com/users/zou3519/orgs","repos_url":"https://api.github.com/users/zou3519/repos","events_url":"https://api.github.com/users/zou3519/events{/privacy}","received_events_url":"https://api.github.com/users/zou3519/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-09T19:27:17Z","updated_at":"2018-11-09T22:01:02Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/pytorch/pytorch/pulls/13785","html_url":"https://github.com/pytorch/pytorch/pull/13785","diff_url":"https://github.com/pytorch/pytorch/pull/13785.diff","patch_url":"https://github.com/pytorch/pytorch/pull/13785.patch"},"body":"Adds the following:\r\n- CudaCachingAllocator::allocate_on_device. It grabs a DeviceGuard if it\r\n  actually needs to allocate CUDA memory. If there is free room on a\r\n  block it returns that without grabbing a DeviceGuard.\r\n- Change at::empty to allocate the correct amount of memory instead of\r\n  \"allocate 0 memory and then resize it to the necessary size\".\r\n\r\nThese changes lead to a 500ns speedup for torch::empty and a 450 ns\r\nspeedup for at::empty for a cuda tensor of size (64, 2048). (1600ns ->\r\n1150ns for at::empty)\r\n\r\nThis change is stacked on top of #13741, please only review the last\r\ncommit."},"comment":{"url":"https://api.github.com/repos/pytorch/pytorch/issues/comments/437508533","html_url":"https://github.com/pytorch/pytorch/pull/13785#issuecomment-437508533","issue_url":"https://api.github.com/repos/pytorch/pytorch/issues/13785","id":437508533,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzUwODUzMw==","user":{"login":"colesbury","id":655866,"node_id":"MDQ6VXNlcjY1NTg2Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/655866?v=4","gravatar_id":"","url":"https://api.github.com/users/colesbury","html_url":"https://github.com/colesbury","followers_url":"https://api.github.com/users/colesbury/followers","following_url":"https://api.github.com/users/colesbury/following{/other_user}","gists_url":"https://api.github.com/users/colesbury/gists{/gist_id}","starred_url":"https://api.github.com/users/colesbury/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colesbury/subscriptions","organizations_url":"https://api.github.com/users/colesbury/orgs","repos_url":"https://api.github.com/users/colesbury/repos","events_url":"https://api.github.com/users/colesbury/events{/privacy}","received_events_url":"https://api.github.com/users/colesbury/received_events","type":"User","site_admin":false},"created_at":"2018-11-09T22:01:02Z","updated_at":"2018-11-09T22:01:02Z","author_association":"MEMBER","body":"This will likely have a merge conflict with https://github.com/pytorch/pytorch/pull/13751"}}
{"actor":{"display_login":"colesbury"}}