| 57 | } |
| 58 | |
| 59 | XLA_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 | |
| 73 | XLA_TEST_F(SlicingTest, Simple3dLookup) { |
| 74 | xla::XlaBuilder builder(TestName()); |
nothing calls this directly
no test coverage detected