Skip to content

Enhance shape inference in ONNXIFI transformer#12685

Closed
yinghai wants to merge 1 commit intopytorch:masterfrom
yinghai:export-D10390164
Closed

Enhance shape inference in ONNXIFI transformer#12685
yinghai wants to merge 1 commit intopytorch:masterfrom
yinghai:export-D10390164

Conversation

@yinghai
Copy link
Copy Markdown
Contributor

@yinghai yinghai commented Oct 15, 2018

Summary:
In this diff, we push the fake run of the net into the ONNXIFI transformer, because

  1. We cannot do shape inference for every op
  2. Since the net has been SSA rewritten, we cannot use shape info from outer workspace directly.

In addition, this diff adds input shape info when querying the onnxBackendCompatibility function.

Differential Revision: D10390164

Comment thread caffe2/python/pybind_state.cc Outdated

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

Comment thread caffe2/python/onnx/test_onnxifi.py Outdated

This comment was marked as off-topic.

Comment thread caffe2/opt/backend_cutting.cc Outdated

This comment was marked as off-topic.

Comment thread caffe2/opt/onnxifi_transformer.cc Outdated

This comment was marked as off-topic.

This comment was marked as off-topic.

@yinghai
Copy link
Copy Markdown
Contributor Author

yinghai commented Oct 16, 2018

@bddppq Addressed comments.

Summary:
Pull Request resolved: pytorch#12685

In this diff, we push the fake run of the net into the ONNXIFI transformer, because
1. We cannot do shape inference for every op
2. Since the net has been SSA rewritten, we cannot use shape info from outer workspace directly.

In addition, this diff adds input shape info when querying the `onnxBackendCompatibility` function.

Differential Revision: D10390164

fbshipit-source-id: afb48738f790858dc33255bd3ea0065f3b2797d8
@yinghai yinghai deleted the export-D10390164 branch October 16, 2018 21:54
@ezyang ezyang added the merged label Jun 25, 2019
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
Pull Request resolved: pytorch#12685

In this diff, we push the fake run of the net into the ONNXIFI transformer, because
1. We cannot do shape inference for every op
2. Since the net has been SSA rewritten, we cannot use shape info from outer workspace directly.

In addition, this diff adds input shape info when querying the `onnxBackendCompatibility` function.

Reviewed By: bddppq

Differential Revision: D10390164

fbshipit-source-id: 80475444da2170c814678ed0ed3298e28a1fba92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants