Repository navigation
Conversation
…16 sm90 build The atomic-add reduction for dense Marlin GEMMs was opt-in via VLLM_MARLIN_USE_ATOMIC_ADD and only applied to n < 2048, k >= 2048 shapes. On GB10 it is 5-13% faster at the kernel level on those shapes but shows no end-to-end difference, accumulates in the output dtype instead of fp32, and is nondeterministic. Its only build requirement was the 9.0+PTX target for the bf16 Marlin kernels (native bf16x2 atomicAdd). - Always pass use_atomic_add=False from the Marlin linear paths and remove should_use_atomic_add_reduce and the startup log that recommended the env. - VLLM_MARLIN_USE_ATOMIC_ADD now has no effect and warns once that it is deprecated and will be removed in v0.35.0. - Build bf16 Marlin kernels with the same arch list as fp16. - Drop the no-op env from the MiniMax-M3 H200 recipe (Marlin MoE never used atomic adds). The kernel-level use_atomic_add argument is left for a follow-up to avoid conflicting with the in-flight Marlin op-signature changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: mgoin <mgoin64@gmail.com>
mgoin
requested review from
Harry-Chen,
LucasWilkinson,
esmeetu,
hmellor,
pavanimajety,
robertgshaw2-redhat,
tlrmchlsmth,
yewentao256 and
zyongye
as code owners
November 4, 2026 02:41
Contributor
1 of 20 tasks
yewentao256
approved these changes
Nov 4, 2026
yewentao256
left a comment
Member
There was a problem hiding this comment.
LGTM, thanks for the work!
Comment on lines
+116
to
+124
| def test_deprecated_marlin_atomic_add_env_warns(monkeypatch, caplog_vllm): | ||
| monkeypatch.setenv("VLLM_MARLIN_USE_ATOMIC_ADD", "1") | ||
| with caplog_vllm.at_level(logging.WARNING, logger="vllm"): | ||
| EngineArgs().create_engine_config() | ||
| assert any( | ||
| "VLLM_MARLIN_USE_ATOMIC_ADD is deprecated" in m for m in caplog_vllm.messages | ||
| ) | ||
|
|
||
|
|
Member
There was a problem hiding this comment.
Suggested change
| def test_deprecated_marlin_atomic_add_env_warns(monkeypatch, caplog_vllm): | |
| monkeypatch.setenv("VLLM_MARLIN_USE_ATOMIC_ADD", "1") | |
| with caplog_vllm.at_level(logging.WARNING, logger="vllm"): | |
| EngineArgs().create_engine_config() | |
| assert any( | |
| "VLLM_MARLIN_USE_ATOMIC_ADD is deprecated" in m for m in caplog_vllm.messages | |
| ) |
I don't think we need a specific unit test for this update
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
This branch was successfully deployed
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.
Overview
Part of #65560.
Deprecate
VLLM_MARLIN_USE_ATOMIC_ADD(now a no-op) and stop building the bf16 Marlin kernels for9.0+PTX, which only existed for the native bf16x2atomicAddused by that opt-in path. Independent of #65540 and #65542.Claims
VLLM_MARLIN_USE_ATOMIC_ADDnow logs a one-time deprecation warning (removal in v0.35.0) instead of changing kernels.VLLM_MARLIN_USE_ATOMIC_ADD=1, and drops the setting from the MiniMax-M3 H200 recipe. Marlin MoE always passesuse_atomic_add=False, so it was a no-op there.Validation
GB10 (SM121), CUDA 13.0.
Kernel microbenchmark (GPTQ INT4, group 128, CUDA-graph timing,
ops.marlin_gemmwithuse_atomic_addon vs off) on the only shapes where the path could fire (n < 2048, k ≥ 2048):fp16 is the same within 0.1–0.3 µs. Atomic adds accumulate in the output dtype, with max relative error vs the fp32 reduce of about 5e-3 for bf16 and 7e-4 for fp16, and are run-to-run nondeterministic.
End to end, batch-1 decode on
Qwen/Qwen2.5-1.5B-Instruct-GPTQ-Int4, whosedown_proj(k=8960, n=1536) qualifies (vllm bench latency --input-len 128 --output-len 512, 2 runs each):VLLM_MARLIN_USE_ATOMIC_ADD=1--linear-backend hummingNo measurable difference.
Tests:
test_marlin_gemm.py -k test_marlin_gemm522 passed,test_marlin_tile_padding.py98 passed,test_moe.py -k marlin305 passed, plus the newtest_deprecated_marlin_atomic_add_env_warns. GSM8K (100 q) onQwen/Qwen2.5-3B-Instruct-GPTQ-Int4with the env set: 0.61, with the warning logged once:A configure with
TORCH_CUDA_ARCH_LIST="8.0;9.0;12.0"gives the bf16 and fp16 Marlin kernels the same targets:sm_80,compute_80,sm_120f.Details
use_atomic_addargument on themarlin_gemmop and the kernel's atomic branch are left as-is (alwaysFalsefrom Python), to avoid conflicting with [Kernel] Marlin: remove 8-bit (INT8/FP8) activation support, rely on Humming #65542, which rewrites those op signatures. A follow-up removes them after [Kernel] Marlin: remove 8-bit (INT8/FP8) activation support, rely on Humming #65542 lands.Not a duplicate: no open PR removes this path. #48569 (extend Marlin atomic-add to fused MoE) goes the other way and would be superseded. #38669 touches the Marlin repack PTX arch list on H100 but not the bf16 GEMM targets.
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.
🤖 Generated with Claude Code