Skip to content

[ggml] Fix Vulkan-Hpp handle usage on 32-bit targets.#22892

Open
miyanyan wants to merge 1 commit into
ggml-org:masterfrom
miyanyan:vk-32bit
Open

[ggml] Fix Vulkan-Hpp handle usage on 32-bit targets.#22892
miyanyan wants to merge 1 commit into
ggml-org:masterfrom
miyanyan:vk-32bit

Conversation

@miyanyan
Copy link
Copy Markdown
Contributor

Overview

On 32-bit platforms, Vulkan non-dispatchable handles such as VkBuffer are represented as uint64_t, and Vulkan-Hpp disables implicit conversions for type safety. This exposes two issues in ggml-vulkan:

  1. vk::Buffer is streamed directly into std::ostream in debug/memory logs.
  2. vk::Buffer is cast to VkBuffer before being passed to Vulkan-Hpp CommandBuffer::copyBuffer APIs.

Fix these by explicitly casting vk::Buffer to VkBuffer only for logging, and by passing vk::Buffer directly to Vulkan-Hpp copyBuffer calls.

Additional information

Requirements

On 32-bit platforms, Vulkan non-dispatchable handles such as VkBuffer are
represented as uint64_t, and Vulkan-Hpp disables implicit conversions for
type safety. This exposes two issues in ggml-vulkan:

1. vk::Buffer is streamed directly into std::ostream in debug/memory logs.
2. vk::Buffer is cast to VkBuffer before being passed to Vulkan-Hpp
   CommandBuffer::copyBuffer APIs.

Fix these by explicitly casting vk::Buffer to VkBuffer only for logging, and
by passing vk::Buffer directly to Vulkan-Hpp copyBuffer calls.
@miyanyan miyanyan requested a review from a team as a code owner May 10, 2026 04:06
@github-actions github-actions Bot added Vulkan Issues specific to the Vulkan backend ggml changes relating to the ggml tensor library for machine learning labels May 10, 2026
@miyanyan miyanyan changed the title Fix Vulkan-Hpp handle usage on 32-bit targets. [ggml] Fix Vulkan-Hpp handle usage on 32-bit targets. May 10, 2026
@miyanyan
Copy link
Copy Markdown
Contributor Author

the ubuntu-24-webgpu ci error:

98% tests passed, 1 tests failed out of 44

Label Time Summary:
main    = 994.86 sec*proc (43 tests)

Total Test time (real) = 995.40 sec

The following tests FAILED:
	 39 - test-backend-ops (Timeout)                        main
Errors while running CTest
Output from these tests are in: /home/runner/work/llama.cpp/llama.cpp/build/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
Error: Process completed with exit code 8.

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.

1 participant