Skip to content

Commit 9e2301f

Browse files
committed
metal : fix group_norm support condition (#0)
1 parent fee824a commit 9e2301f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ggml/src/ggml-metal/ggml-metal.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -997,9 +997,10 @@ static bool ggml_metal_supports_op(const struct ggml_backend_metal_device_contex
997997
return ggml_is_contiguous(op->src[0]);
998998
case GGML_OP_SUM_ROWS:
999999
case GGML_OP_SOFT_MAX:
1000-
case GGML_OP_RMS_NORM:
10011000
case GGML_OP_GROUP_NORM:
10021001
return has_simdgroup_reduction;
1002+
case GGML_OP_RMS_NORM:
1003+
return has_simdgroup_reduction && (op->ne[0] % 4 == 0);
10031004
case GGML_OP_NORM:
10041005
case GGML_OP_ROPE:
10051006
return true;
@@ -2672,7 +2673,6 @@ static void ggml_metal_encode_node(
26722673
} break;
26732674
case GGML_OP_GROUP_NORM:
26742675
{
2675-
GGML_ASSERT(ne00 % 4 == 0);
26762676
GGML_ASSERT(ggml_is_contiguous(src0));
26772677

26782678
float eps;

0 commit comments

Comments
 (0)