Skip to content

Commit f7207b0

Browse files
authored
opencl: fix support ops condition for rms_norm (ggml-org#15560)
1 parent 4d917cd commit f7207b0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ggml/src/ggml-opencl/ggml-opencl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2647,8 +2647,9 @@ static bool ggml_opencl_supports_op(ggml_backend_dev_t dev, const struct ggml_te
26472647
return op->src[0]->type == GGML_TYPE_F32;
26482648
case GGML_OP_SOFT_MAX:
26492649
case GGML_OP_NORM:
2650-
case GGML_OP_RMS_NORM:
26512650
return true;
2651+
case GGML_OP_RMS_NORM:
2652+
return op->ne[0] % 4 == 0 && ggml_is_contiguous_rows(op->src[0]);
26522653
case GGML_OP_REPEAT:
26532654
return op->src[0]->type == GGML_TYPE_F32 && op->type == GGML_TYPE_F32; // Assuming F32 for now, can be expanded
26542655
case GGML_OP_PAD:

0 commit comments

Comments
 (0)