sync: update ggml

This commit is contained in:
leejet 2026-09-27 18:40:09 +08:00
parent f8890b9db3
commit 47e83d7136
3 changed files with 3 additions and 3 deletions

2
ggml

@ -1 +1 @@
Subproject commit 4bf5f6000653b7881d00963cd6ddb665ccd62a8d Subproject commit 4e86b56f1658203d7f403a3ab8b5da852d7f6cd0

View File

@ -214,7 +214,7 @@ public:
if (ctx->backend != nullptr) { if (ctx->backend != nullptr) {
ggml_tensor* fp8_matmul = ggml_mul_mat(ctx->ggml_ctx, w, x); ggml_tensor* fp8_matmul = ggml_mul_mat(ctx->ggml_ctx, w, x);
if (force_prec_f32) { if (force_prec_f32) {
ggml_mul_mat_set_prec(fp8_matmul, GGML_PREC_F32); ggml_prec_set_acc(fp8_matmul, GGML_PREC_F32);
} }
supports_fp8_matmul = ggml_backend_supports_op(ctx->backend, fp8_matmul); supports_fp8_matmul = ggml_backend_supports_op(ctx->backend, fp8_matmul);
} }

View File

@ -1717,7 +1717,7 @@ namespace LLM {
v_attn = ggml_reshape_3d(ctx->ggml_ctx, v_attn, n_token, head_dim, num_kv_heads * N); v_attn = ggml_reshape_3d(ctx->ggml_ctx, v_attn, n_token, head_dim, num_kv_heads * N);
auto kq = ggml_mul_mat(ctx->ggml_ctx, k, q); auto kq = ggml_mul_mat(ctx->ggml_ctx, k, q);
ggml_mul_mat_set_prec(kq, GGML_PREC_F32); ggml_prec_set_acc(kq, GGML_PREC_F32);
kq = ggml_scale_inplace(ctx->ggml_ctx, kq, 1.0f / std::sqrt(static_cast<float>(head_dim))); kq = ggml_scale_inplace(ctx->ggml_ctx, kq, 1.0f / std::sqrt(static_cast<float>(head_dim)));
if (attention_mask != nullptr) { if (attention_mask != nullptr) {
kq = ggml_add_inplace(ctx->ggml_ctx, kq, attention_mask); kq = ggml_add_inplace(ctx->ggml_ctx, kq, attention_mask);