Skip to content

Commit 6e66a1a

Browse files
authored
fix: allow oversized Vulkan parameter tensors (#1662)
1 parent bb90bfa commit 6e66a1a

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

src/model_manager.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -577,13 +577,8 @@ bool ModelManager::alloc_params_buffers(const std::vector<TensorState*>& states,
577577
for (TensorState* state : states) {
578578
ggml_tensor* tensor = state->tensor;
579579
size_t tensor_size = GGML_PAD(ggml_backend_buft_get_alloc_size(params_buft, tensor), alignment);
580-
if (max_size > 0 && tensor_size > max_size) {
581-
LOG_ERROR("model manager tensor '%s' is too large for params buffer: %zu > %zu",
582-
ggml_get_name(tensor),
583-
tensor_size,
584-
max_size);
585-
return false;
586-
}
580+
// Some backends, e.g. Vulkan, report a preferred chunk size here rather than a
581+
// hard per-tensor allocation limit. Oversized tensors are allocated alone.
587582
if (!chunk.empty() && max_size > 0 && chunk_size + tensor_size > max_size) {
588583
if (!alloc_chunk(chunk, chunk_size)) {
589584
return false;

0 commit comments

Comments
 (0)