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

Function XLA_TEST_F

tensorflow/compiler/xla/tests/gather_operation_test.cc:45–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43};
44
45XLA_TEST_F(GatherOperationTest, TensorFlowGatherV1) {
46 const string hlo_text = R"(
47HloModule TensorFlowGatherV1
48
49ENTRY main {
50 operand = s32[3,3] parameter(0)
51 indices = s32[2] parameter(1)
52 ROOT gather = s32[2,3] gather(operand, indices),
53 offset_dims={1},
54 collapsed_slice_dims={0},
55 start_index_map={0},
56 index_vector_dim=1,
57 slice_sizes={1, 3}
58}
59)";
60 Literal operand =
61 LiteralUtil::CreateR2<int32>({{1, 2, 3}, {4, 5, 6}, {7, 8, 9}});
62 Literal start_indices = LiteralUtil::CreateR1<int32>({0, 2});
63 RunTest(hlo_text, &operand, &start_indices);
64}
65
66XLA_TEST_F(GatherOperationTest, TensorFlowGatherV2) {
67 const string hlo_text = R"(

Callers

nothing calls this directly

Calls 10

MakeShapeFunction · 0.85
ExecuteParallelMethod · 0.80
RunTestFunction · 0.50
ParameterFunction · 0.50
GatherFunction · 0.50
TF_ASSERT_OK_AND_ASSIGNFunction · 0.50
TransferToServerMethod · 0.45
GetDeviceHandlesMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected