[XLA] Fix a bug in the HLO evaluator implementation of the Clamp operation.
Previously, we incorrectly convert integer values to floating point values then compute the clamped result and convert the result back to the desired type. This can lead to incorrect result when the value can't be represented by the floating point type precisely. The fix is to avoid such type conversion. Add a test case. PiperOrigin-RevId: 234169980
Loading
Please sign in to comment