| 2041 | } |
| 2042 | |
| 2043 | static inline bool ggml_can_out_prod(const struct ggml_tensor * t0, const struct ggml_tensor * t1) { |
| 2044 | static_assert(GGML_MAX_DIMS == 4, "GGML_MAX_DIMS is not 4 - update this function"); |
| 2045 | |
| 2046 | return (t0->ne[1] == t1->ne[1]) && |
| 2047 | (t1->ne[2]%t0->ne[2] == 0) && // verify t0 is broadcastable |
| 2048 | (t1->ne[3]%t0->ne[3] == 0); |
| 2049 | } |
| 2050 | |
| 2051 | enum ggml_type ggml_ftype_to_ggml_type(enum ggml_ftype ftype) { |
| 2052 | enum ggml_type wtype = GGML_TYPE_COUNT; |