Tests a Pad() with a zero-element input and output.
| 85 | |
| 86 | // Tests a Pad() with a zero-element input and output. |
| 87 | XLA_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. |
| 102 | XLA_TEST_P(PadTestFloat, Pad1DS0ToS5Array) { |
nothing calls this directly
no test coverage detected