hahalfx opened a new pull request, #20091: URL: https://github.com/apache/tvm/pull/20091
Fixes #20066. When `keep_params_in_input=True`, ONNX initializers are represented as Relax function parameters while their values remain in the importer parameter map. `Split._impl_v13` only accepted `relax.Constant`, so it incorrectly rejected a static initializer as a dynamic Split input. This change resolves the Split input through the existing `get_constant` helper before computing the split indices. Genuinely dynamic Split inputs remain unsupported and continue to raise the existing error. The regression test imports an opset-13 model with initializer-backed split sizes and verifies both the stored parameter value and the generated Relax IR. ### Testing - `cmake --build build --parallel 8` - `python -m pytest tests/python/relax/test_frontend_onnx.py::test_split_initializer_with_params_in_input tests/python/relax/test_frontend_onnx.py::test_split -xvs` — 2 passed - `pre-commit run --files python/tvm/relax/frontend/onnx/onnx_frontend.py tests/python/relax/test_frontend_onnx.py` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
