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

Function TEST_F

tensorflow/compiler/xla/tests/slice_test.cc:41–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39class SliceTest : public ClientLibraryTestBase {};
40
41TEST_F(SliceTest, Slice3x3x3_To_3x3x1_F32) {
42 Array3D<float> values(3, 3, 3);
43 values.FillIota(0);
44
45 XlaBuilder builder(TestName());
46 auto original = ConstantR3FromArray3D<float>(&builder, values);
47 Slice(original, {0, 0, 0}, {3, 3, 1}, {1, 1, 1});
48
49 Array3D<float> expected{
50 {{0.0}, {3.0}, {6.0}}, {{9.0}, {12.0}, {15.0}}, {{18.0}, {21.0}, {24.0}}};
51 ComputeAndCompareR3<float>(&builder, expected, {}, ErrorSpec(0.000001));
52}
53
54TEST_F(SliceTest, Slice3x3x3_To_3x1x3_F32) {
55 Array3D<float> values(3, 3, 3);

Callers

nothing calls this directly

Calls 9

TestNameFunction · 0.85
ConstantR4FromArray4DFunction · 0.85
ConstantR2FromArray2DFunction · 0.85
FillIotaMethod · 0.80
ErrorSpecClass · 0.70
SliceFunction · 0.50
ReshapeFunction · 0.50
dataMethod · 0.45
FillRandomMethod · 0.45

Tested by

no test coverage detected