| 104 | } |
| 105 | |
| 106 | xla::LiteralProto MakeTuple0() { |
| 107 | auto scalar = xla::LiteralUtil::CreateR0<float>(12.0f); |
| 108 | auto array = xla::LiteralUtil::CreateR1<float>({1.0f, 3.0f}); |
| 109 | auto matrix = xla::LiteralUtil::CreateR2({{4, 5}, {6, 7}}); |
| 110 | auto tuple = xla::LiteralUtil::MakeTuple({&array, &matrix}); |
| 111 | auto nested0 = xla::LiteralUtil::MakeTuple({&scalar, &tuple}); |
| 112 | auto nested1 = xla::LiteralUtil::MakeTuple({&scalar, &nested0}); |
| 113 | return nested1.ToProto(); |
| 114 | } |
| 115 | |
| 116 | xla::LiteralProto FloatVector(absl::Span<const float> v) { |
| 117 | auto array = xla::LiteralUtil::CreateR1<float>(v); |