ggml : force F32 precision for ggml_mul_mat
This commit is contained in:
parent
a7aee47b98
commit
a40f6110f0
2 changed files with 44 additions and 17 deletions
6
ggml.c
6
ggml.c
|
@ -4090,6 +4090,12 @@ struct ggml_tensor * ggml_mul_mat(
|
|||
const int64_t ne[4] = { a->ne[1], b->ne[1], b->ne[2], b->ne[3] };
|
||||
struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne);
|
||||
|
||||
// TMP: force f32 precision
|
||||
{
|
||||
const int32_t prec_i32 = GGML_PREC_F32;
|
||||
ggml_set_op_params_i32(result, 0, prec_i32);
|
||||
}
|
||||
|
||||
result->op = GGML_OP_MUL_MAT;
|
||||
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
|
||||
result->src[0] = a;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue