| 654 | // doesn't make sense. |
| 655 | template <typename Dims> |
| 656 | void CheckValidShapeDimensions(const Dims& dims) { |
| 657 | if (dims.size() == 1 && dims[0] == 0) { |
| 658 | return; |
| 659 | } |
| 660 | for (const auto& dim : dims) { |
| 661 | CHECK_GE(dim, 1); |
| 662 | } |
| 663 | } |
| 664 | |
| 665 | void CheckValidShape(const Shape& shape) { |
| 666 | CheckValidShapeDimensions(shape.dims()); |
no test coverage detected