| 82 | } |
| 83 | |
| 84 | xla::LiteralProto BasedTwoElementTuple(float base) { |
| 85 | auto array = xla::LiteralUtil::CreateR1<float>({base, base + 1}); |
| 86 | auto matrix = xla::LiteralUtil::CreateR2<float>( |
| 87 | {{base + 2, base + 3}, {base + 4, base + 5}}); |
| 88 | auto tuple = xla::LiteralUtil::MakeTuple({&array, &matrix}); |
| 89 | return tuple.ToProto(); |
| 90 | } |
| 91 | |
| 92 | xla::LiteralProto ScalarLiteral() { |
| 93 | auto scalar = xla::LiteralUtil::CreateR0<float>(12.0f); |