[Caffe2] Support new Reshape semantics#10848
Closed
yinghai wants to merge 2 commits intopytorch:masterfrom
Closed
Conversation
houseroad
reviewed
Aug 24, 2018
caffe2/onnx/onnx_exporter.cc
Outdated
| if (legacy_mode_) { | ||
| attrs.emplace_back(MakeAttribute("broadcast", 1)); | ||
| } | ||
| attrs.emplace_back(MakeAttribute("broadcast", 1)); |
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.
Contributor
facebook-github-bot
left a comment
There was a problem hiding this comment.
yinghai has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Contributor
Author
|
Rocm failure is due to infra error. |
houseroad
approved these changes
Aug 24, 2018
PenghuiCheng
pushed a commit
to PenghuiCheng/pytorch
that referenced
this pull request
Sep 11, 2018
Summary: Since ONNX opset version >5, Reshape changed semantics to take a shape tensor as input instead of relying on `shape` attribute to decide what shape to reshape to. ONNXIFI op has been postponing this change as some of the backends such as TensorRT were not ready. Now that the backends have adopted this semantics, we can remove the legacy mode and output opset version 7 ONNX models. This change also flushes out some of the bugs and new requirement. - Converting shape info into int64 tensor - Fix a bug when we output the shape tensor in the mapped workspace instead of the original workspace Pull Request resolved: pytorch#10848 Reviewed By: houseroad Differential Revision: D9495121 Pulled By: yinghai fbshipit-source-id: a6f44a89274c35b33fae9a429813ebf21d9a3d1a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since ONNX opset version >5, Reshape changed semantics to take a shape tensor as input instead of relying on
shapeattribute to decide what shape to reshape to. ONNXIFI op has been postponing this change as some of the backends such as TensorRT were not ready. Now that the backends have adopted this semantics, we can remove the legacy mode and output opset version 7 ONNX models.This change also flushes out some of the bugs and new requirement.