[XLA] Initialize linear indices used by NearComparator.
In unoptimized builds, we'd see miscompares with insanely large indices when comparing literals containing NaN. The linear indices may never be updated/initialized if the value NaN was compared, since: (NaN > x) == false (NaN < x) == false Adds a few tests that were used when debugging, but not a perfect one for this case. It's currently not possible to test that LiteralTestUtil::Near() fails when given bad input since it uses the EXPECT_* family of macros, which would cause the intentional miscompares to fail the test no matter what. PiperOrigin-RevId: 184048275
Loading
Please sign in to comment