mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-11-05 01:07:28 +00:00
[GH-ISSUE #1570] [Bug] Shared memory crash running Kimi K2 Thinking with sglang on 4x RTX 6000 Workstation Pro #1038
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/ktransformers#1038
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 @0xhaggis on GitHub (Nov 8, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/1570
Originally assigned to: @Atream on GitHub.
Checklist
Describe the bug
Quick description
Following the example at https://github.com/kvcache-ai/ktransformers/blob/main/doc/en/Kimi-K2-Thinking.md there is a repeatable crash running sglang with the ktransformers CPU kernel. The error message is:
triton.runtime.errors.OutOfResources: out of resource: shared memory, Required: 106496, Hardware limit: 101376. Reducing block sizes ornum_stagesmay help.This crash under 2 known conditions:
Reproduction
Side note
The arg
--kt-threadpool-count 2must always be2otherwise Bad Things happen. For example, setting it to1causes the model to output a never-ending stream of only the lowercase letter "b".Example #1: crash upon second request
Environment
Server details
Software setup
@0xhaggis commented on GitHub (Nov 8, 2025):
Example #2: Crash from long prompt
The following example shows:
@Atream commented on GitHub (Nov 8, 2025):
Hi, could you please try to remove
--attention-backend tritonargument?@0xhaggis commented on GitHub (Nov 8, 2025):
[2025-11-07 20:45:36] WARNING server_args.py:1177: Attention backend not explicitly specified. Use triton backend by default.It did the same thing because it fell back to using triton anyway.
@Atream commented on GitHub (Nov 8, 2025):
Maybe you can try other backend such as flashinfer. Here is the backends work for MLA.
We will also fix the Triton kernel bug in parallel.
@0xhaggis commented on GitHub (Nov 8, 2025):
I'd started working my way through them.
torch_nativefailed with:Trying
flashinfernow.@0xhaggis commented on GitHub (Nov 8, 2025):
Flashinfer appears to have done the trick. And it's faster. Win-win. Thank you.
@Atream commented on GitHub (Nov 8, 2025):
Thank you for pointing out the issue and helping with the debugging. We’ll recommend the FlashInfer backend in the tutorial, and could you please update the post on Reddit as well?