Repository navigation
Conversation
|
I ran this on a real GPU, since the description notes no GPU E2E was done. Setup: RTX 4500 Ada (sm89, 24 GB), driver 590.48.01. I applied this PR's diff ( Issue repro (stabilityai/stablelm-3b-4e1t, quantization="fp8_per_channel", max_model_len=4096, gpu_memory_utilization=0.5, greedy, 8 tokens):
So on this card, where the CUTLASS FP8 kernel is available, I could not reproduce the crash from the issue, and this PR does not change the working path. I did not exercise the new error message end to end, since CUTLASS is supported here. Tests: I used an AI assistant (Claude) to help set this up and summarize it. I ran the builds, tests and repro myself. |
|
This pull request has merge conflicts that must be resolved before it can be |
a81e4e6 to
063bae2
Compare
|
This pull request has merge conflicts that must be resolved before it can be |
|
Thanks for the fix — I hit the same error-reporting gap while triaging this area, so I read this closely. The approach (reject per-token in Marlin's Blocking: In the CUDA chooser list (
This matters more because Suggested fix: add the same per-token rejection to Rebase note: besides the guard conflict above, once the tuple-guard is removed the Things I checked that look safe (sharing so reviewers don't have to re-derive them):
AI assistance was used while verifying this review against |
…er_channel MarlinFP8ScaledMMLinearKernel and HummingFP8ScaledMMLinearKernel can_implement accepted every config, so the scaled-mm chooser could return a W8A16 weight-only kernel for PTPC (per-token activation) and discard earlier kernel rejection reasons. The PTPC path then raised a generic SM89+/ROCm message after weight allocation. Reject per-token activation in both Marlin and Humming (W8A16 weight-only), select the kernel before create_weights allocates, and wrap chooser failures with an fp8_per_channel-prefixed message that keeps the per-kernel Reasons list. Fixes vllm-project#61316 Co-authored-by: Grok Build <grok@x.ai> Signed-off-by: YidaWeng <84164537+YidaWeng@users.noreply.github.com>
063bae2 to
a6c541a
Compare
|
Addressed the Humming follow-up from #61324 (comment):
Validation: |
|
Thanks for the thorough turnaround — I checked the update and it closes the concern:
LGTM on my end (non-binding — I don't have write access). (Verified against the updated branch and current |
|
This pull request has merge conflicts that must be resolved before it can be |
Overview
Make
quantization="fp8_per_channel"fail with the scaled-mm chooser's per-kernel rejection reasons instead of a post-allocation Marlin/Humming guard. Fixes #61316.Claims
MarlinFP8ScaledMMLinearKernel.can_implementandHummingFP8ScaledMMLinearKernel.can_implementreject per-token activation FP8 (W8A16 weight-only) with an explicit reason.choose_scaled_mm_linear_kernelraises with the fullReasons:list, including Marlin and Humming rejections (no silent W8A16 selection).Fp8PtpcOnlineLinearMethod.create_weightsselects the kernel before allocating weights and prefixes chooser failures withquantization="fp8_per_channel".Validation
.venv/bin/python -m pytest \ tests/kernels/quantization/test_scaled_mm_kernel_selection.py \ tests/quantization/test_fp8_per_channel.py \ -v # 30 passed, 3 skipped (GPU-only / gfx942-only)uvx ruff check \ vllm/model_executor/kernels/linear/scaled_mm/marlin.py \ vllm/model_executor/kernels/linear/scaled_mm/humming.py \ vllm/model_executor/layers/quantization/online/fp8.py \ tests/kernels/quantization/test_scaled_mm_kernel_selection.py \ tests/quantization/test_fp8_per_channel.py # All checks passedNo GPU E2E against the issue reproducer (
stablelm-3b-4e1t+fp8_per_channel) in this environment; the unit tests cover the chooser rejection path and the PTPC create_weights error wrapping.Details
Root cause: Marlin's (and Humming's)
can_implementreturned(True, None)for every config. For PTPC (kFp8DynamicTokenSym+kFp8StaticChannelSym), earlier kernels may be rejected (no Cutlass FP8, no torch FP8 scaled_mm, etc.), a W8A16 kernel is selected, and the collectedfailure_reason_listis discarded. A later isinstance guard inFp8PtpcOnlineLinearMethod.create_weightsthen raised a generic "Requires SM89+ / ROCm MI3xx" message aftersuper().create_weights().Approach: Reject per-token activation in Marlin and Humming so the chooser either falls through to a real W8A8 kernel (e.g. ChannelWiseTorch when available) or raises with all rejection reasons. Move PTPC kernel selection before weight allocation and wrap chooser
ValueErrors with anfp8_per_channelprefix while preserving the Reasons list.Follow-up from review: Humming sits after Marlin in
_POSSIBLE_FP8_KERNELS. Without the same per-token rejection, Marlin's new refusal would fall through to Humming and reintroduce the silent-wrong-kernel failure. Also rebased onto main so the Marlin+Humming post-allocation guard from #60163 is replaced by the chooser path (and the now-unused Humming import inonline/fp8.pyis removed).Tradeoff: Devices that previously selected Marlin/Humming for PTPC and then crashed will now either succeed via an earlier capable kernel or fail earlier with actionable Reasons. Per-tensor / W8A16 Marlin and Humming paths are unchanged.
Not duplicating: Searched open PRs for
#61316,fp8 rejection reasons, andfailure_reason_list. Related open work (#57600) gates Marlin on weight group shapes only; it does not reject per-token activation or fix the PTPC error path. #60163 already documented Humming as W8A16 for PTPC and added the post-allocation isinstance guard this PR replaces.AI assistance was used to draft the change, tests, and this PR description. The human submitter reviewed every changed line and ran the tests above.
Pull Request Checklist
I used vLLM's
/pr-checklistskill. (Mandatory for agents, optional for humans).AI assistance was used during the creation of this PR.
Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.
Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.
Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.
Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.