| 39 | class CopyOpTest : public HloTestBase { |
| 40 | protected: |
| 41 | void TestCopyOp(const Literal& literal) { |
| 42 | auto builder = HloComputation::Builder(TestName()); |
| 43 | auto constant = |
| 44 | builder.AddInstruction(HloInstruction::CreateConstant(literal.Clone())); |
| 45 | builder.AddInstruction(HloInstruction::CreateUnary( |
| 46 | constant->shape(), HloOpcode::kCopy, constant)); |
| 47 | auto computation = builder.Build(); |
| 48 | auto module = CreateNewVerifiedModule(); |
| 49 | module->AddEntryComputation(std::move(computation)); |
| 50 | |
| 51 | Literal result = ExecuteAndTransfer(std::move(module), {}); |
| 52 | EXPECT_TRUE(LiteralTestUtil::Equal(literal, result)); |
| 53 | } |
| 54 | |
| 55 | void TestCopyConstantLayout021(size_t n1, size_t n2, size_t n3); |
| 56 | void TestCopyConstantLayoutR4(size_t n1, size_t n2, size_t n3, size_t n4, |
nothing calls this directly
no test coverage detected