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

Function TEST_F

tensorflow/compiler/xla/tests/map_test.cc:169–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167};
168
169TEST_F(MapTest, MapEachElemPlusOneR0) {
170 // Applies lambda (x) (+ x 1)) to an input scalar.
171 XlaBuilder builder(TestName());
172 Literal param0_literal = LiteralUtil::CreateR0<float>(42.0);
173 std::unique_ptr<GlobalData> param0_data =
174 client_->TransferToServer(param0_literal).ConsumeValueOrDie();
175
176 auto param = Parameter(&builder, 0, param0_literal.shape(), "param0");
177 Map(&builder, {param}, CreateAdderToOne(), {});
178
179 ComputeAndCompareR0<float>(&builder, 43.0, {param0_data.get()},
180 ErrorSpec(0.01f));
181}
182
183XLA_TEST_F(MapTest, MapEachElemPlusOneR1S0) {
184 // Maps (lambda (x) (+ x 1)) onto an input R1F32 vector of length 0.

Callers

nothing calls this directly

Calls 15

TestNameFunction · 0.85
MapFunction · 0.85
MakeShapeFunction · 0.85
ConsumeValueOrDieMethod · 0.80
CreateSubBuilderMethod · 0.80
BuildAndNoteErrorMethod · 0.80
ErrorSpecClass · 0.70
ParameterFunction · 0.50
MulFunction · 0.50
AddClass · 0.50
HasSubstrFunction · 0.50

Tested by

no test coverage detected