Skip to content

vulkan: skip zero size tensors in backend copies - #20233

Merged
0cc4m merged 1 commit into
masterfrom
0cc4m/vulkan-fix-cpy-zero-size
Mar 9, 2026
Merged

0cc4m merged 1 commit into
masterfrom
0cc4m/vulkan-fix-cpy-zero-size

Conversation

@0cc4m

@0cc4m 0cc4m commented Mar 8, 2026

Copy link
Copy Markdown
Contributor

I noticed validation errors in #19955

Validation Error: [ VUID-VkBufferCopy-size-01988 ] | MessageID = 0x636fcc49
vkCmdCopyBuffer(): pRegions[0].size is zero.
The Vulkan spec states: The size must be greater than 0 (https://docs.vulkan.org/spec/latest/chapters/copies.html#VUID-VkBufferCopy-size-01988)
Objects: 1
    [0] VkCommandBuffer 0x57d940f3cda0

I traced it to the backend async tensor copy function being called with zero-size tensors. I added checks to all backend interfaces to skip size 0 tensors.

@0cc4m
0cc4m merged commit b2f460b into master Mar 9, 2026
77 of 78 checks passed
@0cc4m
0cc4m deleted the 0cc4m/vulkan-fix-cpy-zero-size branch March 9, 2026 06:23
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
my-other-github-account pushed a commit to my-other-github-account/llama.cpp that referenced this pull request May 15, 2026
fukuro-kun pushed a commit to fukuro-kun/fukuro-llama-cpp-turboquant that referenced this pull request Jul 5, 2026
MrLordCat referenced this pull request in MrLordCat/llama.cpp-rdna-lab Jul 16, 2026
zommiommy pushed a commit to zommiommy/llama.cpp that referenced this pull request Aug 18, 2026
frostyautumnleaf pushed a commit to frostyautumnleaf/llama.cpp that referenced this pull request Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning Vulkan Issues specific to the Vulkan backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants