| 20 | } |
| 21 | |
| 22 | bool is_scalar_shape(ValueRef shape) { |
| 23 | // may have performance issue |
| 24 | auto shape_of_shape = shape.shape(); |
| 25 | if (!shape_of_shape) { |
| 26 | // assume not scalar |
| 27 | return false; |
| 28 | } |
| 29 | return *shape_of_shape == ValueShape{0}; |
| 30 | } |
| 31 | |
| 32 | template < |
| 33 | typename T, |
no test coverage detected