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

Function XLA_TEST_F

tensorflow/compiler/xla/tests/test_utils_test.cc:33–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31class TestUtilsTest : public LocalClientTestBase {};
32
33XLA_TEST_F(TestUtilsTest, UnusedParam) {
34 XlaBuilder builder(TestName());
35 // Make the reduction lambda.
36 Shape single_float = ShapeUtil::MakeShape(F32, {});
37 Parameter(&builder, 0, single_float, "unused");
38 Parameter(&builder, 1, single_float, "used");
39 auto computation_status = builder.Build();
40 TF_ASSERT_OK(computation_status.status());
41
42 // Make the reduction.
43 Shape pair_float = ShapeUtil::MakeShape(F32, {2});
44 Reduce(Parameter(&builder, 0, pair_float, "operand"),
45 Parameter(&builder, 1, single_float, "init"),
46 computation_status.ValueOrDie(), {0});
47 computation_status = builder.Build();
48 TF_ASSERT_OK(computation_status.status());
49
50 TF_ASSERT_OK_AND_ASSIGN(
51 auto executables, local_client_->Compile(computation_status.ValueOrDie(),
52 {&pair_float, &single_float},
53 ExecutableBuildOptions()));
54 HloModule& module =
55 const_cast<HloModule&>(executables[0]->executable()->module());
56 TF_ASSERT_OK(MakeFakeArguments(&module).status());
57}
58
59XLA_TEST_F(TestUtilsTest, MultipleIndexSpacesForDynamicSlices) {
60 auto module = ParseAndReturnVerifiedModule(

Callers

nothing calls this directly

Calls 15

TestNameFunction · 0.85
MakeShapeFunction · 0.85
MakeFakeArgumentsFunction · 0.85
ParameterFunction · 0.50
ReduceFunction · 0.50
TF_ASSERT_OK_AND_ASSIGNFunction · 0.50
EqualClass · 0.50
BuildMethod · 0.45
statusMethod · 0.45
moduleMethod · 0.45
executableMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected