| 43 | }; |
| 44 | |
| 45 | XLA_TEST_F(GatherOperationTest, TensorFlowGatherV1) { |
| 46 | const string hlo_text = R"( |
| 47 | HloModule TensorFlowGatherV1 |
| 48 | |
| 49 | ENTRY 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 | |
| 66 | XLA_TEST_F(GatherOperationTest, TensorFlowGatherV2) { |
| 67 | const string hlo_text = R"( |
nothing calls this directly
no test coverage detected