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

Function XLA_TEST_F

tensorflow/compiler/xla/client/lib/slicing_test.cc:59–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59XLA_TEST_F(SlicingTest, Simple2dLookup) {
60 xla::XlaBuilder builder(TestName());
61
62 xla::XlaOp a, x, y;
63 auto a_data = CreateR2Parameter<float>(BValsRight(), 0, "a", &builder, &a);
64 auto x_data = CreateR0Parameter<int>(2, 1, "x", &builder, &x);
65 auto y_data = CreateR0Parameter<int>(1, 2, "y", &builder, &y);
66 DynamicSliceInMinorDims(a, {x, y}, {1, 1});
67
68 ComputeAndCompareR2<float>(&builder, {{10}},
69 {a_data.get(), x_data.get(), y_data.get()},
70 xla::ErrorSpec(1e-2, 1e-2));
71}
72
73XLA_TEST_F(SlicingTest, Simple3dLookup) {
74 xla::XlaBuilder builder(TestName());

Callers

nothing calls this directly

Calls 12

TestNameFunction · 0.85
DynamicSliceInMinorDimsFunction · 0.85
AValsFullFunction · 0.85
TorchGatherFunction · 0.85
TorchScatterDenseFunction · 0.85
TorchIndexSelectFunction · 0.85
MakeShapeFunction · 0.85
BValsRightFunction · 0.70
BatchedAValsFullFunction · 0.70
ErrorSpecClass · 0.50
getMethod · 0.45

Tested by

no test coverage detected