| 3174 | } |
| 3175 | |
| 3176 | struct ggml_tensor * ggml_mul_mat( |
| 3177 | struct ggml_context * ctx, |
| 3178 | struct ggml_tensor * a, |
| 3179 | struct ggml_tensor * b) { |
| 3180 | GGML_ASSERT(ggml_can_mul_mat(a, b)); |
| 3181 | GGML_ASSERT(!ggml_is_transposed(a)); |
| 3182 | |
| 3183 | const int64_t ne[4] = { a->ne[1], b->ne[1], b->ne[2], b->ne[3] }; |
| 3184 | struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne); |
| 3185 | |
| 3186 | result->op = GGML_OP_MUL_MAT; |
| 3187 | result->src[0] = a; |
| 3188 | result->src[1] = b; |
| 3189 | |
| 3190 | return result; |
| 3191 | } |
| 3192 | |
| 3193 | void ggml_mul_mat_set_prec( |
| 3194 | struct ggml_tensor * a, |