-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
[ONNX] Skip assertion nodes #126889
[ONNX] Skip assertion nodes #126889
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/126889
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 12 Unrelated FailuresAs of commit 62c56bf with merge base bdc39ee (): NEW FAILURE - The following job has failed:
UNSTABLE - The following jobs failed but were likely due to flakiness present on trunk and has been marked as unstable:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: Not merging any PRs at the moment because there is a merge blocking https://github.com/pytorch/pytorch/labels/ci:%20sev issue open at: Details for Dev Infra teamRaised by workflow job |
@pytorchbot merge |
Merge failedReason: Approvers from one of the following sets are needed:
|
@pytorchbot rebase |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Successfully rebased |
1a46c28
to
eda75cc
Compare
test/test_public_bindings.py
Outdated
@@ -309,6 +309,7 @@ def test_modules_can_be_imported(self): | |||
"torch.onnx._internal.fx.op_validation", | |||
"torch.onnx._internal.fx.passes", | |||
"torch.onnx._internal.fx.passes._utils", | |||
"torch.onnx._internal.fx.passes.assertion_removal", |
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.
Adding new entries here is highly discouraged as it means that trying to "import" this module leads to a hard crash.
You should consider making the module importable from generic configs (in this case the based cpu image in CI).
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.
Thanks! I just found that the very same problem happened before: #117314, and what is happened is #117314 (comment). I wonder if there is a better way to do this. @xadupre @malfet
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.
The goal of this test is to make sure that every module is importable, i.e. it does not rely on any implicit imports.
Is there a good reason why this should not be the case for this module. If it depends on some non-PyTorch package, it's totally fine to add it as dependency to requirements-ci.txt
@pytorchbot rebase |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Successfully rebased |
eda75cc
to
4f39494
Compare
@pytorchbot rebase |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Successfully rebased |
4f39494
to
a8bc3d1
Compare
a8bc3d1
to
62c56bf
Compare
Continue from #125930
The PR addresses the common existence of unused assertion nodes in models. (workaround #112443)
Assertion ops does not return anything in the graph, so it's not even an no-op in ONNX:
pytorch/aten/src/ATen/native/native_functions.yaml
Line 173 in d4ec18b
pytorch/aten/src/ATen/native/native_functions.yaml
Line 200 in d4ec18b
This pass can be extended when we see more and more none-return ops in FX.