Integrate Qwen3 CANN FAI decode#69
Conversation
|
Important Review skippedDraft detected. 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:
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 refactors the Qwen3-14B NPU runner and executor to support dynamic public batching (batch 1 or full capacity) for the fused decode kernel, replacing the previous fixed-batch padding approach. It also removes the standalone token embedding kernel, as embedding lookup and greedy sampling are now integrated directly into the fused decode kernel. Feedback is provided regarding a potential shape mismatch in _stage_decode_inputs where slicing token_ids with :width could cause issues if sampled_ids_width is greater than 1.
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.
e956c30 to
c6e05a5
Compare
45de5eb to
6d64335
Compare
- Pin the direct CANN FAI kernel and dispatch active B1/B16 prefixes without replicated KV rows. - Restrict the runtime to onboard A2/A3 and reject unsupported intermediate batches. - Keep warmup KV accesses on the scratch page and cover independent full-batch histories. - Rebind host decode outputs for current PyPTO tuple specialization and allocate 2 GiB for Qwen CI warmup.
Summary
[B, 8]token ABI. B1 no longer replicates inactive KV rows, and serving performs no KV-cache layout conversion.-1slot.Testing
python -m pytest -q tests/test_batching.py tests/test_parallel.py tests/test_device_sampling_submission.py: 40 passed.git diff --check: passed.b2f347fcompiled the complete HOST decode wrapper toDistributedCompiledProgram.task-submit: tasktask_20260713_002105_18464897737, 8/8 expected tokens matched.task_20260713_013155_194847010745, full accuracy passed.task-submit: tasktask_20260712_234748_24151917638, 16 requests matched their independent B1 references without deadlock.Dependencies