[Quantization] Remove the dead ocp_mx_scheme branch from moe_kernel_quantize_input - #52603
Merged
AndreasKaratzas merged 1 commit intoAug 18, 2026
Conversation
…l_quantize_input`
`moe_kernel_quantize_input` carries an `ocp_mx_scheme` parameter and a
leading branch that short-circuits `*_a_fp8` schemes into
`_fp8_quantize_dequantize`. Nothing reaches it: of the 26 call sites in
the tree, none supplies `ocp_mx_scheme=`, the maximum positional arity at
any of them is 5 against a parameter at positional index 6, and there is
no `**kwargs` splat, aliased import, `functools.partial` or `getattr`
reference anywhere.
The one arm with behavior was `.endswith("a_fp8")`, and the only
reachable a_fp8 scheme is `w_mxfp4_a_fp8` -- `w_mxfp6_e3m2_a_fp8` and
`w_mxfp6_e2m3_a_fp8` raise `NotImplementedError` earlier in
`QuarkOCP_MX_MoEMethod.get_fused_moe_quant_config`. For that scheme the
emulation experts set `quantization_emulation = True` and
`quant_dtype = current_platform.fp8_dtype()`, so the surviving dispatch
reaches the identical `_fp8_quantize_dequantize(A, A_scale)`. The other
two arms were a bare `pass` and a comment.
Remove both, per the in-code TODO and @fxmarty-amd's review on vllm-project#43983:
"`moe_kernel_quantize_input` should rely solely on `quant_dtype` now".
`FusedMoEQuantConfig.ocp_mx_scheme` and its other consumers
(`OCP_MXQuantizationEmulationTritonExperts`, the `fused_batched_moe`
NYI asserts, the deprecation guard in `fused_experts_impl`) are
untouched.
Signed-off-by: xuebwang-amd <xuebwang@amd.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
xuebwang-amd
requested review from
mgoin,
pavanimajety and
zyongye
as code owners
August 17, 2026 10:44
ocp_mx_scheme branch from `moe_kerne…
4 tasks
Contributor
Author
fxmarty-amd
approved these changes
Aug 17, 2026
fxmarty-amd
left a comment
Contributor
There was a problem hiding this comment.
LGTM thanks a lot for the cleanup!
Member
|
/ci run |
|
✅ Triggered Buildkite CI #84394 for commit |
AndreasKaratzas
approved these changes
Aug 18, 2026
wenhuach21
pushed a commit
to wenhuach21/vllm
that referenced
this pull request
Aug 19, 2026
…uantize_input (vllm-project#52603) Signed-off-by: xuebwang-amd <xuebwang@amd.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Wenhua Cheng <wenhua.cheng@intel.com>
zufangzhu
pushed a commit
to zufangzhu/vllm
that referenced
this pull request
Aug 24, 2026
…uantize_input (vllm-project#52603) Signed-off-by: xuebwang-amd <xuebwang@amd.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Zhu, Zufang <zufang.zhu@intel.com>
am-cohere
pushed a commit
to am-cohere/vllm
that referenced
this pull request
Sep 1, 2026
…uantize_input (vllm-project#52603) Signed-off-by: xuebwang-amd <xuebwang@amd.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Shortly, remove dead code.
moe_kernel_quantize_input()invllm/model_executor/layers/fused_moe/utils.pycarries anocp_mx_scheme: str | None = Noneparameter and opens its body with a block that short-circuits*_a_fp8OCP MX schemes into_fp8_quantize_dequantizebefore the normalquant_dtypedispatch ever runs. Nothing reaches that block. This PR removes the parameter and the block.This is the follow-up @fxmarty-amd asked for when introduced the
quantization_emulationpath that superseded the block, in #46142 (e368415daa):This is the left TODO:
and reconfirmed the ask in review on #43983 (review 4904664996), linking
utils.py#L288-L301— exactly the lines removed here.Why deleting it changes no behavior
The only arm with behavior was
.endswith("a_fp8"), and the only reachable a_fp8 scheme isw_mxfp4_a_fp8—w_mxfp6_e3m2_a_fp8andw_mxfp6_e2m3_a_fp8, both raiseNotImplementedErrorearlier, inQuarkOCP_MX_MoEMethod.get_fused_moe_quant_config.For
w_mxfp4_a_fp8the two paths are identical:ocp_mx_scheme.endswith("a_fp8")quant_dtype == current_platform.fp8_dtype()andquantization_emulationreturn _fp8_quantize_dequantize(A, A_scale)return _fp8_quantize_dequantize(A, A_scale)_fp8_quantize_dequantizetakes onlyAandA_scale, so nothing else was being bypassed.OCP_MXQuantizationEmulationTritonExperts.__init__sets both inputs (quantization_emulation = True,_quant_dtype = current_platform.fp8_dtype()), andTritonExperts.applyforwards them.Test Plan
Unit test
End-to-end test
Same as what tested in #43983
Test Result
Coming soon.
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.