| 79 | }; |
| 80 | |
| 81 | XLA_TEST_F(CustomCallTest, CustomCallR0F32Add2) { |
| 82 | auto module = CreateNewVerifiedModule(); |
| 83 | auto builder = HloComputation::Builder(TestName()); |
| 84 | |
| 85 | auto constant = builder.AddInstruction( |
| 86 | HloInstruction::CreateConstant(LiteralUtil::CreateR0<float>(42.0f))); |
| 87 | builder.AddInstruction( |
| 88 | HloInstruction::CreateCustomCall(r0f32_, {constant}, "R0F32Add2")); |
| 89 | |
| 90 | module->AddEntryComputation(builder.Build()); |
| 91 | |
| 92 | Literal result = ExecuteAndTransfer(std::move(module), {}); |
| 93 | LiteralTestUtil::ExpectR0Near<float>(44.0f, result, error_spec_); |
| 94 | } |
| 95 | |
| 96 | XLA_TEST_F(CustomCallTest, CustomCallR2F32Reduce) { |
| 97 | auto module = CreateNewVerifiedModule(); |
nothing calls this directly
no test coverage detected