[Frontend][ONNX] Fix structural tests for TVMScript checks - #19894
Conversation
There was a problem hiding this comment.
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.
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 crashAlso 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.