Skip to content

[ONNX] Use structural checks for composite frontend tests#19880

Open
tlopex wants to merge 7 commits into
apache:mainfrom
tlopex:tlopex/onnx-frontend-tests-clean
Open

[ONNX] Use structural checks for composite frontend tests#19880
tlopex wants to merge 7 commits into
apache:mainfrom
tlopex:tlopex/onnx-frontend-tests-clean

Conversation

@tlopex

@tlopex tlopex commented Jun 24, 2026

Copy link
Copy Markdown
Member

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.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@tlopex tlopex marked this pull request as draft June 24, 2026 07:34
@tlopex tlopex marked this pull request as ready for review June 24, 2026 17:52
@tlopex tlopex force-pushed the tlopex/onnx-frontend-tests-clean branch 10 times, most recently from 639a001 to 67cc90d Compare June 25, 2026 00:47
Replace heavy ONNX frontend integration checks for composite/importer-only paths with structural IR assertions while keeping core Relax op numerical correctness coverage.
@tlopex tlopex force-pushed the tlopex/onnx-frontend-tests-clean branch from 67cc90d to f050860 Compare June 25, 2026 01:23
@tlopex tlopex force-pushed the tlopex/onnx-frontend-tests-clean branch from 76b284f to 34a2153 Compare June 25, 2026 17:53
tlopex added 4 commits June 25, 2026 15:37
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'.
@tlopex tlopex force-pushed the tlopex/onnx-frontend-tests-clean branch from 5f98229 to 92ced08 Compare June 26, 2026 03:24
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.
@tlopex tlopex force-pushed the tlopex/onnx-frontend-tests-clean branch from 92ced08 to db8fcfd Compare June 26, 2026 04:13
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.

1 participant