Record tensor factory functions in trace#10935
Record tensor factory functions in trace#10935zdevito wants to merge 9 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.
da44256 to
ba1a22a
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.
apaszke
left a comment
There was a problem hiding this comment.
Mostly LGTM, but we should make sure we don't embed large short-lived tensors as constants into our traces.
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.
tools/autograd/gen_variable_type.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.
torch/csrc/jit/python_ir.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.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
torch/onnx/utils.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.
be1d4fc to
3bbb929
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.
0500c9a to
41cd61c
Compare
Things like torch.zeros now appear in traces rather than constants. To continue to support our current level of ONNX export, we run constant prop to turn these back into constants where possible before export.
Constant prop needs to work on prim::ListConstruct even when the list has 0 elements.
41cd61c to
e84aac2
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.
make sure constant prop doesnt try to execute them
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.
|
@pytorchbot retest this please |
Summary: Things like torch.zeros now appear in traces rather than constants. To continue to support our current level of ONNX export, we run constant prop to turn these back into constants where possible before export. Pull Request resolved: pytorch#10935 Differential Revision: D9527427 Pulled By: zdevito fbshipit-source-id: 552a8bcc01b911251dab7d7026faafdd7a3c758a
Things like torch.zeros now appear in traces rather than constants.
To continue to support our current level of ONNX export, we run
constant prop to turn these back into constants where possible before
export.