[ONNX] Use structural checks for composite frontend tests#19880
Open
tlopex wants to merge 7 commits into
Open
Conversation
Contributor
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
639a001 to
67cc90d
Compare
Replace heavy ONNX frontend integration checks for composite/importer-only paths with structural IR assertions while keeping core Relax op numerical correctness coverage.
67cc90d to
f050860
Compare
76b284f to
34a2153
Compare
Convert heavyweight ONNX frontend integration-style checks for composite importer behavior to explicit structural IR checks while preserving core Relax op correctness coverage. Validation: pre-commit run --files tests/python/relax/test_frontend_onnx.py; pytest -k composite_reduce_funcs; pytest -k 'slice or split or tile or test_pool or pad or grid_sample or matmulinteger'.
5f98229 to
92ced08
Compare
Replace most generated TVMScript source strings in ONNX frontend structural tests with direct @I.ir_module definitions that capture shapes, ops, and attributes from the enclosing Python scope. Keep the remaining composite reduce source generation because it still needs to vary the function signature and body across axes-as-input and composite-op cases.
92ced08 to
db8fcfd
Compare
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.
in order to avoid running heavyweight ORT/VM integration checks for ONNX frontend tests, this pr uses tvm.ir.assert_structural_equal for composite ONNX frontend lowerings built from multiple Relax ops, plus IR-specific importer behavior such as control flow, sequence/optional handling, symbolic shapes, and dynamic lowering details
We keep check_correctness for direct Relax core-op mappings and tests that explicitly cover numerical behavior or edge cases.
This keeps frontend PR tests focused on cheaper structural verification while preserving numerical coverage where the test is actually about Relax op correctness or frontend numerical behavior.