diff --git a/ggml/src/ggml-vulkan/ggml-vulkan.cpp b/ggml/src/ggml-vulkan/ggml-vulkan.cpp index 2e886c9be..89f0470cb 100644 --- a/ggml/src/ggml-vulkan/ggml-vulkan.cpp +++ b/ggml/src/ggml-vulkan/ggml-vulkan.cpp @@ -15550,13 +15550,14 @@ static bool ggml_backend_vk_device_supports_op(ggml_backend_dev_t dev, const ggm } return true; }; - // reject any tensors larger than the max buffer size + // non-compute ops are never executed here; their size is bounded by the buffer allocation limit + const bool non_compute = ggml_op_is_empty(op->op); for (int i = 0; i < GGML_MAX_SRC; i++) { - if (op->src[i] && !tensor_size_supported(ggml_nbytes(op->src[i]))) { + if (op->src[i] && !non_compute && !tensor_size_supported(ggml_nbytes(op->src[i]))) { return false; } } - if (!tensor_size_supported(ggml_nbytes(op))) { + if (!non_compute && !tensor_size_supported(ggml_nbytes(op))) { return false; }