Skip to content

Commit 9a029e4

Browse files
committed
Disable support for non-contiguous binary_op tensors and leave note for future support
1 parent b319672 commit 9a029e4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ggml/src/ggml-webgpu/ggml-webgpu.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1969,8 +1969,10 @@ static bool ggml_backend_webgpu_device_supports_op(ggml_backend_dev_t dev, const
19691969
case GGML_OP_SUB:
19701970
case GGML_OP_MUL:
19711971
case GGML_OP_DIV:
1972+
// TODO: support non-contiguous tensors, e.g. for MOE_EXPERT_REDUCE
1973+
// see https://github.com/ggml-org/llama.cpp/pull/16857
19721974
supports_op = (op->type == GGML_TYPE_F32 || op->type == GGML_TYPE_F16) && (src0->type == op->type) &&
1973-
(src1->type == op->type);
1975+
(src1->type == op->type) && ggml_is_contiguous(src0) && ggml_is_contiguous(src1);
19741976
break;
19751977
case GGML_OP_CPY:
19761978
case GGML_OP_CONT:

0 commit comments

Comments
 (0)