Skip to content

[Frontend][ONNX] Fix structural tests for TVMScript checks - #19894

Merged
tqchen merged 1 commit into
apache:mainfrom
tlopex:tlopex/fix-onnx-tvmscript-well-formed-main
Jun 27, 2026
Merged

[Frontend][ONNX] Fix structural tests for TVMScript checks#19894
tqchen merged 1 commit into
apache:mainfrom
tlopex:tlopex/fix-onnx-tvmscript-well-formed-main

Conversation

@tlopex

@tlopex tlopex commented Jun 26, 2026

Copy link
Copy Markdown
Member

This pr is the follow-up pr of #19880. This pr updates ONNX frontend structural tests to match the current Relax/TVMScript
semantics on main.

The previous expected IR still used "void" as the default dtype marker for ops such as matmul, cumsum, and zeros_like. After the Relax optional-dtype cleanup, those defaults should be represented by omitting the dtype argument, which makes CI crash

Also update the dynamic-shape squeeze structural check to build the expected Relax IR programmatically, because TVMScript currently cannot round-trip the SizeVar dataflow binding printed by the importer.

@tlopex tlopex changed the title [Relax][ONNX] Fix structural tests for TVMScript checks [Frontend][ONNX] Fix structural tests for TVMScript checks Jun 26, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request simplifies various Relax operator calls in the ONNX frontend tests by removing redundant dtype="void" and out_dtype="void" arguments. It also refactors test_dynamic_shape_squeeze to programmatically construct the expected IR module to bypass a TVMScript round-trip limitation with SizeVar dataflow bindings. However, the refactored test contains critical errors: it incorrectly references tvm.tirx instead of tvm.tir.SizeVar, and incorrectly uses relax.TensorType with shape lists instead of relax.TensorStructInfo, which will cause runtime failures.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread tests/python/relax/test_frontend_onnx.py
@tqchen
tqchen merged commit b00b85b into apache:main Jun 27, 2026
11 of 12 checks passed
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.

2 participants