Lunderberg commented on issue #17247:
URL: https://github.com/apache/tvm/issues/17247#issuecomment-2272079994
Looks like the test case can be made even simpler, and isn't limited to
`RemoveUnusedOutputs`. The root cause is that `StructuralEqual` compared TIR
floats by checking `abs(lhs-rhs) < 1e9`, which always evaluates to false for
`NaN` values.
```python
@T.prim_func(private=True)
def func_1():
return T.float32("nan")
@T.prim_func(private=True)
def func_2():
return T.float32("nan")
tvm.ir.assert_structural_equal(func_1, func_2)
```
I've implemented #17249 which should fix this issue, by having
`StructuralEqual` and `StructuralHash` have special handling to compare `NaN`
values.
--
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]