| 181 | } |
| 182 | |
| 183 | XLA_TEST_F(MapTest, MapEachElemPlusOneR1S0) { |
| 184 | // Maps (lambda (x) (+ x 1)) onto an input R1F32 vector of length 0. |
| 185 | XlaBuilder builder(TestName()); |
| 186 | Literal param0_literal = LiteralUtil::CreateR1<float>({}); |
| 187 | std::unique_ptr<GlobalData> param0_data = |
| 188 | client_->TransferToServer(param0_literal).ConsumeValueOrDie(); |
| 189 | |
| 190 | auto param = Parameter(&builder, 0, param0_literal.shape(), "param0"); |
| 191 | Map(&builder, {param}, CreateAdderToOne(), {0}); |
| 192 | |
| 193 | ComputeAndCompareR1<float>(&builder, {}, {param0_data.get()}, |
| 194 | ErrorSpec(0.01f)); |
| 195 | } |
| 196 | |
| 197 | TEST_F(MapTest, MapEachElemPlusOneR1S4) { |
| 198 | // Maps (lambda (x) (+ x 1)) onto an input R1F32 vector of length 4. |
nothing calls this directly
no test coverage detected