Kevin-Li-2025 opened a new pull request, #19818:
URL: https://github.com/apache/tvm/pull/19818

   ### Description
   
   Fixes #19574.
   
   ONNX `BatchNormalization` defaults `training_mode` to integer `0`, while 
Relax `nn.batch_norm` expects a boolean `training` attribute. Passing the 
integer through lets the imported op carry a non-bool training attr and can 
route default ONNX BatchNormalization through training-mode semantics instead 
of inference/running-stat semantics.
   
   This converts the ONNX attribute to `bool` before constructing 
`relax.op.nn.batch_norm`, and adds an importer-level regression test that 
verifies default ONNX BatchNormalization is imported with `training is False`.
   
   ### Tests
   
   - `python3 -m py_compile python/tvm/relax/frontend/onnx/onnx_frontend.py 
tests/python/relax/test_frontend_onnx.py`
   - Static regression check confirming the bool conversion and new frontend 
test
   - `git diff --check`
   
   The full TVM Python test cannot run in this local checkout because `tvm_ffi` 
is not built/installed.
   


-- 
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]

Reply via email to