fix(qwen): default PTO2_RING_HEAP to 512MB so a plain Qwen3-14B launch doesn't deadlock - #106
fix(qwen): default PTO2_RING_HEAP to 512MB so a plain Qwen3-14B launch doesn't deadlock#106lterrac wants to merge 1 commit into
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughQwen3-14B now defaults ChangesQwen3-14B runtime heap
Estimated code review effort: 1 (Trivial) | ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request automatically configures the PTO2_RING_HEAP environment variable to 512MB for Qwen3-14B to prevent HEAP_RING_DEADLOCK during warmup, and documents this behavior in the README. The feedback suggests setting this environment variable before calling super().__init__ in the constructor to ensure that any initialization logic in the base class correctly inherits the setting.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
78a4b1d to
35366d2
Compare
…deadlock The Qwen3-14B warmup (default --max-num-batched-tokens 4096) overflows the PTO2 ring-task heap at its 256MB runtime default and aborts startup with HEAP_RING_DEADLOCK (surfaced as ACL_ERROR_RT_AICPU_EXCEPTION / code 507018). Set a 512MB default in the Qwen3-14B executor before any worker is created (the PTO2_RING_HEAP env var still overrides), and document it in the README, so serving and offline launches work without the caller knowing this knob.
35366d2 to
a5b19df
Compare
Summary
A plain
pypto-serving ... --model Qwen3-14B(the exact command in the README)fails to start: the warmup prefill at the default
--max-num-batched-tokens 4096overflows the PTO2 ring-task heap, which defaults to 256MB in the runtime,and startup aborts with
HEAP_RING_DEADLOCK(surfaced asACL_ERROR_RT_AICPU_EXCEPTION/ code507018).This sets a working default so Qwen3-14B launches out of the box, and documents
the knob.
Change
Qwen314BPyptoExecutor.__init__doesos.environ.setdefault("PTO2_RING_HEAP", 512MB)before any worker is created. It's asetdefault, so an explicitPTO2_RING_HEAPfrom the caller still wins; it's in the executor, so both theserving and offline (
npu_generate.py) paths get it.how to override it.
512MB is the smallest size that clears the warmup on a 14B (256MB deadlocks).
Verified
Launched Qwen3-14B without any
PTO2_RING_HEAPin the environment:Application startup complete, noHEAP_RING_DEADLOCKthe 512MB default took effect (256MB would be ~1.1 GB)
"Once upon a time"→", there was a young girl named Lily"Notes