Skip to content

Commit 7e24d17

Browse files
committed
Vulkan: explicity check push constants limit in supports_op() for conv_transpose_2d operation.
1 parent 12aaeae commit 7e24d17

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12721,7 +12721,8 @@ static bool ggml_backend_vk_device_supports_op(ggml_backend_dev_t dev, const ggm
1272112721
// Op is disabled for Apple because it segfaults at pipeline create time on MoltenVK
1272212722
ggml_backend_vk_device_context * ctx = (ggml_backend_vk_device_context *)dev->context;
1272312723
const vk_device& device = ggml_vk_get_device(ctx->device);
12724-
if (op->op == GGML_OP_CONV_TRANSPOSE_2D && !device->pipeline_conv_transpose_2d_f32[0]) {
12724+
if (op->op == GGML_OP_CONV_TRANSPOSE_2D &&
12725+
device->properties.limits.maxPushConstantsSize < sizeof(vk_op_conv_transpose_2d_push_constants)) {
1272512726
return false;
1272612727
}
1272712728
// Channel-contiguous format is not supported yet.

0 commit comments

Comments
 (0)