Skip to content

Commit a22c09a

Browse files
committed
Address PR feedback
1 parent b76c058 commit a22c09a

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

ggml/src/ggml-cuda/ssm-conv.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ static void ssm_conv_f32_cuda(const float * src0, const float * src1, const int
111111
ssm_conv_f32<threads, 3><<<blocks, threads, 0, stream>>>(src0, src1, src0_nb0, src0_nb1, src0_nb2, src1_nb1,
112112
dst, dst_nb0, dst_nb1, dst_nb2, n_t);
113113
} else {
114-
GGML_ABORT("Only support kernel size = 4 now.");
114+
GGML_ABORT("Only support kernel size = 3 or size = 4 right now.");
115115
}
116116
} else {
117117
if (nc == 4) {
@@ -125,7 +125,7 @@ static void ssm_conv_f32_cuda(const float * src0, const float * src1, const int
125125
ssm_conv_long_token_f32<threads, 3, split_n_t><<<blocks, threads, 0, stream>>>(
126126
src0, src1, src0_nb0, src0_nb1, src0_nb2, src1_nb1, dst, dst_nb0, dst_nb1, dst_nb2, n_t);
127127
} else {
128-
GGML_ABORT("Only support kernel size = 4 right now.");
128+
GGML_ABORT("Only support kernel size = 3 or size = 4 right now.");
129129
}
130130
}
131131
}

src/llama-model.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15671,11 +15671,7 @@ struct llm_build_lfm2 : public llm_graph_context {
1567115671
GGML_ASSERT(hparams.n_shortconv_l_cache > 0);
1567215672

1567315673
// construct ssm_conv op
15674-
struct ggml_tensor * conv_out = ggml_new_tensor_3d(ctx0, GGML_TYPE_F32, bx->ne[1], bx->ne[0] - conv->ne[0], bx->ne[2]);
15675-
conv_out->op = GGML_OP_SSM_CONV;
15676-
conv_out->src[0] = bx;
15677-
conv_out->src[1] = conv_kernel;
15678-
15674+
ggml_tensor * conv_out = ggml_ssm_conv(ctx0, bx, conv_kernel);
1567915675
cb(conv_out, "model.layers.{}.conv.conv", il);
1568015676

1568115677
auto *y = ggml_mul(ctx0, c, conv_out);

0 commit comments

Comments
 (0)