Skip to content

vulkan: skip zero size tensors in backend copies#20233

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

vulkan: skip zero size tensors in backend copies#20233
0cc4m merged 1 commit intomasterfrom
0cc4m/vulkan-fix-cpy-zero-size

Conversation

@0cc4m
Copy link
Copy Markdown
Contributor

@0cc4m 0cc4m commented Mar 8, 2026

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
bartowski1182 pushed a commit to bartowski1182/llama.cpp that referenced this pull request Mar 10, 2026
Ethan-a2 pushed a commit to Ethan-a2/llama.cpp that referenced this pull request Mar 20, 2026
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
rsenthilkumar6 pushed a commit to rsenthilkumar6/llama.cpp that referenced this pull request May 1, 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