| 1458 | } |
| 1459 | |
| 1460 | static inline bool ggml_is_padded_1d(const struct ggml_tensor * tensor) { |
| 1461 | static_assert(GGML_MAX_DIMS == 4, "GGML_MAX_DIMS is not 4 - update this function"); |
| 1462 | |
| 1463 | return |
| 1464 | tensor->nb[0] == ggml_type_size(tensor->type) && |
| 1465 | tensor->nb[2] == tensor->nb[1]*tensor->ne[1] && |
| 1466 | tensor->nb[3] == tensor->nb[2]*tensor->ne[2]; |
| 1467 | } |
| 1468 | |
| 1469 | bool ggml_is_empty(const struct ggml_tensor * tensor) { |
| 1470 | for (int i = 0; i < GGML_MAX_DIMS; ++i) { |
no test coverage detected