MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / XLA_TEST_F

Function XLA_TEST_F

tensorflow/compiler/xla/tests/custom_call_test.cc:81–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79};
80
81XLA_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
96XLA_TEST_F(CustomCallTest, CustomCallR2F32Reduce) {
97 auto module = CreateNewVerifiedModule();

Callers

nothing calls this directly

Calls 12

TestNameFunction · 0.85
MakeShapeFunction · 0.85
AddEntryComputationMethod · 0.80
CloneWithNewOperandsMethod · 0.80
BuilderClass · 0.50
MakeLayoutFunction · 0.50
CustomCallFunction · 0.50
ExecuteFunction · 0.50
AddInstructionMethod · 0.45
BuildMethod · 0.45
getMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected