MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / XLA_TEST_F

Function XLA_TEST_F

tensorflow/compiler/xla/tests/fmax_fmin_test.cc:30–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28class FmaxSimpleTest : public ClientLibraryTestBase {};
29
30XLA_TEST_F(FmaxSimpleTest, FmaxTenValues) {
31 SetFastMathDisabled(true);
32 XlaBuilder builder(TestName());
33 auto x = ConstantR1<float>(
34 &builder, {-0.0, 1.0, 2.0, -3.0, -4.0, 5.0, 6.0, -7.0, -8.0, 9.0});
35 auto y = ConstantR1<float>(
36 &builder, {-0.0, -1.0, -2.0, 3.0, 4.0, -5.0, -6.0, 7.0, 8.0, -9.0});
37 Max(x, y);
38
39 std::vector<float> expected = {-0.0, 1.0, 2.0, 3.0, 4.0,
40 5.0, 6.0, 7.0, 8.0, 9.0};
41 ComputeAndCompareR1<float>(&builder, expected, {}, ErrorSpec(0.0001));
42}
43
44XLA_TEST_F(FmaxSimpleTest, FmaxEdgeCases) {
45 SetFastMathDisabled(true);

Callers

nothing calls this directly

Calls 5

TestNameFunction · 0.85
ErrorSpecClass · 0.70
MaxFunction · 0.50
MinFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected