Skip to content

Commit fd7353d

Browse files
authored
cuda: fix rope fusion for gemma3 (ggml-org#17378)
1 parent 6fd4f95 commit fd7353d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ggml/src/ggml-cuda/ggml-cuda.cu

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3001,6 +3001,10 @@ static void update_cuda_graph_executable(ggml_backend_cuda_context * cuda_ctx) {
30013001
static bool ggml_cuda_should_fuse_rope_set_rows(const ggml_tensor * rope,
30023002
const ggml_tensor * view,
30033003
const ggml_tensor * set_rows) {
3004+
3005+
if (rope->op != GGML_OP_ROPE || view->op != GGML_OP_VIEW || set_rows->op != GGML_OP_SET_ROWS) {
3006+
return false;
3007+
}
30043008
// ne3 not tested
30053009
if (rope->src[0]->ne[3] != 1) {
30063010
return false;

0 commit comments

Comments
 (0)