llvm-project
95d526f7 - [MLIR][Tosa] Fix argmax NaN propagate lowering (#133074)

Commit
248 days ago
[MLIR][Tosa] Fix argmax NaN propagate lowering (#133074) In the propagate mode, NaN compare equal to each other so in case of several NaNs the index of the first one needs to be returned. This commit changes the index update condition to check that the current index is not that of a NaN. The commit also simplifies argmax NaN ignore lowering to only use OGT. This prevent any update in case of NaN. The only case where the index of a NaN is returned is when all values are NaN and this is covered by the fact that the initial index value is 0 so no update will result in 0 being returned.
Author
Parents
Loading