THINKER-ONLY opened a new pull request, #19527:
URL: https://github.com/apache/tvm/pull/19527

   ### Summary
   
   - Respect the ONNX `reduction` attribute in the Relax ONNX frontend 
`ScatterElements` converter.
   - Preserve existing default behavior by mapping missing reduction and ONNX 
`none` to Relax `update`.
   - Add focused regression coverage for opset 11 default behavior, opset 16 
`add`/`mul`, and opset 18 `none`/`min`/`max`.
   
   ### Changes
   
   - Added a shared helper to normalize and validate ONNX reduction attributes.
   - Implemented `ScatterElements` opset 16 and opset 18 converters.
   - Reused the existing `relax.op.scatter_elements(..., reduction=...)` API.
   - Reused the same reduction helper in `ScatterND` to keep behavior 
consistent.
   
   ### Test Plan
   
   - `python -m py_compile python/tvm/relax/frontend/onnx/onnx_frontend.py 
tests/python/relax/test_frontend_onnx.py`
   - `python -m pytest 
tests/python/relax/test_frontend_onnx.py::test_gather_elements 
tests/python/relax/test_frontend_onnx.py::test_scatter 
tests/python/relax/test_frontend_onnx.py::test_scatter_elements_reduction 
tests/python/relax/test_frontend_onnx.py::test_scatter_nd -q`
   
   ### Issue
   
   Fixes #19435
   
   ## Local Verification Notes
   
   - WSL conda environment: `/home/thinker/.cache/tvm-conda-onnx`
   - TVM build directory: `/home/thinker/.cache/tvm-build-onnx`
   - LLVM runtime check: `tvm.runtime.enabled("llvm") == True`
   - Relevant ONNX frontend subset: `14 passed, 4 skipped, 1 warning`
   - Full `tests/python/relax/test_frontend_onnx.py` was also attempted. It 
currently has 14 failures in unrelated `Reduce* axes input` and `TopK` tests; 
running the same selected failures against `origin/main` reproduces them, so 
they are not introduced by this PR.
   
   


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