Skip to content

📝 [NPU] Use vendor-neutral wording in quantization comments - #36768

Merged
sglang-npu-bot merged 2 commits into
sgl-project:mainfrom
TallMessiWu:junlin-remove-vendor-refs-comments
Aug 29, 2026
Merged

sglang-npu-bot merged 2 commits into
sgl-project:mainfrom
TallMessiWu:junlin-remove-vendor-refs-comments

Conversation

@TallMessiWu

@TallMessiWu TallMessiWu commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Follow-up to #34829. That PR cleaned the MXFP8/MXFP4 linear methods, but the
NPU quantization comments still carried two kinds of vendor wording, all landed
by my earlier NPU quantization PRs:

  1. Comments naming external projects, left in five files 📝 [NPU] Clean up quantization comments #34829 did not reach.
  2. Ascend used as prose branding in docstrings for modules that are otherwise
    named and namespaced npu.

Modifications

Comment-only cleanup, no code touched.

Third-party references removed:

Every removed line was pure attribution: the surrounding comments already state
the layout, format and calibration requirements those references pointed at
(FRACTAL_NZ format 29, the [in/level0_block_size, out] L0 scale transpose, the
smooth-quant mul_scale requirement, the strided transpose views). Where a
reference carried real information — the online MXFP4 diffusion weight path being
experimental because the established path is offline-only — the fact is kept and
only the project name dropped.

Ascend prose reworded to NPU:

  • linear_method_npu.py — six class docstring headers, plus the three hardware
    requirement lines (Ascend 950 (A5) → A5 NPU; the file already uses the bare
    A5 / A2/A3 shorthand elsewhere).
  • moe_methods.py — the two dispatcher dtype notes and the NPUMXFP8MoEMethod
    header.
  • online_moe_methods.py, modelslim_mxfp4_scheme.py, modelslim_mxfp8_scheme.py,
    mxfp4_npu.py — module and class docstring headers.

Identifiers are deliberately untouched, since they are real API names and CLI
values: AscendQuantInfo, AscendRunnerCore, MoeRunnerBackend.ASCEND,
is_ascend_fuseep(), ascend_tp / ascend_fuseep, and the ascend attention
backend. The two runtime error strings that name the hardware are also left as
they are, so user-facing messages do not change.

Accuracy Tests

Not applicable — comments only, no behaviour change. python -m black --check
and an AST parse pass on all eight files.

Speed Tests and Profiling

Not applicable — comments only.

Checklist


CI States

Latest PR Test (Base): ❌ Run #33155197134
Latest PR Test (Extra): ❌ Run #33155196857
Latest PR Test (AMD ROCm 7.2): ❌ Run #33155196931

Follow-up to sgl-project#34829, which cleaned the MXFP8/MXFP4 linear methods but left
comments in five other files that name external projects.

- srt MoE MXFP8: the init-routing scale-normalisation docstring, the fused-MoE
  weight-layout note and the Qwen3 MoE router-gate note (sgl-project#30768).
- srt dual-level MXFP4: the NPUDualLevelMXFP4LinearMethod docstring (sgl-project#23795).
- multimodal_gen MXFP4: the offline ModelSlim scheme and the online diffusion
  method (sgl-project#22338).

Every removed line was pure attribution; the surrounding comments already state
the layout, format and calibration requirements they were pointing at. Where a
reference carried real information (the online MXFP4 weight path being
experimental because the established path is offline-only), the fact is kept and
only the project name dropped.

Comment-only change; no behaviour change.
Comment/docstring only: replace the Ascend brand wording with NPU in the SRT and Diffusion quantization modules. Identifiers (AscendQuantInfo, MoeRunnerBackend.ASCEND, ascend_tp/ascend_fuseep, the ascend attention backend) and runtime error strings are left untouched.
@TallMessiWu TallMessiWu changed the title 📝 [NPU] Remove third-party references from quantization comments 📝 [NPU] Use vendor-neutral wording in quantization comments Aug 28, 2026
@ping1jing2

Copy link
Copy Markdown
Collaborator

i merged it without running CI as there is no code change in this PR

@ping1jing2 ping1jing2 self-assigned this Aug 29, 2026
@sglang-npu-bot
sglang-npu-bot merged commit 09ecb9a into sgl-project:main Aug 29, 2026
107 of 123 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

diffusion SGLang Diffusion npu

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants