Skip to content

Conversation

@spandantiwari
Copy link

Currently ONNX constant folding (do_constant_folding=True arg in torch.onnx.export API) supports only opset 9 and 10 of ONNX. Opset 11 support was recently introduced in the ONNX exporter. For opset 11, it is currently a no-op. This change enables ONNX constant folding for opset 11. Specifically there are three main changes:

  1. Turn on constant folding ONNX pass for opset 11.
  2. Enable constant folding tests in test/onnx/test_utility_funs.py and test/onnx/test_pytorch_onnx_onnxruntime.py for opset 11.

@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Oct 31, 2019
Copy link
Member

@houseroad houseroad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@spandantiwari
Copy link
Author

Thanks @houseroad .

@houseroad
Copy link
Member

@houseroad
Copy link
Member

And other linters

@spandantiwari spandantiwari force-pushed the spandantiwari/enable_constant_fold_opset11 branch from d4b6108 to 3b7053a Compare November 5, 2019 21:34
@spandantiwari
Copy link
Author

And other linters

@houseroad - updated based on your feedback. Fixed the C++ linter issues.

@houseroad
Copy link
Member

rebase again?

@spandantiwari
Copy link
Author

rebase again?

I just rebased before submitting. I am not seeing this build failure locally. Will try again.

@spandantiwari spandantiwari force-pushed the spandantiwari/enable_constant_fold_opset11 branch from 3b7053a to a305f17 Compare November 6, 2019 01:29
@spandantiwari
Copy link
Author

Rebased and started CI again.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@houseroad merged this pull request in bc91e19.

@spandantiwari
Copy link
Author

Thanks @houseroad .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants