Check that we can safely pass an input tuple's elements to a dot operation.
| 66 | |
| 67 | // Check that we can safely pass an input tuple's elements to a dot operation. |
| 68 | XLA_TEST_F(DotOperationTest, DotOfInputTupleElem) { |
| 69 | XlaBuilder builder(TestName()); |
| 70 | |
| 71 | XlaOp param; |
| 72 | auto param_data = CreateParameterAndTransferLiteral( |
| 73 | 0, |
| 74 | LiteralUtil::MakeTupleFromSlices( |
| 75 | {LiteralUtil::CreateR2<float>({{1, 2}, {3, 4}}), |
| 76 | LiteralUtil::CreateR2<float>({{5, 6}, {7, 8}})}), |
| 77 | "arg0", &builder, ¶m); |
| 78 | auto lhs = GetTupleElement(param, 0); |
| 79 | auto rhs = GetTupleElement(param, 1); |
| 80 | Dot(lhs, rhs); |
| 81 | |
| 82 | ComputeAndCompareLiteral(&builder, |
| 83 | LiteralUtil::CreateR2<float>({{19, 22}, {43, 50}}), |
| 84 | {param_data.get()}); |
| 85 | } |
| 86 | |
| 87 | template <typename T> |
| 88 | class DotOperationTest_F16F32F64CF64 : public DotOperationTest {}; |
nothing calls this directly
no test coverage detected