Skip to content

vulkan: allow reducing graph submission batches to avoid device timeouts - #24872

Merged
0cc4m merged 1 commit into
ggml-org:masterfrom
wbruna:ggml_vk_reduce_submit_igpu
Jun 24, 2026
Merged

vulkan: allow reducing graph submission batches to avoid device timeouts#24872
0cc4m merged 1 commit into
ggml-org:masterfrom
wbruna:ggml_vk_reduce_submit_igpu

Conversation

@wbruna

@wbruna wbruna commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Overview

  • disable graph submission batching on UMA devices, to avoid "device lost" errors
  • reduce discrete GPU batching from 100 to 64
  • allow overriding the max batching value with the GGML_VK_MAX_NODES_PER_SUBMIT env var

Should fix #21724 .

Edit: removed the original heuristic to reduce the value on iGPUs.

Additional information

Tested with image generation on my own 3400G, which timeouts even with very small batches.

I've reduced the default max batch size because some reports refer to discrete GPUs, but I don't really know how to choose an appropriate safe value here (and 100 seems to work fine on my own 7600 XT, which is also reported as hitting that bug...). Edit: kept the original 100 value.

I changed the env var naming because the value is used as a ceiling, instead of a fixed amount; for consistency, added the max_ prefix to the internal variables too.

Supersedes #24240 .

Requirements

@wbruna
wbruna requested a review from a team as a code owner June 21, 2026 13:04
@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 Jun 21, 2026
Comment thread ggml/src/ggml-vulkan/ggml-vulkan.cpp Outdated
@wbruna
wbruna force-pushed the ggml_vk_reduce_submit_igpu branch from ff52c05 to 5e37770 Compare June 21, 2026 15:05
@wbruna wbruna changed the title vulkan: reduce graph submission batches on iGPUs to avoid timeouts vulkan: allow reducing graph submission batches to avoid device timeouts Jun 21, 2026
@wbruna
wbruna requested a review from 0cc4m June 21, 2026 15:09
Comment thread ggml/src/ggml-vulkan/ggml-vulkan.cpp Outdated
Comment thread ggml/src/ggml-vulkan/ggml-vulkan.cpp Outdated
@wbruna
wbruna force-pushed the ggml_vk_reduce_submit_igpu branch from 5e37770 to 0f0d2af Compare June 24, 2026 11:00
@0cc4m

0cc4m commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@ggml-org/maintainers Another approval needed.

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.

Misc. bug: Vulkan: DeviceLost on AMD APUs (gfx90c) due to GPU job timeout from command batch size

3 participants