| 23 | namespace { |
| 24 | |
| 25 | TensorFormat MakeNCHWFormat(int num_spatial_dims) { |
| 26 | absl::InlinedVector<int64, 4> spatial_dimensions; |
| 27 | for (int i = 0; i < num_spatial_dims; ++i) { |
| 28 | spatial_dimensions.push_back(i + 2); |
| 29 | } |
| 30 | return TensorFormat(/*batch_dimension=*/0, /*feature_dimension=*/1, |
| 31 | /*spatial_dimensions=*/spatial_dimensions); |
| 32 | } |
| 33 | |
| 34 | std::vector<std::pair<int64, int64>> MakeGeneralPadding( |
| 35 | XlaOp input, absl::Span<const int64> kernel_size, |
no test coverage detected