ggml : check ggml_add src1 type (ggml/708)

Co-authored-by: Judd <foldl@boxvest.com>
This commit is contained in:
Judd 2024-01-26 21:04:01 +08:00 committed by Georgi Gerganov
parent 35a2ee9143
commit e976423005
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735

7
ggml.c
View File

@ -7498,7 +7498,12 @@ static void ggml_compute_forward_add(
switch (src0->type) {
case GGML_TYPE_F32:
{
ggml_compute_forward_add_f32(params, src0, src1, dst);
if (src1->type == GGML_TYPE_F32) {
ggml_compute_forward_add_f32(params, src0, src1, dst);
}
else {
GGML_ASSERT(false);
}
} break;
case GGML_TYPE_F16:
{