Skip to content

Commit a9c6ffc

Browse files
authored
vulkan: enable Conv2D for Apple after MoltenVK fixed the bug (ggml-org#15526)
1 parent e78cf0d commit a9c6ffc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11853,14 +11853,13 @@ static bool ggml_backend_vk_device_supports_op(ggml_backend_dev_t dev, const ggm
1185311853
// Op is disabled for Apple because it segfaults at pipeline create time on MoltenVK
1185411854
ggml_backend_vk_device_context * ctx = (ggml_backend_vk_device_context *)dev->context;
1185511855
const vk_device& device = ggml_vk_get_device(ctx->device);
11856-
bool is_Apple = ggml_vk_get_device(ctx->device)->vendor_id == VK_VENDOR_ID_APPLE;
1185711856
// Channel-contiguous format is not supported yet.
1185811857
return ((op->src[0]->type == GGML_TYPE_F32 || op->src[0]->type == GGML_TYPE_F16) &&
1185911858
op->src[1]->type == GGML_TYPE_F32 &&
1186011859
op->type == GGML_TYPE_F32 &&
1186111860
ggml_is_contiguous(op->src[0]) &&
1186211861
ggml_is_contiguous(op->src[1]) &&
11863-
ggml_is_contiguous(op)) && !is_Apple;
11862+
ggml_is_contiguous(op));
1186411863
}
1186511864
default:
1186611865
return false;

0 commit comments

Comments
 (0)