{"action":"created","issue":{"url":"https://api.github.com/repos/pytorch/pytorch/issues/6576","repository_url":"https://api.github.com/repos/pytorch/pytorch","labels_url":"https://api.github.com/repos/pytorch/pytorch/issues/6576/labels{/name}","comments_url":"https://api.github.com/repos/pytorch/pytorch/issues/6576/comments","events_url":"https://api.github.com/repos/pytorch/pytorch/issues/6576/events","html_url":"https://github.com/pytorch/pytorch/issues/6576","id":313929953,"number":6576,"title":"[JIT] Python operations (e.g. Dropout) traced in wrong mode","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},"labels":[{"id":679953983,"url":"https://api.github.com/repos/pytorch/pytorch/labels/jit","name":"jit","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":{"login":"apaszke","id":4583066,"avatar_url":"https://avatars3.githubusercontent.com/u/4583066?v=4","gravatar_id":"","url":"https://api.github.com/users/apaszke","html_url":"https://github.com/apaszke","followers_url":"https://api.github.com/users/apaszke/followers","following_url":"https://api.github.com/users/apaszke/following{/other_user}","gists_url":"https://api.github.com/users/apaszke/gists{/gist_id}","starred_url":"https://api.github.com/users/apaszke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apaszke/subscriptions","organizations_url":"https://api.github.com/users/apaszke/orgs","repos_url":"https://api.github.com/users/apaszke/repos","events_url":"https://api.github.com/users/apaszke/events{/privacy}","received_events_url":"https://api.github.com/users/apaszke/received_events","type":"User","site_admin":false},"assignees":[{"login":"apaszke","id":4583066,"avatar_url":"https://avatars3.githubusercontent.com/u/4583066?v=4","gravatar_id":"","url":"https://api.github.com/users/apaszke","html_url":"https://github.com/apaszke","followers_url":"https://api.github.com/users/apaszke/followers","following_url":"https://api.github.com/users/apaszke/following{/other_user}","gists_url":"https://api.github.com/users/apaszke/gists{/gist_id}","starred_url":"https://api.github.com/users/apaszke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apaszke/subscriptions","organizations_url":"https://api.github.com/users/apaszke/orgs","repos_url":"https://api.github.com/users/apaszke/repos","events_url":"https://api.github.com/users/apaszke/events{/privacy}","received_events_url":"https://api.github.com/users/apaszke/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-04-13T00:22:21Z","updated_at":"2018-04-28T20:59:25Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Code example:\r\n\r\n```\r\nimport torch\r\nimport torch.nn.functional as F\r\n\r\n@torch.jit.trace(torch.zeros(1, 2, 3))\r\ndef dropout_test(x):\r\n    x = torch.neg(x)\r\n    return F.dropout(x)\r\n\r\ndropout_test(torch.zeros(1, 2, 3, requires_grad=True))\r\n```\r\n\r\nOutput:\r\n```\r\n17:20:04 ~ $ python dropoutcrash.py\r\nTraceback (most recent call last):\r\n  File \"dropoutcrash.py\", line 9, in <module>\r\n    dropout_test(torch.zeros(1, 2, 3, requires_grad=True))\r\nRuntimeError:\r\nVariableType::ID() not implemented:\r\noperation failed in interpreter:\r\n/Users/jamesreed/onnx-fairseq/pytorch/torch/nn/functional.py(555): dropout\r\ndropoutcrash.py(7): dropout_test\r\n/Users/jamesreed/onnx-fairseq/pytorch/torch/jit/__init__.py(475): wrapper\r\ndropoutcrash.py(4): <module>\r\n```\r\n\r\nDiscussed with @zdevito offline, this appears to the the tracer tracing this op in the wrong mode, and two things are incorrect:\r\n\r\n1) The `tracing_autograd_python_function` flag is set\r\n2) The op has a Handle output"},"comment":{"url":"https://api.github.com/repos/pytorch/pytorch/issues/comments/385205052","html_url":"https://github.com/pytorch/pytorch/issues/6576#issuecomment-385205052","issue_url":"https://api.github.com/repos/pytorch/pytorch/issues/6576","id":385205052,"user":{"login":"apaszke","id":4583066,"avatar_url":"https://avatars3.githubusercontent.com/u/4583066?v=4","gravatar_id":"","url":"https://api.github.com/users/apaszke","html_url":"https://github.com/apaszke","followers_url":"https://api.github.com/users/apaszke/followers","following_url":"https://api.github.com/users/apaszke/following{/other_user}","gists_url":"https://api.github.com/users/apaszke/gists{/gist_id}","starred_url":"https://api.github.com/users/apaszke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apaszke/subscriptions","organizations_url":"https://api.github.com/users/apaszke/orgs","repos_url":"https://api.github.com/users/apaszke/repos","events_url":"https://api.github.com/users/apaszke/events{/privacy}","received_events_url":"https://api.github.com/users/apaszke/received_events","type":"User","site_admin":false},"created_at":"2018-04-28T20:59:25Z","updated_at":"2018-04-28T20:59:25Z","author_association":"OWNER","body":"It used to work a few months ago, but apparently we didn't have this covered by our tests. BTW can you try rebuilding from master? It should hopefully be ok now.\r\n\r\nJust out of curiosity, what's the perf difference you got from using the JIT?"}}
{"actor":{"display_login":"apaszke"}}