| 119 | } |
| 120 | |
| 121 | xla::LiteralProto FloatMatrix( |
| 122 | std::initializer_list<std::initializer_list<float>> v, |
| 123 | const xla::Layout& layout) { |
| 124 | auto array = xla::LiteralUtil::CreateR2WithLayout<float>(v, layout); |
| 125 | return array.ToProto(); |
| 126 | } |
| 127 | |
| 128 | xla::Literal ReadOutputLiteral(const std::vector<Tensor>& outputs, size_t idx) { |
| 129 | xla::LiteralProto response; |