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

Function XLA_TEST_P

tensorflow/compiler/xla/tests/pad_test.cc:87–99  ·  view source on GitHub ↗

Tests a Pad() with a zero-element input and output.

Source from the content-addressed store, hash-verified

85
86// Tests a Pad() with a zero-element input and output.
87XLA_TEST_P(PadTestFloat, Pad1DS0ToS0Array) {
88 XlaBuilder b(TestName());
89 // Set up the padding configuration {low: 0, high: 0, interior: 0}.
90 PaddingConfig padding_config;
91 auto dimension = padding_config.add_dimensions();
92 dimension->set_edge_padding_low(0);
93 dimension->set_edge_padding_high(0);
94 dimension->set_interior_padding(0);
95
96 Pad(AddParam(LiteralUtil::CreateR1<float>({}), &b),
97 AddParam(LiteralUtil::CreateR0<float>(0.1), &b), padding_config);
98 ComputeAndCompareR1<float>(&b, {}, {}, DefaultErrorSpec());
99}
100
101// Tests a Pad() with a zero-element input but a non-zero-element output.
102XLA_TEST_P(PadTestFloat, Pad1DS0ToS5Array) {

Callers

nothing calls this directly

Calls 12

TestNameFunction · 0.85
MakeNoPaddingConfigFunction · 0.85
add_dimensionsMethod · 0.80
RelayoutMethod · 0.80
mutable_dimensionsMethod · 0.80
FillUniqueMethod · 0.80
ErrorSpecClass · 0.70
PadFunction · 0.50
MakeLayoutFunction · 0.50
ReduceFunction · 0.50
FillMethod · 0.45

Tested by

no test coverage detected