]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
vulkan: change graph_compute to be async and enable get_tensor_async (llama/17158)
authorJeff Bolz <redacted>
Sat, 15 Nov 2025 08:06:41 +0000 (02:06 -0600)
committerGeorgi Gerganov <redacted>
Mon, 17 Nov 2025 13:34:43 +0000 (15:34 +0200)
commit2580cab50bf1c198f2de0a2a7d05dc318fb756fa
tree48bc16018d8127ae0d40f3e1028630f6e69a8613
parentd0f2203fc5dabc9a54ca9141e8729b1604007734
vulkan: change graph_compute to be async and enable get_tensor_async (llama/17158)

* vulkan: change graph_compute to be async and enable get_tensor_async

This allows some additional CPU/GPU overlap for large pp workloads. Also seems
to help a bit for token gen, maybe getting rid of a small bubble between
graph_compute and get_tensor.

Async set and copy functions seem to be very rarely used, so I didn't enable
them because I didn't have a good way to test them.

The async commands need to be ordered against each other, so put them all on
the compute queue. The non-async commands still use the transfer queue.

The fence for graph_compute/get_tensor_async is submitted and waited on in
ggml_vk_synchronize.

* fix thread safety errors

* teardown context cleanly

* Handle async read to non-pinned dst
src/ggml-vulkan/ggml-vulkan.cpp