swjng commented on issue #19558:
URL: https://github.com/apache/tvm/issues/19558#issuecomment-4457202073

   The ONNX [ArgMax spec](https://onnx.ai/onnx/operators/onnx__ArgMax.html) 
doesn't define NaN handling. ORT matches NumPy (NaN survives `>` comparisons 
and wins), but that's a reference-impl convention, not a spec requirement. 
TVM's `topi.argmax` drops NaN via the same `val > current_max` reducer — also 
self-consistent.
   
   So this is really an ORT-compatibility gap, not a spec bug. Fixable on the 
Relax ONNX frontend by substituting NaN with `+inf` before `argmax`, but worth 
deciding whether TVM wants to commit to NumPy/ORT NaN semantics here.


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