Tuples/Lists can now be inputs/outputs to script and other simple fixes.#10812
Tuples/Lists can now be inputs/outputs to script and other simple fixes.#10812zdevito wants to merge 7 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.
apaszke
left a comment
There was a problem hiding this comment.
LGTM, but there are a few suspicious things.
test/test_jit.py
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
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.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
torch/csrc/jit/pybind_utils.h
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/script/module.h
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.
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.
prevent linear algebra functions from being run in shape prop because they frequently will error out for nonsense data. favor schema-driven python input conversion where possible. remaining cases where we directly create Stacks without schema are only for debugging
* Since tuples are not supported we only lower TupleUnpack(TupleConstruct()) pairs. Other lowers are not always a performance win and are no longer necessary for correctness. * Clean up in the compiler removes a lot of unneeded isTensor checks and other restrictions
* improve tests * restore full tuple removal for onnx
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.
jamesr66a
left a comment
There was a problem hiding this comment.
ONNX changes look functionally equivalent so LGTM
…es. (pytorch#10812) Summary: * Fix the necessary pathways so that tuples and lists can be inputs to the script. * prevent linear algebra functions from being run in shape prop because they frequently will error out for nonsense data. * favor schema-driven python input conversion where possible. remaining cases where we directly create Stacks without schema are only for debugging * Make the error messages when calling script/trace functions more pythonic * Simplify FlattenTuples -- now that tuples are supported we can choose to only flatten tuples when needed. This may have to be revisited pending onnx test results, but is necessary for making tuple io work. Pull Request resolved: pytorch#10812 Differential Revision: D9477982 Pulled By: zdevito fbshipit-source-id: ed06fc426e6ef6deb404602a26c435a7fc40ea0c
Fix the necessary pathways so that tuples and lists can be inputs to the script.
prevent linear algebra functions from being run in shape prop because
they frequently will error out for nonsense data.
favor schema-driven python input conversion where possible.
remaining cases where we directly create Stacks without schema are
only for debugging
Make the error messages when calling script/trace functions more pythonic
Simplify FlattenTuples -- now that tuples are supported we can choose to only flatten tuples when needed. This may have to be revisited pending onnx test results, but is necessary for making tuple io work.