fix: sched split-input overflow on Gemma 4 E-series partial offload#46
Merged
Conversation
Gemma 4 E-series routes a per-layer embedding input into every block; under partial offload (e.g. 3.5GB RENOIR Vulkan + CPU) each one lands in the split input list and GGML_ASSERT(n_inputs < GGML_SCHED_MAX_SPLIT_INPUTS) aborts during memory fitting — the in-app 'model process crashed' report. Reproduced with gemma-4-E4B-it-Q4_K_S on RADV RENOIR; -ngl 0 avoids it, any GPU offload trips it. 30 -> 128 with headroom for 31B-deep stacks.
Member
Author
|
Verified on the reporting hardware (5800H / RADV RENOIR 3.5GB): the CI artifact from this PR loads |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In-app crash report: loading
gemma-4-E4B-it-Q4_K_Son a 3.5GB RADV RENOIR laptop aborts duringcommon_fit_paramswithGGML_ASSERT(n_inputs < GGML_SCHED_MAX_SPLIT_INPUTS)(ggml-backend.cpp:1367), surfaced by Atomic Chat as 'access violation / segfault'.Root cause: the E-series feeds a per-layer embedding input into every block. With partial offload the graph splits between Vulkan and CPU and every per-layer input joins one split's input list — any model deeper than 30 layers trips the assert. Big-VRAM GPUs never split, which is why only small-VRAM machines see it.
Verified on the reporter's exact hardware (5800H/RENOIR): current
b10018-1.1.1release binary crashes with and without--mmproj, with-fit off; only-ngl 0avoids it. Upstream default is 30 and has no fix.Raise the default to 128 (per-split fixed arrays; memory cost is negligible). CI artifact from this PR will be re-tested on the same machine before merge.