Skip to content

vulkan: Remove transfer_ctx, do everything in compute_ctx.#18945

Merged
0cc4m merged 2 commits into
ggml-org:masterfrom
jeffbolznv:issue_18786
Jan 21, 2026
Merged

vulkan: Remove transfer_ctx, do everything in compute_ctx.#18945
0cc4m merged 2 commits into
ggml-org:masterfrom
jeffbolznv:issue_18786

Conversation

@jeffbolznv

@jeffbolznv jeffbolznv commented Jan 20, 2026

Copy link
Copy Markdown
Contributor

We had a bug where a set_tensor_async (using transfer_ctx) didn't get submitted before the graph_compute (using compute_ctx) that came after it. To avoid this sort of issue, just do everything in compute_ctx.

Remove transfer_cmd_pool, which was already unused.

Fixes #18786.

@jeffbolznv
jeffbolznv requested a review from 0cc4m as a code owner January 20, 2026 02:47
@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 Jan 20, 2026
@jeffbolznv

Copy link
Copy Markdown
Contributor Author

llama-embedding test is failing in CI, I assume this means the output is corrupt somehow. I'll look at it closer tomorrow.

We had a bug where a set_tensor_async (using transfer_ctx) didn't get
submitted before the graph_compute (using compute_ctx) that came after
it. To avoid this sort of issue, just do everything in compute_ctx.

Remove transfer_cmd_pool, which was already unused.
@0cc4m

0cc4m commented Jan 20, 2026

Copy link
Copy Markdown
Contributor

Isn't there an advantage on certain hardware to using a transfer-specific queue? Maybe there's a way to solve this with synchronization between the queues.

@jeffbolznv

Copy link
Copy Markdown
Contributor Author

If the transfer queue can run in parallel with the compute work then that's potentially an advantage, but if we'd need to sync them against each other with semaphores to preserve the ordering that ggml expects, then we wouldn't be able to get that. And these operations were already on the compute queue (being created from compute_cmd_pool) so that hasn't changed. The commands in the ggml_backend_buffer_i interface still use the transfer queue.

@jeffbolznv
jeffbolznv marked this pull request as draft January 20, 2026 14:57
@jeffbolznv

Copy link
Copy Markdown
Contributor Author

Hmm, I'm seeing a crash somewhere, set to draft for now.

@jeffbolznv
jeffbolznv marked this pull request as ready for review January 20, 2026 15:06
@jeffbolznv

Copy link
Copy Markdown
Contributor Author

The crash was with the perf_logger enabled, fixed now.

@0cc4m
0cc4m merged commit bd544c9 into ggml-org:master Jan 21, 2026
78 checks passed
shaofeiqi pushed a commit to qualcomm/llama.cpp that referenced this pull request Feb 6, 2026
…18945)

* vulkan: Remove transfer_ctx, do everything in compute_ctx.

We had a bug where a set_tensor_async (using transfer_ctx) didn't get
submitted before the graph_compute (using compute_ctx) that came after
it. To avoid this sort of issue, just do everything in compute_ctx.

Remove transfer_cmd_pool, which was already unused.

* fix crash with perf logger
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
…18945)

* vulkan: Remove transfer_ctx, do everything in compute_ctx.

We had a bug where a set_tensor_async (using transfer_ctx) didn't get
submitted before the graph_compute (using compute_ctx) that came after
it. To avoid this sort of issue, just do everything in compute_ctx.

Remove transfer_cmd_pool, which was already unused.

* fix crash with perf logger
ljubomirj pushed a commit to ljubomirj/llama.cpp that referenced this pull request May 6, 2026
…18945)

* vulkan: Remove transfer_ctx, do everything in compute_ctx.

We had a bug where a set_tensor_async (using transfer_ctx) didn't get
submitted before the graph_compute (using compute_ctx) that came after
it. To avoid this sort of issue, just do everything in compute_ctx.

Remove transfer_cmd_pool, which was already unused.

* fix crash with perf logger
my-other-github-account pushed a commit to my-other-github-account/llama.cpp that referenced this pull request May 15, 2026
…18945)

* vulkan: Remove transfer_ctx, do everything in compute_ctx.

We had a bug where a set_tensor_async (using transfer_ctx) didn't get
submitted before the graph_compute (using compute_ctx) that came after
it. To avoid this sort of issue, just do everything in compute_ctx.

Remove transfer_cmd_pool, which was already unused.

* fix crash with perf logger
my-other-github-account pushed a commit to my-other-github-account/llama.cpp that referenced this pull request May 15, 2026
…18945)

* vulkan: Remove transfer_ctx, do everything in compute_ctx.

We had a bug where a set_tensor_async (using transfer_ctx) didn't get
submitted before the graph_compute (using compute_ctx) that came after
it. To avoid this sort of issue, just do everything in compute_ctx.

Remove transfer_cmd_pool, which was already unused.

* fix crash with perf logger
fewtarius pushed a commit to fewtarius/CachyLLama that referenced this pull request May 30, 2026
…18945)

* vulkan: Remove transfer_ctx, do everything in compute_ctx.

We had a bug where a set_tensor_async (using transfer_ctx) didn't get
submitted before the graph_compute (using compute_ctx) that came after
it. To avoid this sort of issue, just do everything in compute_ctx.

Remove transfer_cmd_pool, which was already unused.

* fix crash with perf logger
fukuro-kun pushed a commit to fukuro-kun/fukuro-llama-cpp-turboquant that referenced this pull request Jul 5, 2026
…18945)

* vulkan: Remove transfer_ctx, do everything in compute_ctx.

We had a bug where a set_tensor_async (using transfer_ctx) didn't get
submitted before the graph_compute (using compute_ctx) that came after
it. To avoid this sort of issue, just do everything in compute_ctx.

Remove transfer_cmd_pool, which was already unused.

* fix crash with perf logger
MrLordCat referenced this pull request in MrLordCat/llama.cpp-with-GUI Jul 16, 2026
* vulkan: Remove transfer_ctx, do everything in compute_ctx.

We had a bug where a set_tensor_async (using transfer_ctx) didn't get
submitted before the graph_compute (using compute_ctx) that came after
it. To avoid this sort of issue, just do everything in compute_ctx.

Remove transfer_cmd_pool, which was already unused.

* fix crash with perf logger
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.

Eval bug: GGML_ASSERT(id >= 0 && id < n_expert) when running GPT-OSS 20B at any quantization and with any flags

2 participants