bug fix: actually use result type passed to ggml_add_cast

This commit is contained in:
xaedes 2023-08-17 23:48:30 +02:00
parent 714fec06ee
commit 0bb897c82a
No known key found for this signature in database
GPG key ID: 30030EDD817EA2B1

3
ggml.c
View file

@ -5150,7 +5150,7 @@ struct ggml_tensor * ggml_add_cast(
struct ggml_tensor * a, struct ggml_tensor * a,
struct ggml_tensor * b, struct ggml_tensor * b,
enum ggml_type type) { enum ggml_type type) {
return ggml_add_impl(ctx, a, b, false); return ggml_add_cast_impl(ctx, a, b, type);
} }
// ggml_add1 // ggml_add1
@ -8369,7 +8369,6 @@ static void ggml_compute_forward_add_q_f32(
GGML_ASSERT(nb2 <= nb3); GGML_ASSERT(nb2 <= nb3);
GGML_ASSERT(ggml_is_quantized(src0->type)); GGML_ASSERT(ggml_is_quantized(src0->type));
GGML_ASSERT(dst->type == src0->type);
GGML_ASSERT(src1->type == GGML_TYPE_F32); GGML_ASSERT(src1->type == GGML_TYPE_F32);
// rows per thread // rows per thread