Skip to content

Commit 9afe28b

Browse files
authored
add contiguous check in supports_op
1 parent e53192b commit 9afe28b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1876,7 +1876,7 @@ static bool ggml_metal_supports_op(const struct ggml_backend_metal_device_contex
18761876
case GGML_OP_ROPE:
18771877
return true;
18781878
case GGML_OP_IM2COL:
1879-
return op->src[1]->type == GGML_TYPE_F32 && (op->type == GGML_TYPE_F16 || op->type == GGML_TYPE_F32);
1879+
return ggml_is_contiguous(op->src[1]) && op->src[1]->type == GGML_TYPE_F32 && (op->type == GGML_TYPE_F16 || op->type == GGML_TYPE_F32);
18801880
case GGML_OP_POOL_1D:
18811881
return false;
18821882
case GGML_OP_UPSCALE:

0 commit comments

Comments
 (0)