mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1757] Layer split (RTX 3090 + 2x Tesla P40, Windows): every batched prefill chunk aborts with prefill gemm: cublasGemmEx: cuBLAS status 14 — 100% on 0.1.40.4 / 0.1.41, single-GPU unaffected #702
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#702
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vgame86 on GitHub (Oct 9, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1757
Summary
With a 3-GPU layer split (RTX 3090 + 2x Tesla P40, Pascal sm_61) on Windows, every request whose rendered prompt exceeds the short-read threshold (~64 tokens) aborts the engine on its first batched prefill chunk with:
(
CUBLAS_STATUS_INTERNAL_ERROR; the engine thenstd::exit(1)s viack()insrc/prefill/gemm.cu:81, and the server answers the client withthe engine stopped unexpectedly (exit code 1); the next request restarts it.)This is not tool/function-calling related and not a small-chunk issue: a plain multi-hundred-token Chinese prompt without
toolscrashes identically. Tools only made the visible difference because they render a 3-token message into a 277-token prompt, crossing the 64-token short-read threshold.Reproduction
BUILD.json: archs 60/61/70/75/80/86/89,"experimental": true)Serve config (argv as logged):
(i.e.
3090: layers 0-31,P40 #1: 32-39,P40 #2: 40-47 + head).Then send any chat request whose rendered prompt is > 64 tokens, e.g. a ~170-token question. With
STRATA_TRACE=1in the config'senv:Second session, identical:
What I can rule out / confirm
32,40), prompt ≤ 64 tokens (verify-window path)32,40), prompt > 64 tokens (batched prefill)--layer-split), same model/pack, long prompts (≥ 277 tokens, incl. multi-page answers)Additional checks:
Gemm::bf16path (cublasGemmEx,CUDA_R_16BF, nof16suffix in the error line). The Pascal fp32 fallback in the same function ("cublasSgemm (bf16 on Pascal)") never appears in any of the logs (0 occurrences across ~25 crash sessions), i.e. when the batched prefill runs on the P40 stages the code is reaching the raw BF16cublasGemmEx— the path that#395measured as unsupported on a P40. If that reading is right, the question is whybf16_path()/grow()silently falls through to the BF16 call instead of thecublasSgemmfp32 route on sm_61.LOW: requests may stallwarning). Short reads (≤64 tokens) on the same sessions work, so it doesn't look like a plain OOM; but I have not isolated this (see "not yet tried").nvlddmkm/Display events in the Windows System log around the crash times — no TDR, no driver fault. It is a clean cuBLAS error return.--resident-expertsper se: 0.1.40.3 completed long replies with the same resident-RAM mode before aborting later.Not yet tried (happy to run)
STRATA_BF16_TC=2(force the FP16 test path) on the split, to see whether the crash follows the BF16 call or the split itself.--short-read 0and--short-read 2048to move the threshold.Full per-line logs of two sessions (startup → crash,
STRATA_TRACE=1) are available; ask and I'll paste/attach.Related
cublasGemmEx ... status 14) but on sub-32-token chunks with--short-read 0, reported on RTX 2080 Ti + P100. Possibly the same underlying GEMM-path bug, different trigger.src/prefill/gemm.curoutes Pascal throughcublasSgemmfp32 — which is exactly the path we never observe taken.Workaround
Run the model on the 3090 alone (drop
--layer-splitand the P40s fromgpu). Verified stable for long prompts and function-calling requests. Cost: no speed benefit from the P40s.@Niko1221 commented on GitHub (Oct 10, 2026):
Thanks for the very precise report. Reading the code: the 0.1.42 fix for #1650 only retries the FP16 GEMM, and your failing call is the BF16 one. On Pascal the BF16 product goes through FP32 copies of the weight and of the activations. When the card had no room for those copies (you saw 100, 84, 118 and 0 MiB free), the code skipped the conversion and called the plain BF16 cuBLAS function, which a P40 answers with status 14. That fits every detail you list: single GPU works, short prompts (verify windows) work, 0.1.40.3 failing intermittently with the VRAM left.
v0.1.42 converts the weight in tiles when the whole copy does not fit, and if even a small tile does not fit the engine stops with a message that names the card and the settings to change, instead of status 14. On a Tesla P100 forced into the tiled path (about 150 MiB left) a 2,495-token prompt gave the same answer word for word as the untiled path. We could not reproduce status 14 itself on one card, since yours came from a layer split, so the test we would like is the same request that crashed, on v0.1.42. If it still fails, a higher --vram-reserve-mib or moving a layer or two from the P40s to the 3090 (--layer-split 34,41) gives those stages more room.
@vgame86 commented on GitHub (Oct 12, 2026):
After conducting further testing, I discovered that the issue stemmed from the different architectures of the two graphics cards. When I used only two Tesla P40s to load the model, the pre-fill block did not abort, and when I run
llama.cppwith both the RTX 3090 and the Tesla P40, the issue does not occur. I’m not sure how the mainlinellama.cppresolves this problem.@matunoki commented on GitHub (Oct 13, 2026):
Same symptom here with a different pair: TITAN X (Pascal, sm_61) + RTX 3090 (sm_86), 2-GPU layer split — and it also fails on the FP16 path, with plenty of free VRAM.
Environment: Engine 0.1.43.1 (CUDA 12 ready-made, includes
f63a57e), Windows 11, driver 560.81, cuBLAS 12.9.1 (also tried 12.8), Qwen3.8-Flash-Next IQ3_XXS, "gpu": [0,1], "layer_split": "auto" (auto picks TITAN X = layers 0-2, 3090 = layers 3-47).Symptom: prompts of ≤ ~70 tokens work; the first batched prefill chunk aborts with
prefill gemm: cublasGemmEx: cuBLAS status 14(exit code 0xC0000005). Single-GPU is unaffected.What I tried:
cublasGemmEx f16: cuBLAS status 14, i.e. the #1650 fixed-algorithm retry also fails here.Works: --short-read 65536 (everything read through the decode windows): a 6020-token prompt finished, 80 tok/s read, 48-60 tok/s decode. Of course ~10x slower than the batched path.
Decode speed with 2 GPUs is about the same as the 3090 alone (48-60 vs 55-63 tok/s), so there is no gain either.
@Niko1221 commented on GitHub (Oct 13, 2026):
Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.
If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.