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

Function XLA_TEST_F

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

Source from the content-addressed store, hash-verified

181}
182
183XLA_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
197TEST_F(MapTest, MapEachElemPlusOneR1S4) {
198 // Maps (lambda (x) (+ x 1)) onto an input R1F32 vector of length 4.

Callers

nothing calls this directly

Calls 14

TestNameFunction · 0.85
MapFunction · 0.85
MakeShapeFunction · 0.85
ConsumeValueOrDieMethod · 0.80
ErrorSpecClass · 0.70
ParameterFunction · 0.50
AddClass · 0.50
MakeLayoutFunction · 0.50
TransferToServerMethod · 0.45
shapeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected