Report an error when trying to record a mutable operator when#11129
Report an error when trying to record a mutable operator when#11129zdevito wants to merge 3 commits intopytorch:masterfrom
Conversation
facebook-github-bot
left a comment
There was a problem hiding this comment.
zdevito has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
6e22902 to
7f893bd
Compare
facebook-github-bot
left a comment
There was a problem hiding this comment.
zdevito has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
test/test_jit.py
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
torch/csrc/jit/tracer.cpp
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
torch/jit/__init__.py
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
torch/jit/__init__.py
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
7f893bd to
fa5bc31
Compare
facebook-github-bot
left a comment
There was a problem hiding this comment.
zdevito has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
zdevito has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
there are multiple views of the tensor live. Also adds recording for copy_ because this is the critical in place op where these views will cause LHS indexing to fail.
8c51785 to
37bc719
Compare
jamesr66a
left a comment
There was a problem hiding this comment.
ONNX change looks fine
facebook-github-bot
left a comment
There was a problem hiding this comment.
zdevito has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
| ss << "There are " << aliases | ||
| << " live references to the tensor being modified when tracing in-place operator " | ||
| << name << " which "; | ||
| warn(ss.str().c_str()); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Summary: there are multiple views of the tensor live. Also adds recording for copy_ because this is the critical in place op where these views will cause LHS indexing to fail. Pull Request resolved: pytorch/pytorch#11129 Differential Revision: D9600195 Pulled By: zdevito fbshipit-source-id: bfd8f5befa47377e36d704dbdb11023c608fe9a3
…h#11129) Summary: there are multiple views of the tensor live. Also adds recording for copy_ because this is the critical in place op where these views will cause LHS indexing to fail. Pull Request resolved: pytorch#11129 Differential Revision: D9600195 Pulled By: zdevito fbshipit-source-id: bfd8f5befa47377e36d704dbdb11023c608fe9a3
there are multiple views of the tensor live.
Also adds recording for copy_ because this is the critical in place
op where these views will cause LHS indexing to fail.