File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10226,11 +10226,11 @@ static void ggml_compute_forward_mul_f32(
10226
10226
if (scale == 0.0f) {
10227
10227
// NOTE: this also sets NANs to zero, which is not compliant with IEEE754,
10228
10228
// but it is useful when resetting the state of recurrent models.
10229
- memset((char *)dst->data + ir*nb1, 0, nb1 );
10229
+ memset((char *) dst->data + ir*nb1, 0, ne0 * sizeof(float) );
10230
10230
} else {
10231
10231
if (dst->data != src0->data) {
10232
10232
// src0 is same shape as dst => same indices
10233
- memcpy((char *)dst->data + ir*nb1, (char *)src0->data + ir*nb01, ne0 * sizeof(float));
10233
+ memcpy((char *) dst->data + ir*nb1, (char *) src0->data + ir*nb01, ne0 * sizeof(float));
10234
10234
}
10235
10235
if (scale != 1.0f) {
10236
10236
ggml_vec_scale_f32(ne0, (float *) ((char *) dst->data + ir*nb1), scale);
Original file line number Diff line number Diff line change @@ -9335,7 +9335,7 @@ static struct ggml_tensor * llm_build_mamba2(
9335
9335
ggml_cpy(ctx, last_conv,
9336
9336
ggml_view_1d(ctx, conv_states_all,
9337
9337
(d_conv - 1)*(d_inner + 2*n_group*d_state)*(n_seqs),
9338
- kv_head*(d_conv - 1)*(d_inner)*ggml_element_size(conv_states_all))));
9338
+ kv_head*(d_conv - 1)*(d_inner + 2*n_group*d_state )*ggml_element_size(conv_states_all))));
9339
9339
9340
9340
// 1D convolution
9341
9341
// The equivalent is to make a self-overlapping view of conv_x
You can’t perform that action at this time.
0 commit comments