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

Function XLA_TEST_F

tensorflow/compiler/xla/tests/cholesky_test.cc:39–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37using CholeskyTest = ClientLibraryTestBase;
38
39XLA_TEST_F(CholeskyTest, NonPSDInput) {
40 XlaBuilder builder(TestName());
41
42 Array2D<float> a_vals({
43 {1, 1, 1},
44 {1, 1, 1},
45 {1, 1, 1},
46 });
47
48 XlaOp a;
49 auto a_data = CreateR2Parameter<float>(a_vals, 0, "a", &builder, &a);
50 Cholesky(a, /*lower=*/true);
51
52 float nan = std::numeric_limits<float>::quiet_NaN();
53 Array2D<float> expected({
54 {nan, nan, nan},
55 {nan, nan, nan},
56 {nan, nan, nan},
57 });
58
59 ComputeAndCompareR2<float>(&builder, expected, {a_data.get()},
60 ErrorSpec(1e-4, 1e-4));
61}
62
63XLA_TEST_F(CholeskyTest, Lower) {
64 XlaBuilder builder(TestName());

Callers

nothing calls this directly

Calls 6

TestNameFunction · 0.85
LowerTriangleFunction · 0.85
UpperTriangleFunction · 0.85
ErrorSpecClass · 0.70
CholeskyFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected