ggml : fix CPU soft_max

This commit is contained in:
Georgi Gerganov 2024-03-22 17:49:42 +02:00
parent 3a468e6f9f
commit 09532120e0
No known key found for this signature in database
GPG Key ID: BF970631944C16B7

2
ggml.c
View File

@ -12302,7 +12302,7 @@ static void ggml_compute_forward_soft_max_f32(
float * dp = (float *)((char *) dst->data + i1*dst->nb[1]);
// broadcast the mask across rows
ggml_fp16_t * mp = src1 ? (ggml_fp16_t *)((char *) src1->data + (i1%ne11)*src1->nb[1]) : NULL;
ggml_fp16_t * mp = src1 ? (ggml_fp16_t *)((char *) src1->data) + (i1%ne01)*ne00 : NULL;
ggml_vec_cpy_f32 (nc, wp, sp);
ggml_vec_scale_f32(nc, wp, scale);