Skip to content

Commit d774ab3

Browse files
authored
metal : adjust support conditions for norm operators (ggml-org#11671)
cont ggml-org#11659 ggml-ci
1 parent fa62da9 commit d774ab3

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
@@ -1204,13 +1204,13 @@ static bool ggml_metal_supports_op(const struct ggml_backend_metal_device_contex
12041204
case GGML_OP_SUM_ROWS:
12051205
case GGML_OP_SOFT_MAX:
12061206
case GGML_OP_GROUP_NORM:
1207-
return has_simdgroup_reduction;
1207+
return has_simdgroup_reduction && ggml_is_contiguous(op->src[0]);
12081208
case GGML_OP_RMS_NORM:
12091209
return has_simdgroup_reduction && (op->ne[0] % 4 == 0 && ggml_is_contiguous_1(op->src[0]));
12101210
case GGML_OP_ARGMAX:
12111211
return true;
12121212
case GGML_OP_NORM:
1213-
return has_simdgroup_reduction && ggml_is_contiguous(op->src[0]);
1213+
return has_simdgroup_reduction && (op->ne[0] % 4 == 0 && ggml_is_contiguous_1(op->src[0]));
12141214
case GGML_OP_ROPE:
12151215
{
12161216
const int mode = ((const int32_t *) op->op_params)[2];

0 commit comments

Comments
 (0)