Skip to content

Commit 57d170f

Browse files
try CI fix
1 parent af7fead commit 57d170f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,10 +1206,11 @@ static bool ggml_metal_supports_op(const struct ggml_backend_metal_device_contex
12061206
case GGML_OP_GROUP_NORM:
12071207
return has_simdgroup_reduction;
12081208
case GGML_OP_RMS_NORM:
1209-
return has_simdgroup_reduction && (op->ne[0] % 4 == 0);
1209+
return has_simdgroup_reduction && (op->ne[0] % 4 == 0 && ggml_is_contiguous_1(src0);
12101210
case GGML_OP_ARGMAX:
1211-
case GGML_OP_NORM:
12121211
return true;
1212+
case GGML_OP_NORM:
1213+
return has_simdgroup_reduction && (op->ne[0] % 4 == 0 && ggml_is_contiguous_1(src0);
12131214
case GGML_OP_ROPE:
12141215
{
12151216
const int mode = ((const int32_t *) op->op_params)[2];

ggml/src/ggml-vulkan/ggml-vulkan.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8182,9 +8182,11 @@ static bool ggml_backend_vk_device_supports_op(ggml_backend_dev_t dev, const ggm
81828182
case GGML_OP_VIEW:
81838183
case GGML_OP_PERMUTE:
81848184
case GGML_OP_TRANSPOSE:
8185+
return true;
81858186
case GGML_OP_NORM:
81868187
case GGML_OP_GROUP_NORM:
81878188
case GGML_OP_RMS_NORM:
8189+
return ggml_is_contiguous(op->src[0]);
81888190
case GGML_OP_ADD:
81898191
case GGML_OP_ACC:
81908192
case GGML_OP_MUL:

0 commit comments

Comments
 (0)