LudovicoYIN opened a new pull request, #18879:
URL: https://github.com/apache/tvm/pull/18879

   ## Summary
   
   Reject non-floating inputs for trig-style TIR unary ops.
   
   ## Changes
   
   - reject non-floating inputs for trig-style TIR unary ops such as `tan`, 
`sin`, and `cos`
   - add the same dtype check in the Python TIR wrapper so `topi.tan(int32)` 
fails early with a clear `TypeError`
   - add regression tests for `tvm.tir.tan(int32)` and `topi.tan(int32)`
   
   ## Validation
   
   - `tests/python/tir-base/test_tir_constructor.py -k 
'math_unary_constructor_requires_float_dtype or topi_tan_requires_float_dtype' 
-q`
   - local repro for the original `where -> tan(int32)` case now fails early 
with `TypeError`
   - verified `topi.tan(float32)` still builds with `target="llvm"`
   
   ## Issue
   
   Fixes #18769


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