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

Function XLA_TEST_F

tensorflow/compiler/xla/client/lib/logdet_test.cc:34–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32using LogDetTest = xla::ClientLibraryTestBase;
33
34XLA_TEST_F(LogDetTest, Simple) {
35 xla::XlaBuilder builder(TestName());
36
37 xla::Array2D<float> a_vals({
38 {4, 6, 8, 10},
39 {6, 45, 54, 63},
40 {8, 54, 146, 166},
41 {10, 63, 166, 310},
42 });
43
44 float expected = 14.1601f;
45
46 xla::XlaOp a;
47 auto a_data = CreateR2Parameter<float>(a_vals, 0, "a", &builder, &a);
48 xla::LogDet(a);
49
50 ComputeAndCompareR0<float>(&builder, expected, {a_data.get()},
51 xla::ErrorSpec(1e-4));
52}
53
54XLA_TEST_F(LogDetTest, SimpleBatched) {
55 xla::XlaBuilder builder(TestName());

Callers

nothing calls this directly

Calls 4

TestNameFunction · 0.85
LogDetFunction · 0.85
ErrorSpecClass · 0.50
getMethod · 0.45

Tested by

no test coverage detected