Merge pull request #1977 from ikawrakow/ik/dflash_fix_cpu

Fix DFlash on the CPU
This commit is contained in:
Kawrakow 2026-06-16 15:26:23 +02:00 committed by GitHub
commit 8420f91ae3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -366,6 +366,13 @@ ggml_cgraph * llm_build_context::build_dflash() {
cb(Vcur, "dflash_main_v_pad", il); cb(Vcur, "dflash_main_v_pad", il);
} }
if (Kcur->type == GGML_TYPE_F32) {
Kcur = ggml_cast(ctx0, Kcur, GGML_TYPE_F16);
}
if (Vcur->type == GGML_TYPE_F32) {
Vcur = ggml_cast(ctx0, Vcur, GGML_TYPE_F16);
}
cb(Qcur, "Qcur", il); cb(Qcur, "Qcur", il);
ggml_tensor * q = ggml_permute(ctx0, Qcur, 0, 2, 1, 3); ggml_tensor * q = ggml_permute(ctx0, Qcur, 0, 2, 1, 3);