New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ONNX operator_export_type on the new registry #87735
Fix ONNX operator_export_type on the new registry #87735
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/87735
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 FailuresAs of commit 14ec6aa: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
41e5234
to
06dc424
Compare
torch/onnx/utils.py
Outdated
# Direct ATen export requested | ||
# For BUILD_CAFFE2=0 builds, if domain=="aten" and operator_export_type==ONNX_ATEN, | ||
# an aten::ATen operator is created regardless of symbolics existence | ||
# For BUILD_CAFFE2=1, the same applies only if there is no symbolic available |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to the CI failure on test_py_diagnose_emits_error
, where it expects a operator_supported_in_newer_opset_version
error for aten::diagonal
when exporting in opset 9. After this change, the error was not thrown, and aten::diagonal
is exported as aten::ATen(...)
. The operator_export_type
of export
is the default _C_onnx.OperatorExportTypes.ONNX
.
Is this behavior expected, for BUILD_CAFFE2=1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, there was a failure in the logic. Thanks for catching this
Some test failures
|
4379d65
to
ea89404
Compare
@BowenBao all tests are passing now |
ea89404
to
ae7b749
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚢
Signed-off-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
ae7b749
to
14ec6aa
Compare
@pytorchbot merge -g |
Merge startedYour change will be merged once all checks on your PR pass since you used the green (-g) flag (ETA: 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: The following mandatory check(s) failed (Rule Dig deeper by viewing the failures on hud Details for Dev Infra teamRaised by workflow job |
@pytorchbot merge -f "macos pipeline failed due to aborted artifact upload" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Follow-up for pytorch#87735 Once again, because BUILD_CAFFE2=0 is not tested for ONNX exporter, one scenario slipped through. A use case where the model can be exported without aten fallback when operator_export_type=ONNX_ATEN_FALLBACK and BUILD_CAFFE2=0 A new unit test has been added, but it won't prevent regressions if BUILD_CAFFE2=0 is not executed on CI again
Fixes pytorch#87313 Our ONNX pipelines do not run with BUILD_CAFFE2=0, so tests for operator_export_type ONNX_ATEN and ONNX_ATEN_FALLBACK will not be fully tested, allowing regressions to happen again. We need to run the same set of tests for both BUILD_CAFFE2=0 and 1 Pull Request resolved: pytorch#87735 Approved by: https://github.com/AllenTiTaiWang, https://github.com/BowenBao
Follow-up for pytorch#87735 Once again, because BUILD_CAFFE2=0 is not tested for ONNX exporter, one scenario slipped through. A use case where the model can be exported without aten fallback when operator_export_type=ONNX_ATEN_FALLBACK and BUILD_CAFFE2=0 A new unit test has been added, but it won't prevent regressions if BUILD_CAFFE2=0 is not executed on CI again
Follow-up for #87735 Once again, because BUILD_CAFFE2=0 is not tested for ONNX exporter, one scenario slipped through. A use case where the model can be exported without aten fallback when operator_export_type=ONNX_ATEN_FALLBACK and BUILD_CAFFE2=0 A new unit test has been added, but it won't prevent regressions if BUILD_CAFFE2=0 is not executed on CI again Fixes #87313 Pull Request resolved: #88504 Approved by: https://github.com/justinchuby, https://github.com/BowenBao
#84382 was the base PR that replaced the "old" implementation for onnx symbolic registry, leading to a regression on 1.13 that was fixed by this PR |
CONFLICT (content): Merge conflict in test/onnx/test_pytorch_onnx_no_runtime.py Adding test/functorch error: could not apply 2aed670... Fix ONNX operator_export_type on the new registry (pytorch#87735)
CONFLICT (content): Merge conflict in test/onnx/test_pytorch_onnx_no_runtime.py Adding test/functorch error: could not apply 2aed670... Fix ONNX operator_export_type on the new registry (pytorch#87735)
Fixes pytorch#87313 Our ONNX pipelines do not run with BUILD_CAFFE2=0, so tests for operator_export_type ONNX_ATEN and ONNX_ATEN_FALLBACK will not be fully tested, allowing regressions to happen again. We need to run the same set of tests for both BUILD_CAFFE2=0 and 1 Pull Request resolved: pytorch#87735 Approved by: https://github.com/AllenTiTaiWang, https://github.com/BowenBao (cherry picked from commit 2aed670)
Fixes #87313 Our ONNX pipelines do not run with BUILD_CAFFE2=0, so tests for operator_export_type ONNX_ATEN and ONNX_ATEN_FALLBACK will not be fully tested, allowing regressions to happen again. We need to run the same set of tests for both BUILD_CAFFE2=0 and 1 Pull Request resolved: #87735 Approved by: https://github.com/AllenTiTaiWang, https://github.com/BowenBao (cherry picked from commit 2aed670) Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
Follow-up for pytorch#87735 Once again, because BUILD_CAFFE2=0 is not tested for ONNX exporter, one scenario slipped through. A use case where the model can be exported without aten fallback when operator_export_type=ONNX_ATEN_FALLBACK and BUILD_CAFFE2=0 A new unit test has been added, but it won't prevent regressions if BUILD_CAFFE2=0 is not executed on CI again Fixes pytorch#87313 Pull Request resolved: pytorch#88504 Approved by: https://github.com/justinchuby, https://github.com/BowenBao (cherry picked from commit 5f0783b)
Follow-up for pytorch#87735 Once again, because BUILD_CAFFE2=0 is not tested for ONNX exporter, one scenario slipped through. A use case where the model can be exported without aten fallback when operator_export_type=ONNX_ATEN_FALLBACK and BUILD_CAFFE2=0 A new unit test has been added, but it won't prevent regressions if BUILD_CAFFE2=0 is not executed on CI again Fixes pytorch#87313 Pull Request resolved: pytorch#88504 Approved by: https://github.com/justinchuby, https://github.com/BowenBao (cherry picked from commit 5f0783b)
Follow-up for pytorch#87735 Once again, because BUILD_CAFFE2=0 is not tested for ONNX exporter, one scenario slipped through. A use case where the model can be exported without aten fallback when operator_export_type=ONNX_ATEN_FALLBACK and BUILD_CAFFE2=0 A new unit test has been added, but it won't prevent regressions if BUILD_CAFFE2=0 is not executed on CI again Fixes pytorch#87313 Pull Request resolved: pytorch#88504 Approved by: https://github.com/justinchuby, https://github.com/BowenBao (cherry picked from commit 5f0783b)
* Fix ATen Fallback for BUILD_CAFFE2=0 for ONNX-only ops (#88504) Follow-up for #87735 Once again, because BUILD_CAFFE2=0 is not tested for ONNX exporter, one scenario slipped through. A use case where the model can be exported without aten fallback when operator_export_type=ONNX_ATEN_FALLBACK and BUILD_CAFFE2=0 A new unit test has been added, but it won't prevent regressions if BUILD_CAFFE2=0 is not executed on CI again Fixes #87313 Pull Request resolved: #88504 Approved by: https://github.com/justinchuby, https://github.com/BowenBao (cherry picked from commit 5f0783b) * Update test/onnx/test_pytorch_onnx_no_runtime.py Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com> * Update test/onnx/test_pytorch_onnx_no_runtime.py Fix linter * Update test/onnx/test_pytorch_onnx_no_runtime.py Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com> * fix lint warnings Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com> Co-authored-by: Andrey Talman <atalman@fb.com>
Fixes pytorch#87313 Our ONNX pipelines do not run with BUILD_CAFFE2=0, so tests for operator_export_type ONNX_ATEN and ONNX_ATEN_FALLBACK will not be fully tested, allowing regressions to happen again. We need to run the same set of tests for both BUILD_CAFFE2=0 and 1 Pull Request resolved: pytorch#87735 Approved by: https://github.com/AllenTiTaiWang, https://github.com/BowenBao
Follow-up for pytorch#87735 Once again, because BUILD_CAFFE2=0 is not tested for ONNX exporter, one scenario slipped through. A use case where the model can be exported without aten fallback when operator_export_type=ONNX_ATEN_FALLBACK and BUILD_CAFFE2=0 A new unit test has been added, but it won't prevent regressions if BUILD_CAFFE2=0 is not executed on CI again Fixes pytorch#87313 Pull Request resolved: pytorch#88504 Approved by: https://github.com/justinchuby, https://github.com/BowenBao
Fixes #87313
Pytorch's ONNX pipelines do not run with
BUILD_CAFFE2=0
, so tests foroperator_export_type==ONNX_ATEN
orONNX_ATEN_FALLBACK
are not fully tested, which caused this regression to the core feature of ONNX exporter: ONNX ATen fallback.This PR fixes this regression, but we discuss with Meta on how to use only
BUILD_CAFFE2=0
builds instead of ``BUILD_CAFFE2=1`