Skip to content

[MoE] Remove the unused sycl::queue in moe_align_block_size - #590

Merged
airMeng merged 1 commit into
sgl-project:mainfrom
wdziurdz:moe-align-remove-unused-queue
Oct 29, 2026
Merged

airMeng merged 1 commit into
sgl-project:mainfrom
wdziurdz:moe-align-remove-unused-queue

Conversation

@wdziurdz

Copy link
Copy Markdown
Contributor

moe_align_block_size creates a sycl::queue on every call that is never used; the kernels are submitted to the current XPU stream. Creating it costs 1-2 ms of host time per call, and SGLang's Triton MoE runner calls this op once per MoE layer per forward, so eager decode becomes host bound.

DeepSeek on Arc Pro B60, SGLang with --attention-backend triton --moe-runner-backend triton, sglang.benchmark.one_batch 1024 in / 32 out:

model metric before after
DeepSeek-V2-Lite-Chat-FP8 decode step, bs1 95.7 ms 60.3 ms
DeepSeek-V2-Lite-Chat-FP8 decode step, bs16 96.5 ms 65.8 ms
DeepSeek-OCR decode step, bs16 27.8 ms 13.1 ms

Test

pytest tests/test_moe_align.py

5168 passed.

The queue was never used, the kernels go to the current XPU stream, and creating it cost 1-2 ms of host time per call.

Signed-off-by: Witold Dziurdz <witold.dziurdz@intel.com>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 14:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the removal of unused per-call SYCL queue construction.

No open issues 🎉

What changed in this PR

Removes unused per-call SYCL queue construction from moe_align_block_size to reduce host overhead in MoE inference. Kernel submissions remain on the current XPU stream.

Changes:

  • Deletes the unused sycl::queue variable without changing kernel logic.
  • Reports improved DeepSeek decode latency and 5,168 passing MoE alignment tests.
File Description
src/​sycl/​MoEAlign.cpp Removes unused queue construction from moe_align_block_size.

Review effort: Balanced

@wdziurdz

Copy link
Copy Markdown
Contributor Author

cc @airMeng @sunjiweiswift could you take a look?

@airMeng
airMeng merged commit 9fa99f7 into sgl-project:main Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants