repo
stringclasses
3 values
commit
stringlengths
40
40
date
stringdate
2023-04-02 02:30:17-0500
2026-10-18 07:42:16-0500
pr_number
int64
20
61.9k
⌀
pr_url
stringlengths
44
53
⌀
title
stringlengths
8
263
message
stringlengths
8
8k
path
stringlengths
10
155
language
stringclasses
4 values
license
stringclasses
4 values
before_code
stringlengths
160
118k
after_code
stringlengths
340
120k
diff
stringlengths
149
51k
lines_added
int64
0
729
lines_removed
int64
0
488
files_in_commit
int64
1
10
models_mentioned
listlengths
0
4
hardware_mentioned
listlengths
0
16
speedup_claims
listlengths
0
10
prompt
stringlengths
569
119k
pr_body
stringlengths
0
24k
gains
stringlengths
2
197k
kernel_speedup
float64
0.78
150
⌀
e2e_speedup
float64
0.76
136
⌀
vllm
efe7adb5e145de0de2a691cc86756f088f4f01d0
2026-06-12T12:54:00-07:00
45,322
https://github.com/vllm-project/vllm/pull/45322
[Perf] Use native DSA indexer decode path for next_n > 2 on SM100 (#45322)
[Perf] Use native DSA indexer decode path for next_n > 2 on SM100 (#45322) Signed-off-by: zixi-qi <zixi@inferact.ai> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Yongye Zhu <zyy1102000@gmail.com>
vllm/v1/attention/backends/mla/indexer.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from dataclasses import dataclass import torch import vllm.envs as envs from vllm.config import VllmConfig from vllm.logger import init_logger from vllm.platforms import current_platform from vllm.triton_utils i...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from dataclasses import dataclass import torch import vllm.envs as envs from vllm.config import VllmConfig from vllm.logger import init_logger from vllm.platforms import current_platform from vllm.triton_utils i...
--- vllm/v1/attention/backends/mla/indexer.py +++ vllm/v1/attention/backends/mla/indexer.py @@ -231,8 +231,6 @@ class DeepseekV32IndexerMetadataBuilder(AttentionMetadataBuilder): reorder_batch_threshold: int = 1 - natively_supported_next_n_fp4: list[int] = [1, 2] - # TODO (matt): integrate kernel with nex...
15
11
1
[]
[ "SM100" ]
[]
Optimize this triton kernel file from vllm (vllm/v1/attention/backends/mla/indexer.py). Goal: [Perf] Use native DSA indexer decode path for next_n > 2 on SM100 Target hardware: SM100 Target models: unspecified Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributo...
## Purpose On SM100, the DeepGEMM paged MQA logits kernels support any `next_n` natively (multi-atom decomposition, FP8 and FP4 indexer caches), so the FP4 indexer cache no longer needs the flattening fallback for `next_n > 2` — flattening is kept only outside the SM100 family, where the FP8 kernel requires `next_n ∈ ...
[{"scope": "e2e", "hardware": "GB200", "model": "DeepSeek V4 Flash", "shape": "next_n=4", "batch_size": 64, "metric": "request throughput", "unit": "req/s", "higher_is_better": true, "baseline": 1.98, "optimized": 1.97, "stated_speedup": null, "speedup": 0.9949}, {"scope": "e2e", "hardware": "GB200", "model": "DeepSeek...
null
0.9949
vllm
fcf5115c45b9acfe3a77052ddbb7dfb0f4d5ef18
2026-06-11T23:17:52-04:00
44,899
https://github.com/vllm-project/vllm/pull/44899
[ROCm][DSv4][Perf] Flash-decode split-K decode attention kernel (#44899)
[ROCm][DSv4][Perf] Flash-decode split-K decode attention kernel (#44899) Co-authored-by: vLLM Contributor <contributor@vllm.ai>
vllm/v1/attention/ops/rocm_aiter_mla_sparse.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import functools import importlib import math from importlib.util import find_spec import torch import torch.nn.functional as F import vllm.envs as envs from vllm.compilation.breakable_cudagraph import eager_bre...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import functools import importlib import math from importlib.util import find_spec import torch import torch.nn.functional as F import vllm.envs as envs from vllm.compilation.breakable_cudagraph import eager_bre...
--- vllm/v1/attention/ops/rocm_aiter_mla_sparse.py +++ vllm/v1/attention/ops/rocm_aiter_mla_sparse.py @@ -1406,6 +1406,348 @@ ) +@triton.jit +def _sparse_attn_decode_partial_kernel( + q_ptr, + main_cache_ptr, + main_indices_ptr, + main_indptr_ptr, + extra_cache_ptr, + extra_indices_ptr, + ...
535
10
1
[ "deepseek" ]
[ "ROCM" ]
[]
Optimize this triton kernel file from vllm (vllm/v1/attention/ops/rocm_aiter_mla_sparse.py). Goal: [ROCm][DSv4][Perf] Flash-decode split-K decode attention kernel Target hardware: ROCM Target models: deepseek Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributor...
## Purpose This PR optimizes the DeepSeek-V4 sparse **decode** attention path on ROCm (`_sparse_attn_decode_ragged_kernel`), which is GPU-occupancy-bound at small batch sizes: DSV4's 16 TP-local heads collapse to a single head-block, so the whole decode runs on just `batch` workgroups and leaves most of a 256-CU gfx950...
[{"scope": "kernel", "hardware": "gfx950", "model": "DeepSeek-V4", "shape": "16 heads, SWA<=128, topk<=1024, block_size=64", "batch_size": 4, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 277, "optimized": 35, "stated_speedup": null, "speedup": 7.9143}, {"scope": "kernel", "hardware": "gfx95...
4.3846
1.1869
vllm
a4b14b98c6f6a10bee1f48154baf4098b7e117ca
2026-06-10T01:41:26+08:00
44,173
https://github.com/vllm-project/vllm/pull/44173
[Kernel] Speed up silu_and_mul_per_block_quant with warp-shuffle reduction + vectorized I/O (#44173)
[Kernel] Speed up silu_and_mul_per_block_quant with warp-shuffle reduction + vectorized I/O (#44173) Signed-off-by: SII-yangdian <yangdian@sii.edu.cn> Co-authored-by: SII-yangdian <yangdian@sii.edu.cn>
csrc/libtorch_stable/quantization/fused_kernels/fused_silu_mul_block_quant.cu
cuda
Apache-2.0
// SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright contributors to the vLLM project #include "../../torch_utils.h" #include "../../dispatch_utils.h" #include "quant_conversions.cuh" namespace vllm { // Logic: one thread block per (token, group) pair template <typename scalar_t, typename sc...
// SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright contributors to the vLLM project #include "../../torch_utils.h" #include "../../dispatch_utils.h" #include "quant_conversions.cuh" namespace vllm { // Logic: one WARP per (token, group). Each of the 32 lanes owns EPT = // group_size / 32 co...
--- csrc/libtorch_stable/quantization/fused_kernels/fused_silu_mul_block_quant.cu +++ csrc/libtorch_stable/quantization/fused_kernels/fused_silu_mul_block_quant.cu @@ -8,11 +8,23 @@ namespace vllm { -// Logic: one thread block per (token, group) pair +// Logic: one WARP per (token, group). Each of the 32 lanes own...
97
66
1
[]
[]
[]
Optimize this cuda kernel file from vllm (csrc/libtorch_stable/quantization/fused_kernels/fused_silu_mul_block_quant.cu). Goal: [Kernel] Speed up silu_and_mul_per_block_quant with warp-shuffle reduction + vectorized I/O Target hardware: unspecified Target models: unspecified Current file: ```cuda // SPDX-License-Iden...
## Purpose `silu_and_mul_per_block_quant` (fused `SiLU(gate) * up` + per-(token, group) FP8/INT8 quantization on the DeepSeek block-FP8 MoE expert path) is functionally complete but has never been performance-tuned. The current kernel launches **one thread block per (token, group)**, does **one scalar load per element...
[{"scope": "kernel", "hardware": "H200", "model": null, "shape": "hidden_size=2048,group_size=128", "batch_size": 512, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 7.21, "optimized": 3.73, "stated_speedup": 1.93, "speedup": 1.933}, {"scope": "kernel", "hardware": "H200", "model": null, "sha...
2.5206
null
vllm
062b05ff3af405b8800f7c42fa3998cc03dd97eb
2026-06-06T22:30:39+02:00
44,075
https://github.com/vllm-project/vllm/pull/44075
[ROCm][Perf] Fused MoE W4A16 HIP kernel for AMD RDNA3 (gfx1100) (#44075)
[ROCm][Perf] Fused MoE W4A16 HIP kernel for AMD RDNA3 (gfx1100) (#44075) Signed-off-by: JartX <sagformas@epdcenter.es> Co-authored-by: TJian <tunjian.tan@embeddedllm.com>
csrc/rocm/ops.h
cpp
Apache-2.0
#pragma once #include <torch/all.h> torch::Tensor LLMM1(at::Tensor& in_a, at::Tensor& in_b, const int64_t rows_per_block); torch::Tensor wvSplitK(const at::Tensor& in_a, const at::Tensor& in_b, const std::optional<at::Tensor>& in_bias, const int64_t C...
#pragma once #include <torch/all.h> torch::Tensor LLMM1(at::Tensor& in_a, at::Tensor& in_b, const int64_t rows_per_block); torch::Tensor wvSplitK(const at::Tensor& in_a, const at::Tensor& in_b, const std::optional<at::Tensor>& in_bias, const int64_t C...
--- csrc/rocm/ops.h +++ csrc/rocm/ops.h @@ -27,6 +27,15 @@ torch::Tensor b_scales, torch::Tensor b_g_idx, bool use_v2_format); +void moe_gptq_gemm_rdna3(torch::Tensor a, torch::Tensor c, + torch::Tensor b_q_weight, torch::...
9
0
4
[]
[ "GFX1100", "ROCM" ]
[]
Optimize this cpp kernel file from vllm (csrc/rocm/ops.h). Goal: [ROCm][Perf] Fused MoE W4A16 HIP kernel for AMD RDNA3 (gfx1100) Target hardware: GFX1100, ROCM Target models: unspecified Current file: ```cpp #pragma once #include <torch/all.h> torch::Tensor LLMM1(at::Tensor& in_a, at::Tensor& in_b, ...
### Summary Native HIP kernel for W4A16 MoE on RDNA3 (gfx1100), replacing the Triton `fused_moe_kernel_gptq_awq` path. It uses the same dequant + dot primitives as the dense W4A16 kernel: `v_dot2_f32_f16` / `v_dot2_f32_bf16`, exllama bit-trick dequant, and 64-bit CAS atomic output. ### What it does - **Fused HIP ker...
[{"scope": "e2e", "hardware": "RX 7900 XTX", "model": "cyankiwi/Qwen3-30B-A3B-Instruct-2507-AWQ-4bit", "shape": null, "batch_size": 1, "metric": "throughput", "unit": "tok/s", "higher_is_better": true, "baseline": 82.84, "optimized": 102.01, "stated_speedup": 1.23, "speedup": 1.2314}, {"scope": "e2e", "hardware": "RX 7...
null
2.0027
vllm
062b05ff3af405b8800f7c42fa3998cc03dd97eb
2026-06-06T22:30:39+02:00
44,075
https://github.com/vllm-project/vllm/pull/44075
[ROCm][Perf] Fused MoE W4A16 HIP kernel for AMD RDNA3 (gfx1100) (#44075)
[ROCm][Perf] Fused MoE W4A16 HIP kernel for AMD RDNA3 (gfx1100) (#44075) Signed-off-by: JartX <sagformas@epdcenter.es> Co-authored-by: TJian <tunjian.tan@embeddedllm.com>
csrc/rocm/torch_bindings.cpp
cpp
Apache-2.0
#include "core/registration.h" #include "rocm/ops.h" // Note on op signatures: // The X_meta signatures are for the meta functions corresponding to op X. // They must be kept in sync with the signature for X. Generally, only // functions that return Tensors require a meta function. // // See the following links for de...
#include "core/registration.h" #include "rocm/ops.h" // Note on op signatures: // The X_meta signatures are for the meta functions corresponding to op X. // They must be kept in sync with the signature for X. Generally, only // functions that return Tensors require a meta function. // // See the following links for de...
--- csrc/rocm/torch_bindings.cpp +++ csrc/rocm/torch_bindings.cpp @@ -50,6 +50,15 @@ "gptq_gemm_rdna3_wmma(Tensor a, Tensor b_q_weight, Tensor b_qzeros, " "Tensor b_scales, Tensor b_g_idx, bool use_v2_format) -> Tensor"); rocm_ops.impl("gptq_gemm_rdna3_wmma", torch::kCUDA, &gptq_gemm_rdna3_wmma); + + ...
9
0
4
[]
[ "GFX1100", "ROCM" ]
[]
Optimize this cpp kernel file from vllm (csrc/rocm/torch_bindings.cpp). Goal: [ROCm][Perf] Fused MoE W4A16 HIP kernel for AMD RDNA3 (gfx1100) Target hardware: GFX1100, ROCM Target models: unspecified Current file: ```cpp #include "core/registration.h" #include "rocm/ops.h" // Note on op signatures: // The X_meta sig...
### Summary Native HIP kernel for W4A16 MoE on RDNA3 (gfx1100), replacing the Triton `fused_moe_kernel_gptq_awq` path. It uses the same dequant + dot primitives as the dense W4A16 kernel: `v_dot2_f32_f16` / `v_dot2_f32_bf16`, exllama bit-trick dequant, and 64-bit CAS atomic output. ### What it does - **Fused HIP ker...
[{"scope": "e2e", "hardware": "RX 7900 XTX", "model": "cyankiwi/Qwen3-30B-A3B-Instruct-2507-AWQ-4bit", "shape": null, "batch_size": 1, "metric": "throughput", "unit": "tok/s", "higher_is_better": true, "baseline": 82.84, "optimized": 102.01, "stated_speedup": 1.23, "speedup": 1.2314}, {"scope": "e2e", "hardware": "RX 7...
null
2.0027
vllm
fa27d4e9cf3c8d8a5a143f38c346b27c02b2c2e3
2026-06-06T18:13:50+04:00
44,700
https://github.com/vllm-project/vllm/pull/44700
[PERF] [Qwen3.5] Split mixed prefill+decode batches: route decodes to the recurrent kernel (#44700)
[PERF] [Qwen3.5] Split mixed prefill+decode batches: route decodes to the recurrent kernel (#44700) Signed-off-by: Vadim Gimpelson <vadim.gimpelson@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
vllm/model_executor/layers/mamba/gdn/qwen_gdn_linear_attn.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Inference-only Qwen3-Next/Qwen3.5 model.""" import functools from typing import Literal import torch from einops import rearrange from torch import nn from vllm import envs from vllm._aiter_ops import rocm_a...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Inference-only Qwen3-Next/Qwen3.5 model.""" import functools from typing import Literal import torch from einops import rearrange from torch import nn from vllm import envs from vllm._aiter_ops import rocm_a...
--- vllm/model_executor/layers/mamba/gdn/qwen_gdn_linear_attn.py +++ vllm/model_executor/layers/mamba/gdn/qwen_gdn_linear_attn.py @@ -66,7 +66,7 @@ ) from vllm.v1.attention.backends.gdn_attn import GDNAttentionMetadata -# Optional ROCm AITER Triton kernels for the GDN decode fast-path. +# Optional ROCm AITER Triton...
75
23
2
[ "qwen", "mamba" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/mamba/gdn/qwen_gdn_linear_attn.py). Goal: [PERF] [Qwen3.5] Split mixed prefill+decode batches: route decodes to the recurrent kernel Target hardware: unspecified Target models: qwen, mamba Current file: ```python # SPDX-License-Identifier: Apache-...
# Description This PR has 3 changes: 1. **Main: split mixed prefill+decode batches** (see below). 2. **Add MTP eval** config for Qwen3.5-397B NVFP4. 3. **Rename** `fast_kernel` → `aiter_kernel` (`fast_kernel` was too general). ## Problem GDN attention ran **all** non-spec tokens through `chunk_gated_delta_rule`. Ea...
[{"scope": "kernel", "hardware": "B200", "model": "397B-A17B-NVFP4", "shape": "mixed 953 decodes + 7239 prefill", "batch_size": null, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 4361, "optimized": 2256, "stated_speedup": 1.93, "speedup": 1.9331}, {"scope": "e2e", "hardware": "8\u00d7B200",...
1.9331
1.2438
vllm
b4a6f26c904c4dc1653c1bb623c4cb8186347175
2026-06-05T09:46:29+03:00
41,002
https://github.com/vllm-project/vllm/pull/41002
[ROCm][perf] Use workspace manager for sparse indexer allocations (#41002)
[ROCm][perf] Use workspace manager for sparse indexer allocations (#41002) Signed-off-by: Stig-Arne Grönroos <stig-arne.gronroos@amd.com> Signed-off-by: Tuukka Sarvi <tuukka.sarvi@amd.com> Co-authored-by: Stig-Arne Grönroos <stig-arne.gronroos@amd.com> Co-authored-by: TJian <tunjian.tan@embeddedllm.com>
vllm/v1/attention/ops/rocm_aiter_mla_sparse.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import functools import importlib import math from importlib.util import find_spec import torch import torch.nn.functional as F from vllm.compilation.breakable_cudagraph import eager_break_during_capture from vl...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import functools import importlib import math from importlib.util import find_spec import torch import torch.nn.functional as F import vllm.envs as envs from vllm.compilation.breakable_cudagraph import eager_bre...
--- vllm/v1/attention/ops/rocm_aiter_mla_sparse.py +++ vllm/v1/attention/ops/rocm_aiter_mla_sparse.py @@ -8,6 +8,7 @@ import torch import torch.nn.functional as F +import vllm.envs as envs from vllm.compilation.breakable_cudagraph import eager_break_during_capture from vllm.forward_context import get_forward_cont...
57
26
1
[]
[ "ROCM" ]
[]
Optimize this triton kernel file from vllm (vllm/v1/attention/ops/rocm_aiter_mla_sparse.py). Goal: [ROCm][perf] Use workspace manager for sparse indexer allocations Target hardware: ROCM Target models: unspecified Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contri...
## Purpose Replace dynamic per-call allocations in the ROCm sparse attention indexer with workspace manager allocations. The sparse attention indexer uses temporary buffers in both prefill and decode: `k_fp8` / `k_scale` in prefill and decode logits buffers in `rocm_fp8_paged_mqa_logits`. These buffers are runtime sc...
[{"scope": "e2e", "hardware": "MI355X", "model": "deepseek-ai/DeepSeek-V3.2", "shape": null, "batch_size": 128, "metric": "Output token throughput", "unit": "tok/s", "higher_is_better": true, "baseline": 2190.56, "optimized": 2686.09, "stated_speedup": null, "speedup": 1.2262}, {"scope": "e2e", "hardware": "MI355X", "m...
null
1.2444
vllm
71df063c494c111ab60f6a33c54aafe7b9ae1d02
2026-06-03T01:23:28-05:00
42,758
https://github.com/vllm-project/vllm/pull/42758
Enable perf_token_group_quant/_C_stable_libtorch for ROCm (#42758)
Enable perf_token_group_quant/_C_stable_libtorch for ROCm (#42758) Signed-off-by: charlifu <charlifu@amd.com>
csrc/libtorch_stable/ops.h
cpp
Apache-2.0
#pragma once #include <torch/csrc/stable/library.h> #include <torch/csrc/stable/tensor.h> #ifndef USE_ROCM torch::stable::Tensor permute_cols(torch::stable::Tensor const& A, torch::stable::Tensor const& perm); void per_token_group_quant_fp8(const torch::stable::Tensor& input, ...
#pragma once #include <torch/csrc/stable/library.h> #include <torch/csrc/stable/tensor.h> void per_token_group_quant_fp8(const torch::stable::Tensor& input, torch::stable::Tensor& output_q, torch::stable::Tensor& output_s, in...
--- csrc/libtorch_stable/ops.h +++ csrc/libtorch_stable/ops.h @@ -2,10 +2,6 @@ #include <torch/csrc/stable/library.h> #include <torch/csrc/stable/tensor.h> - -#ifndef USE_ROCM -torch::stable::Tensor permute_cols(torch::stable::Tensor const& A, - torch::stable::Tensor const& perm); ...
4
4
7
[]
[ "ROCM" ]
[]
Optimize this cpp kernel file from vllm (csrc/libtorch_stable/ops.h). Goal: Enable perf_token_group_quant/_C_stable_libtorch for ROCm Target hardware: ROCM Target models: unspecified Current file: ```cpp #pragma once #include <torch/csrc/stable/library.h> #include <torch/csrc/stable/tensor.h> #ifndef USE_ROCM torch...
This PR enables perf_token_group_quant kernels for ROCm, and since those kernels are defined by the compilation target _C_stable_libtorch, so this PR also enables this target. - modify per_token_group_quant kernels to make them support rocm (warp size 64 and 32). - change GroupReduceMax device function to ensure it w...
[]
null
null
vllm
71df063c494c111ab60f6a33c54aafe7b9ae1d02
2026-06-03T01:23:28-05:00
42,758
https://github.com/vllm-project/vllm/pull/42758
Enable perf_token_group_quant/_C_stable_libtorch for ROCm (#42758)
Enable perf_token_group_quant/_C_stable_libtorch for ROCm (#42758) Signed-off-by: charlifu <charlifu@amd.com>
csrc/libtorch_stable/quantization/w8a8/fp8/per_token_group_quant.cu
cuda
Apache-2.0
#include <torch/csrc/stable/tensor.h> #include <torch/csrc/stable/ops.h> #include <torch/headeronly/util/Exception.h> #include <torch/headeronly/core/ScalarType.h> #include "libtorch_stable/quantization/w8a8/per_token_group_quant_8bit.h" #include <cmath> #include <cuda_fp8.h> #include "libtorch_stable/quantization/...
#include <torch/csrc/stable/tensor.h> #include <torch/csrc/stable/ops.h> #include <torch/headeronly/util/Exception.h> #include <torch/headeronly/core/ScalarType.h> #include "libtorch_stable/quantization/w8a8/per_token_group_quant_8bit.h" #include <cmath> #ifdef USE_ROCM #include <hip/hip_fp8.h> #else #include <c...
--- csrc/libtorch_stable/quantization/w8a8/fp8/per_token_group_quant.cu +++ csrc/libtorch_stable/quantization/w8a8/fp8/per_token_group_quant.cu @@ -7,7 +7,11 @@ #include <cmath> -#include <cuda_fp8.h> +#ifdef USE_ROCM + #include <hip/hip_fp8.h> +#else + #include <cuda_fp8.h> +#endif #include "libtorch_stable/...
33
11
7
[]
[ "ROCM" ]
[]
Optimize this cuda kernel file from vllm (csrc/libtorch_stable/quantization/w8a8/fp8/per_token_group_quant.cu). Goal: Enable perf_token_group_quant/_C_stable_libtorch for ROCm Target hardware: ROCM Target models: unspecified Current file: ```cuda #include <torch/csrc/stable/tensor.h> #include <torch/csrc/stable/ops.h...
This PR enables perf_token_group_quant kernels for ROCm, and since those kernels are defined by the compilation target _C_stable_libtorch, so this PR also enables this target. - modify per_token_group_quant kernels to make them support rocm (warp size 64 and 32). - change GroupReduceMax device function to ensure it w...
[]
null
null
vllm
71df063c494c111ab60f6a33c54aafe7b9ae1d02
2026-06-03T01:23:28-05:00
42,758
https://github.com/vllm-project/vllm/pull/42758
Enable perf_token_group_quant/_C_stable_libtorch for ROCm (#42758)
Enable perf_token_group_quant/_C_stable_libtorch for ROCm (#42758) Signed-off-by: charlifu <charlifu@amd.com>
csrc/libtorch_stable/torch_bindings.cpp
cpp
Apache-2.0
#include "ops.h" #include "core/registration.h" #include <torch/csrc/stable/library.h> // Register ops with STABLE_TORCH_LIBRARY for libtorch stable ABI compatibility. // Note: We register under namespace "_C" so ops are accessible as // torch.ops._C.<op_name> for compatibility with existing code. STABLE_TORCH_LIBRAR...
#include "ops.h" #include "core/registration.h" #include <torch/csrc/stable/library.h> // Register ops with STABLE_TORCH_LIBRARY for libtorch stable ABI compatibility. // Note: We register under namespace "_C" so ops are accessible as // torch.ops._C.<op_name> for compatibility with existing code. STABLE_TORCH_LIBRAR...
--- csrc/libtorch_stable/torch_bindings.cpp +++ csrc/libtorch_stable/torch_bindings.cpp @@ -7,11 +7,6 @@ // Note: We register under namespace "_C" so ops are accessible as // torch.ops._C.<op_name> for compatibility with existing code. STABLE_TORCH_LIBRARY_FRAGMENT(_C, ops) { -#ifndef USE_ROCM - ops.def("permute_co...
10
10
7
[]
[ "ROCM" ]
[]
Optimize this cpp kernel file from vllm (csrc/libtorch_stable/torch_bindings.cpp). Goal: Enable perf_token_group_quant/_C_stable_libtorch for ROCm Target hardware: ROCM Target models: unspecified Current file: ```cpp #include "ops.h" #include "core/registration.h" #include <torch/csrc/stable/library.h> // Register ...
This PR enables perf_token_group_quant kernels for ROCm, and since those kernels are defined by the compilation target _C_stable_libtorch, so this PR also enables this target. - modify per_token_group_quant kernels to make them support rocm (warp size 64 and 32). - change GroupReduceMax device function to ensure it w...
[]
null
null
vllm
71df063c494c111ab60f6a33c54aafe7b9ae1d02
2026-06-03T01:23:28-05:00
42,758
https://github.com/vllm-project/vllm/pull/42758
Enable perf_token_group_quant/_C_stable_libtorch for ROCm (#42758)
Enable perf_token_group_quant/_C_stable_libtorch for ROCm (#42758) Signed-off-by: charlifu <charlifu@amd.com>
csrc/libtorch_stable/torch_utils.h
cpp
Apache-2.0
#pragma once #include <torch/csrc/inductor/aoti_torch/c/shim.h> #include <torch/csrc/stable/accelerator.h> #include <torch/csrc/stable/ops.h> #include <torch/csrc/stable/tensor.h> #include <torch/headeronly/util/shim_utils.h> #ifndef USE_ROCM #include <cuda_runtime.h> #else #include <hip/hip_runtime.h> #endif #in...
#pragma once #include <torch/csrc/inductor/aoti_torch/c/shim.h> #include <torch/csrc/stable/accelerator.h> #include <torch/csrc/stable/ops.h> #include <torch/csrc/stable/tensor.h> #include <torch/headeronly/util/shim_utils.h> #include <cuda_runtime.h> #include <cublas_v2.h> #include <deque> #include <mutex> #include...
--- csrc/libtorch_stable/torch_utils.h +++ csrc/libtorch_stable/torch_utils.h @@ -6,11 +6,7 @@ #include <torch/csrc/stable/tensor.h> #include <torch/headeronly/util/shim_utils.h> -#ifndef USE_ROCM - #include <cuda_runtime.h> -#else - #include <hip/hip_runtime.h> -#endif +#include <cuda_runtime.h> #include <cubla...
1
5
7
[]
[ "ROCM" ]
[]
Optimize this cpp kernel file from vllm (csrc/libtorch_stable/torch_utils.h). Goal: Enable perf_token_group_quant/_C_stable_libtorch for ROCm Target hardware: ROCM Target models: unspecified Current file: ```cpp #pragma once #include <torch/csrc/inductor/aoti_torch/c/shim.h> #include <torch/csrc/stable/accelerator.h...
This PR enables perf_token_group_quant kernels for ROCm, and since those kernels are defined by the compilation target _C_stable_libtorch, so this PR also enables this target. - modify per_token_group_quant kernels to make them support rocm (warp size 64 and 32). - change GroupReduceMax device function to ensure it w...
[]
null
null
vllm
71df063c494c111ab60f6a33c54aafe7b9ae1d02
2026-06-03T01:23:28-05:00
42,758
https://github.com/vllm-project/vllm/pull/42758
Enable perf_token_group_quant/_C_stable_libtorch for ROCm (#42758)
Enable perf_token_group_quant/_C_stable_libtorch for ROCm (#42758) Signed-off-by: charlifu <charlifu@amd.com>
vllm/model_executor/layers/quantization/utils/fp8_utils.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Adapted from https://github.com/sgl-project/sglang/pull/2575 import functools import json import os from collections.abc import Callable, Sequence from typing import Any import torch import vllm.envs as envs ...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Adapted from https://github.com/sgl-project/sglang/pull/2575 import functools import json import os from collections.abc import Callable, Sequence from typing import Any import torch import vllm.envs as envs ...
--- vllm/model_executor/layers/quantization/utils/fp8_utils.py +++ vllm/model_executor/layers/quantization/utils/fp8_utils.py @@ -575,7 +575,9 @@ # prefer CUDA/XPU kernel if available # TODO(bnell): this causes some fp8 moe test to fail. - if (current_platform.is_cuda() or current_platform.is_xpu()) and ...
8
7
7
[]
[ "ROCM" ]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/quantization/utils/fp8_utils.py). Goal: Enable perf_token_group_quant/_C_stable_libtorch for ROCm Target hardware: ROCM Target models: unspecified Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright co...
This PR enables perf_token_group_quant kernels for ROCm, and since those kernels are defined by the compilation target _C_stable_libtorch, so this PR also enables this target. - modify per_token_group_quant kernels to make them support rocm (warp size 64 and 32). - change GroupReduceMax device function to ensure it w...
[]
null
null
vllm
71df063c494c111ab60f6a33c54aafe7b9ae1d02
2026-06-03T01:23:28-05:00
42,758
https://github.com/vllm-project/vllm/pull/42758
Enable perf_token_group_quant/_C_stable_libtorch for ROCm (#42758)
Enable perf_token_group_quant/_C_stable_libtorch for ROCm (#42758) Signed-off-by: charlifu <charlifu@amd.com>
vllm/model_executor/layers/quantization/utils/int8_utils.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Adapted from https://github.com/sgl-project/sglang/blob/4cb53ecd0cffceb6dee5c011a58f65997a86f151/python/sglang/srt/layers/quantization/int8_kernel.py import functools import json import logging import os from t...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Adapted from https://github.com/sgl-project/sglang/blob/4cb53ecd0cffceb6dee5c011a58f65997a86f151/python/sglang/srt/layers/quantization/int8_kernel.py import functools import json import logging import os from t...
--- vllm/model_executor/layers/quantization/utils/int8_utils.py +++ vllm/model_executor/layers/quantization/utils/int8_utils.py @@ -235,8 +235,8 @@ device=x.device, dtype=torch.float32, ) - # prefer CUDA kernel if available - if current_platform.is_cuda(): + # Prefer native stable kernel...
2
2
7
[]
[ "ROCM" ]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/quantization/utils/int8_utils.py). Goal: Enable perf_token_group_quant/_C_stable_libtorch for ROCm Target hardware: ROCM Target models: unspecified Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright c...
This PR enables perf_token_group_quant kernels for ROCm, and since those kernels are defined by the compilation target _C_stable_libtorch, so this PR also enables this target. - modify per_token_group_quant kernels to make them support rocm (warp size 64 and 32). - change GroupReduceMax device function to ensure it w...
[]
null
null
vllm
0b25cf441903b06811e0f75f09c303c18fe08240
2026-06-02T09:00:48+01:00
43,534
https://github.com/vllm-project/vllm/pull/43534
[CPU][Perf] Enable fused kernels for GDN's gated delta rules (#43534)
[CPU][Perf] Enable fused kernels for GDN's gated delta rules (#43534) Signed-off-by: Fadi Arafeh <fadi.arafeh@arm.com> Co-authored-by: Li, Jiang <jiang1.li@intel.com>
csrc/cpu/sgl-kernels/fla.cpp
cpp
Apache-2.0
// Adapted from // https://github.com/sgl-project/sglang/tree/main/sgl-kernel/csrc/cpu // clang-format off #include "common.h" #include "gemm.h" #include "vec.h" #include "vec_pack.h" namespace { // For this cpu kernel, we have some innovations aside from the existing gpu kernels: // 1) Use less parallel loops, i.e....
// Adapted from // https://github.com/sgl-project/sglang/tree/main/sgl-kernel/csrc/cpu // clang-format off #include "common.h" #include "gemm.h" #include "vec.h" #include "vec_pack.h" namespace { // For this cpu kernel, we have some innovations aside from the existing gpu kernels: // 1) Use less parallel loops, i.e....
--- csrc/cpu/sgl-kernels/fla.cpp +++ csrc/cpu/sgl-kernels/fla.cpp @@ -301,25 +301,42 @@ // attn = k_beta @ key.transpose(-1, -2) // attn: [B, HV, num_chunk, chunk_size, chunk_size] // transpose and pack for key - pack_vnni<scalar_t>( - /* dst */ k_transpose, - /* src */...
279
142
5
[]
[ "CPU" ]
[]
Optimize this cpp kernel file from vllm (csrc/cpu/sgl-kernels/fla.cpp). Goal: [CPU][Perf] Enable fused kernels for GDN's gated delta rules Target hardware: CPU Target models: unspecified Current file: ```cpp // Adapted from // https://github.com/sgl-project/sglang/tree/main/sgl-kernel/csrc/cpu // clang-format off #...
## Purpose - makes the gated delta rule impls from `sglang-kernels` ISA agnostic - unifies AMX impl for GDN with other CPU ISAs. - for non-x86 ISAs (which lack fast brgemm kernels): uses openblas (if avaliable in pytorch wheel) or pytorch's blas fallbacks for GEMMs in chunk gated delta rule - fixes incorrect beta ptr ...
[{"scope": "e2e", "hardware": "Neoverse-V2", "model": "Qwen/Qwen3.5-9B", "shape": "input=256,output=128,max-model-len=4096", "batch_size": 128, "metric": "throughput", "unit": "tok/s", "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.5, "speedup": 1.5}]
null
1.5
vllm
0b25cf441903b06811e0f75f09c303c18fe08240
2026-06-02T09:00:48+01:00
43,534
https://github.com/vllm-project/vllm/pull/43534
[CPU][Perf] Enable fused kernels for GDN's gated delta rules (#43534)
[CPU][Perf] Enable fused kernels for GDN's gated delta rules (#43534) Signed-off-by: Fadi Arafeh <fadi.arafeh@arm.com> Co-authored-by: Li, Jiang <jiang1.li@intel.com>
csrc/cpu/sgl-kernels/gemm.h
cpp
Apache-2.0
// Adapted from // https://github.com/sgl-project/sglang/tree/main/sgl-kernel/csrc/cpu // clang-format off #pragma once #include <ATen/native/CPUBlas.h> #include "common.h" // amx-bf16 #define TILE_M 16 #define TILE_N 16 #define TILE_K 32 // block size for AMX gemm constexpr int block_size_m() { return 2 * TILE_...
// Adapted from // https://github.com/sgl-project/sglang/tree/main/sgl-kernel/csrc/cpu // clang-format off #pragma once #include "common.h" #include "blas_gemm.h" #if defined(__AVX512F__) && defined(__AVX512BF16__) && defined(__AMX_BF16__) #define CPU_CAPABILITY_AVX512 #endif // amx-bf16 #define TILE_M 16 #define T...
--- csrc/cpu/sgl-kernels/gemm.h +++ csrc/cpu/sgl-kernels/gemm.h @@ -4,9 +4,12 @@ // clang-format off #pragma once -#include <ATen/native/CPUBlas.h> - #include "common.h" +#include "blas_gemm.h" + +#if defined(__AVX512F__) && defined(__AVX512BF16__) && defined(__AMX_BF16__) +#define CPU_CAPABILITY_AVX512 +#endif ...
18
7
5
[]
[ "CPU" ]
[]
Optimize this cpp kernel file from vllm (csrc/cpu/sgl-kernels/gemm.h). Goal: [CPU][Perf] Enable fused kernels for GDN's gated delta rules Target hardware: CPU Target models: unspecified Current file: ```cpp // Adapted from // https://github.com/sgl-project/sglang/tree/main/sgl-kernel/csrc/cpu // clang-format off #p...
## Purpose - makes the gated delta rule impls from `sglang-kernels` ISA agnostic - unifies AMX impl for GDN with other CPU ISAs. - for non-x86 ISAs (which lack fast brgemm kernels): uses openblas (if avaliable in pytorch wheel) or pytorch's blas fallbacks for GEMMs in chunk gated delta rule - fixes incorrect beta ptr ...
[{"scope": "e2e", "hardware": "Neoverse-V2", "model": "Qwen/Qwen3.5-9B", "shape": "input=256,output=128,max-model-len=4096", "batch_size": 128, "metric": "throughput", "unit": "tok/s", "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.5, "speedup": 1.5}]
null
1.5
vllm
0b25cf441903b06811e0f75f09c303c18fe08240
2026-06-02T09:00:48+01:00
43,534
https://github.com/vllm-project/vllm/pull/43534
[CPU][Perf] Enable fused kernels for GDN's gated delta rules (#43534)
[CPU][Perf] Enable fused kernels for GDN's gated delta rules (#43534) Signed-off-by: Fadi Arafeh <fadi.arafeh@arm.com> Co-authored-by: Li, Jiang <jiang1.li@intel.com>
csrc/cpu/sgl-kernels/vec.h
cpp
Apache-2.0
// Adapted from // https://github.com/sgl-project/sglang/tree/main/sgl-kernel/csrc/cpu // clang-format off #pragma once #if defined(__AVX512F__) && defined(__AVX512BF16__) && defined(__AMX_BF16__) #define CPU_CAPABILITY_AVX512 #endif #include <ATen/cpu/vec/functional.h> #include <ATen/cpu/vec/vec.h> #include <immin...
// Adapted from // https://github.com/sgl-project/sglang/tree/main/sgl-kernel/csrc/cpu // clang-format off #pragma once #if defined(__AVX512F__) && defined(__AVX512BF16__) && defined(__AMX_BF16__) #define CPU_CAPABILITY_AVX512 #endif #include <ATen/cpu/vec/functional.h> #include <ATen/cpu/vec/vec.h> #if defined(CPU...
--- csrc/cpu/sgl-kernels/vec.h +++ csrc/cpu/sgl-kernels/vec.h @@ -11,7 +11,9 @@ #include <ATen/cpu/vec/functional.h> #include <ATen/cpu/vec/vec.h> +#if defined(CPU_CAPABILITY_AVX512) #include <immintrin.h> +#endif namespace { using namespace at::vec;
2
0
5
[]
[ "CPU" ]
[]
Optimize this cpp kernel file from vllm (csrc/cpu/sgl-kernels/vec.h). Goal: [CPU][Perf] Enable fused kernels for GDN's gated delta rules Target hardware: CPU Target models: unspecified Current file: ```cpp // Adapted from // https://github.com/sgl-project/sglang/tree/main/sgl-kernel/csrc/cpu // clang-format off #pr...
## Purpose - makes the gated delta rule impls from `sglang-kernels` ISA agnostic - unifies AMX impl for GDN with other CPU ISAs. - for non-x86 ISAs (which lack fast brgemm kernels): uses openblas (if avaliable in pytorch wheel) or pytorch's blas fallbacks for GEMMs in chunk gated delta rule - fixes incorrect beta ptr ...
[{"scope": "e2e", "hardware": "Neoverse-V2", "model": "Qwen/Qwen3.5-9B", "shape": "input=256,output=128,max-model-len=4096", "batch_size": 128, "metric": "throughput", "unit": "tok/s", "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.5, "speedup": 1.5}]
null
1.5
vllm
0b25cf441903b06811e0f75f09c303c18fe08240
2026-06-02T09:00:48+01:00
43,534
https://github.com/vllm-project/vllm/pull/43534
[CPU][Perf] Enable fused kernels for GDN's gated delta rules (#43534)
[CPU][Perf] Enable fused kernels for GDN's gated delta rules (#43534) Signed-off-by: Fadi Arafeh <fadi.arafeh@arm.com> Co-authored-by: Li, Jiang <jiang1.li@intel.com>
csrc/cpu/torch_bindings.cpp
cpp
Apache-2.0
#include "cache.h" #include "ops.h" #include "core/registration.h" #include <torch/library.h> // Note: overwrite the external definition for sharing same name between // libraries use different ISAs. #define TORCH_EXTENSION_NAME _C void release_dnnl_matmul_handler(int64_t handler); int64_t create_onednn_scaled_mm_h...
#include "cache.h" #include "ops.h" #include "core/registration.h" #include <torch/library.h> // Note: overwrite the external definition for sharing same name between // libraries use different ISAs. #define TORCH_EXTENSION_NAME _C void release_dnnl_matmul_handler(int64_t handler); int64_t create_onednn_scaled_mm_h...
--- csrc/cpu/torch_bindings.cpp +++ csrc/cpu/torch_bindings.cpp @@ -447,6 +447,25 @@ "bool is_vnni) -> Tensor"); ops.impl("fp8_scaled_mm_cpu", torch::kCPU, &fp8_scaled_mm_cpu); + // Adapted from sglang: casual_conv1d kernels + ops.def("causal_conv1d_weight_pack(Tensor weight) -> Tensor"); + ops.impl("cau...
19
19
5
[]
[ "CPU" ]
[]
Optimize this cpp kernel file from vllm (csrc/cpu/torch_bindings.cpp). Goal: [CPU][Perf] Enable fused kernels for GDN's gated delta rules Target hardware: CPU Target models: unspecified Current file: ```cpp #include "cache.h" #include "ops.h" #include "core/registration.h" #include <torch/library.h> // Note: overwr...
## Purpose - makes the gated delta rule impls from `sglang-kernels` ISA agnostic - unifies AMX impl for GDN with other CPU ISAs. - for non-x86 ISAs (which lack fast brgemm kernels): uses openblas (if avaliable in pytorch wheel) or pytorch's blas fallbacks for GEMMs in chunk gated delta rule - fixes incorrect beta ptr ...
[{"scope": "e2e", "hardware": "Neoverse-V2", "model": "Qwen/Qwen3.5-9B", "shape": "input=256,output=128,max-model-len=4096", "batch_size": 128, "metric": "throughput", "unit": "tok/s", "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 1.5, "speedup": 1.5}]
null
1.5
vllm
559d6710bf45e6fb3d48429855702b6ff24bdfe0
2026-05-30T09:28:34+08:00
38,445
https://github.com/vllm-project/vllm/pull/38445
[PERF]MiniMax-M2 gate kernel (#38445)
[PERF]MiniMax-M2 gate kernel (#38445) Signed-off-by: Jee Jee Li <pandaleefree@gmail.com> Signed-off-by: qianlihuang <91178480+qianlihuang@users.noreply.github.com> Co-authored-by: Yiliu Dong <91178480+qianlihuang@users.noreply.github.com>
csrc/libtorch_stable/torch_bindings.cpp
cpp
Apache-2.0
#include "ops.h" #include "core/registration.h" #include <torch/csrc/stable/library.h> // Register ops with STABLE_TORCH_LIBRARY for libtorch stable ABI compatibility. // Note: We register under namespace "_C" so ops are accessible as // torch.ops._C.<op_name> for compatibility with existing code. STABLE_TORCH_LIBRAR...
#include "ops.h" #include "core/registration.h" #include <torch/csrc/stable/library.h> // Register ops with STABLE_TORCH_LIBRARY for libtorch stable ABI compatibility. // Note: We register under namespace "_C" so ops are accessible as // torch.ops._C.<op_name> for compatibility with existing code. STABLE_TORCH_LIBRAR...
--- csrc/libtorch_stable/torch_bindings.cpp +++ csrc/libtorch_stable/torch_bindings.cpp @@ -246,6 +246,10 @@ // conditionally compiled so impl registration is in source file ops.def( "dsv3_fused_a_gemm(Tensor! output, Tensor mat_a, Tensor mat_b) -> ()"); + + // BF16/FP32 x FP32 -> FP32 router GEMM for H=3...
4
0
2
[ "minimax" ]
[]
[]
Optimize this cpp kernel file from vllm (csrc/libtorch_stable/torch_bindings.cpp). Goal: [PERF]MiniMax-M2 gate kernel Target hardware: unspecified Target models: minimax Current file: ```cpp #include "ops.h" #include "core/registration.h" #include <torch/csrc/stable/library.h> // Register ops with STABLE_TORCH_LIBR...
## Purpose The MoE gate of MiniMax-M2 needs to perform GEMM in FP32 and requires converting the input to FP32, see [router_logits](https://github.com/vllm-project/vllm/blob/v0.18.1rc0/vllm/model_executor/models/minimax_m2.py#L132). Therefore, in low-concurrency scenarios, up to 3 kernels may be launched in the wors...
[{"scope": "e2e", "hardware": "NVIDIA GB200", "model": "MiniMax-M2.5-NVFP4", "shape": null, "batch_size": 1, "metric": "output_token_throughput", "unit": "tok/s", "higher_is_better": true, "baseline": 147.56, "optimized": 157.04, "stated_speedup": null, "speedup": 1.0642}, {"scope": "e2e", "hardware": "NVIDIA GB200", "...
null
1.0836
vllm
0b56815a24f4da1af21008355af422891bf654ff
2026-05-29T13:26:57+02:00
42,982
https://github.com/vllm-project/vllm/pull/42982
[ROCm][Perf] DSv3.2 MI355X TP4 decode-step orchestration cleanup (3 micro-opts) (#42982)
[ROCm][Perf] DSv3.2 MI355X TP4 decode-step orchestration cleanup (3 micro-opts) (#42982) Signed-off-by: Frida Andersson <fanderss@amd.com> Co-authored-by: Cursor <cursoragent@cursor.com>
vllm/v1/attention/backends/mla/rocm_aiter_mla_sparse.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from dataclasses import dataclass from typing import TYPE_CHECKING, ClassVar import numpy as np import torch from vllm import _custom_ops as ops from vllm._aiter_ops import rocm_aiter_ops from vllm.config impor...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from dataclasses import dataclass from typing import TYPE_CHECKING, ClassVar import numpy as np import torch from vllm import _custom_ops as ops from vllm._aiter_ops import rocm_aiter_ops from vllm.config impor...
--- vllm/v1/attention/backends/mla/rocm_aiter_mla_sparse.py +++ vllm/v1/attention/backends/mla/rocm_aiter_mla_sparse.py @@ -375,7 +375,7 @@ (1, 1), dtype=torch.int32, device=self.device ) - self.req_id_per_token_buffer = torch.empty( + self.req_id_per_token_buffer = torch.zeros( ...
58
26
1
[ "deepseek" ]
[ "MI355X", "ROCM" ]
[]
Optimize this triton kernel file from vllm (vllm/v1/attention/backends/mla/rocm_aiter_mla_sparse.py). Goal: [ROCm][Perf] DSv3.2 MI355X TP4 decode-step orchestration cleanup (3 micro-opts) Target hardware: MI355X, ROCM Target models: deepseek Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCop...
## TL;DR Three independent CPU-side micro-optimizations on the DeepSeek-V3.2 AITER decode hot path. All are dispatch-side changes — no GPU kernel modifications. | Workload | Pre-patch | This PR | Δ | |---|---:|---:|---:| | 5k/500/64 (956-step Kineto aggregate) | 41.522 ms/step | 40.234 ms/step | −1.288 ms (−3.10%) | ...
[{"scope": "e2e", "hardware": null, "model": "DeepSeek-V3.2", "shape": "5k/500/64", "batch_size": 64, "metric": "Decode step time", "unit": "ms", "higher_is_better": false, "baseline": 41.522, "optimized": 40.234, "stated_speedup": null, "speedup": 1.032}, {"scope": "e2e", "hardware": null, "model": "DeepSeek-V3.2", "s...
null
1.016
vllm
a9ec46d4b7db6ae1d0cb0f27ce1a7ddb0f749ef8
2026-05-28T18:28:21+02:00
40,687
https://github.com/vllm-project/vllm/pull/40687
[ROCm][Perf] Support N=5 in wvSplitK skinny GEMM kernels for speculative decoding (#40687)
[ROCm][Perf] Support N=5 in wvSplitK skinny GEMM kernels for speculative decoding (#40687) Signed-off-by: Matthias Gehre <matthias.gehre@amd.com>
csrc/rocm/skinny_gemms.cu
cuda
Apache-2.0
#include <torch/all.h> #include <ATen/cuda/CUDAContext.h> #include <c10/cuda/CUDAGuard.h> #include <cuda_runtime.h> #include <cuda_fp16.h> #include <cuda_bf16.h> #include <stdexcept> #include <algorithm> #include "../cuda_compat.h" #include "dispatch_utils.h" #include "quantization/w8a8/fp8/common.cuh" #include "cor...
#include <torch/all.h> #include <ATen/cuda/CUDAContext.h> #include <c10/cuda/CUDAGuard.h> #include <cuda_runtime.h> #include <cuda_fp16.h> #include <cuda_bf16.h> #include <stdexcept> #include <algorithm> #include "../cuda_compat.h" #include "dispatch_utils.h" #include "quantization/w8a8/fp8/common.cuh" #include "cor...
--- csrc/rocm/skinny_gemms.cu +++ csrc/rocm/skinny_gemms.cu @@ -1276,6 +1276,12 @@ WVSPLIT_TILE_CFG(32, 16, sYT, 4) else WVSPLIT_TILE_CFG(64, 16, sYT, 4) + break; + case 5: + if (use_wave32) + WVSPLIT_TILE_CFG(32, 16, sYT, 5) + else + WVSPLIT_TI...
6
0
2
[]
[ "ROCM" ]
[]
Optimize this cuda kernel file from vllm (csrc/rocm/skinny_gemms.cu). Goal: [ROCm][Perf] Support N=5 in wvSplitK skinny GEMM kernels for speculative decoding Target hardware: ROCM Target models: unspecified Current file: ```cuda #include <torch/all.h> #include <ATen/cuda/CUDAContext.h> #include <c10/cuda/CUDAGuard.h>...
With speculative decoding (e.g. eagle3 with num_speculative_tokens=4), the target model verification pass has batch size 5 (1 original + 4 speculative tokens). The skinny GEMM wvSplitK kernel only supported N<=4, causing fallback to torch.nn.functional.linear (hipBLAS) for the verification step. Add case 5 to the wvSp...
[{"scope": "e2e", "hardware": "AMD Strix Halo (gfx1151, LPDDR5X-8000 128 GB)", "model": "Qwen/Qwen3-8B", "shape": "input-len=128, output-len=128", "batch_size": 5, "metric": "TPOT", "unit": "ms", "higher_is_better": false, "baseline": 43.02, "optimized": 37.73, "stated_speedup": 1.14, "speedup": 1.1402}, {"scope": "e2e...
null
1.1412
vllm
c08ebebf30cdc50ddf43ed8db344b4c69028d296
2026-05-28T08:40:02-07:00
43,803
https://github.com/vllm-project/vllm/pull/43803
[Perf] Add do_not_specialize to Mamba SSD chunk kernels (#43803)
[Perf] Add do_not_specialize to Mamba SSD chunk kernels (#43803) Signed-off-by: Majid Taheri Andani <tahemaji@amazon.com> Co-authored-by: Majid Taheri Andani <tahemaji@amazon.com>
vllm/model_executor/layers/mamba/ops/causal_conv1d.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright (c) 2024, Tri Dao. # Adapted from https://github.com/Dao-AILab/causal-conv1d/blob/main/causal_conv1d/causal_conv1d_interface.py import numpy as np import torch from vllm.triton_utils import tl, tri...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright (c) 2024, Tri Dao. # Adapted from https://github.com/Dao-AILab/causal-conv1d/blob/main/causal_conv1d/causal_conv1d_interface.py import numpy as np import torch from vllm.triton_utils import tl, tri...
--- vllm/model_executor/layers/mamba/ops/causal_conv1d.py +++ vllm/model_executor/layers/mamba/ops/causal_conv1d.py @@ -33,7 +33,6 @@ o_ptr, # (dim, seqlen) - actually pointing to x_ptr # Matrix dimensions dim: tl.constexpr, - seqlen: tl.int32, # cu_seqlen num_cache_lines: tl.constexpr, # adde...
0
2
4
[ "mamba" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/mamba/ops/causal_conv1d.py). Goal: [Perf] Add do_not_specialize to Mamba SSD chunk kernels Target hardware: unspecified Target models: mamba Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contribu...
## Purpose `seqlen` is a dead parameter in five Mamba prefill kernels (`_chunk_cumsum_fwd_kernel`, `_chunk_state_fwd_kernel`, `_chunk_scan_fwd_kernel`, `_bmm_chunk_fwd_kernel`, `_causal_conv1d_fwd_kernel`). It's either never read or overwritten on entry. Triton specializes plain `int` args by default, so every prefill...
[{"scope": "e2e", "hardware": "A10G", "model": "Nemotron-H-8B", "shape": null, "batch_size": 8, "metric": "TTFT", "unit": "ms", "higher_is_better": false, "baseline": 145.18, "optimized": 120.76, "stated_speedup": null, "speedup": 1.2022}, {"scope": "e2e", "hardware": "A10G", "model": "Nemotron-H-8B", "shape": null, "b...
null
1.5279
vllm
c08ebebf30cdc50ddf43ed8db344b4c69028d296
2026-05-28T08:40:02-07:00
43,803
https://github.com/vllm-project/vllm/pull/43803
[Perf] Add do_not_specialize to Mamba SSD chunk kernels (#43803)
[Perf] Add do_not_specialize to Mamba SSD chunk kernels (#43803) Signed-off-by: Majid Taheri Andani <tahemaji@amazon.com> Co-authored-by: Majid Taheri Andani <tahemaji@amazon.com>
vllm/model_executor/layers/mamba/ops/ssd_bmm.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright (c) 2024, Tri Dao, Albert Gu. # Adapted from https://github.com/state-spaces/mamba/blob/v2.2.4/mamba_ssm/ops/triton/ssd_bmm.py # ruff: noqa: E501,SIM102 import torch from vllm.triton_utils import t...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright (c) 2024, Tri Dao, Albert Gu. # Adapted from https://github.com/state-spaces/mamba/blob/v2.2.4/mamba_ssm/ops/triton/ssd_bmm.py # ruff: noqa: E501,SIM102 import torch from vllm.triton_utils import t...
--- vllm/model_executor/layers/mamba/ops/ssd_bmm.py +++ vllm/model_executor/layers/mamba/ops/ssd_bmm.py @@ -69,7 +69,6 @@ out_ptr, cu_chunk_seqlens_ptr, # Matrix dimensions - seqlen, chunk_size: tl.constexpr, K: tl.constexpr, ngroups: tl.constexpr, @@ -191,7 +190,6 @@ b_ptr...
0
2
4
[ "mamba" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/mamba/ops/ssd_bmm.py). Goal: [Perf] Add do_not_specialize to Mamba SSD chunk kernels Target hardware: unspecified Target models: mamba Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors t...
## Purpose `seqlen` is a dead parameter in five Mamba prefill kernels (`_chunk_cumsum_fwd_kernel`, `_chunk_state_fwd_kernel`, `_chunk_scan_fwd_kernel`, `_bmm_chunk_fwd_kernel`, `_causal_conv1d_fwd_kernel`). It's either never read or overwritten on entry. Triton specializes plain `int` args by default, so every prefill...
[{"scope": "e2e", "hardware": "A10G", "model": "Nemotron-H-8B", "shape": null, "batch_size": 8, "metric": "TTFT", "unit": "ms", "higher_is_better": false, "baseline": 145.18, "optimized": 120.76, "stated_speedup": null, "speedup": 1.2022}, {"scope": "e2e", "hardware": "A10G", "model": "Nemotron-H-8B", "shape": null, "b...
null
1.5279
vllm
c08ebebf30cdc50ddf43ed8db344b4c69028d296
2026-05-28T08:40:02-07:00
43,803
https://github.com/vllm-project/vllm/pull/43803
[Perf] Add do_not_specialize to Mamba SSD chunk kernels (#43803)
[Perf] Add do_not_specialize to Mamba SSD chunk kernels (#43803) Signed-off-by: Majid Taheri Andani <tahemaji@amazon.com> Co-authored-by: Majid Taheri Andani <tahemaji@amazon.com>
vllm/model_executor/layers/mamba/ops/ssd_chunk_scan.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright (c) 2024, Tri Dao, Albert Gu. # Adapted from https://github.com/state-spaces/mamba/blob/v2.2.4/mamba_ssm/ops/triton/ssd_chunk_scan.py # ruff: noqa: E501,SIM102 from packaging import version from vl...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright (c) 2024, Tri Dao, Albert Gu. # Adapted from https://github.com/state-spaces/mamba/blob/v2.2.4/mamba_ssm/ops/triton/ssd_chunk_scan.py # ruff: noqa: E501,SIM102 from packaging import version from vl...
--- vllm/model_executor/layers/mamba/ops/ssd_chunk_scan.py +++ vllm/model_executor/layers/mamba/ops/ssd_chunk_scan.py @@ -163,7 +163,6 @@ chunk_size: tl.constexpr, hdim: tl.constexpr, dstate: tl.constexpr, - seqlen, nheads_ngroups_ratio: tl.constexpr, # Strides stride_cb_chunk: tl.int64...
0
2
4
[ "mamba" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/mamba/ops/ssd_chunk_scan.py). Goal: [Perf] Add do_not_specialize to Mamba SSD chunk kernels Target hardware: unspecified Target models: mamba Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contrib...
## Purpose `seqlen` is a dead parameter in five Mamba prefill kernels (`_chunk_cumsum_fwd_kernel`, `_chunk_state_fwd_kernel`, `_chunk_scan_fwd_kernel`, `_bmm_chunk_fwd_kernel`, `_causal_conv1d_fwd_kernel`). It's either never read or overwritten on entry. Triton specializes plain `int` args by default, so every prefill...
[{"scope": "e2e", "hardware": "A10G", "model": "Nemotron-H-8B", "shape": null, "batch_size": 8, "metric": "TTFT", "unit": "ms", "higher_is_better": false, "baseline": 145.18, "optimized": 120.76, "stated_speedup": null, "speedup": 1.2022}, {"scope": "e2e", "hardware": "A10G", "model": "Nemotron-H-8B", "shape": null, "b...
null
1.5279
vllm
c08ebebf30cdc50ddf43ed8db344b4c69028d296
2026-05-28T08:40:02-07:00
43,803
https://github.com/vllm-project/vllm/pull/43803
[Perf] Add do_not_specialize to Mamba SSD chunk kernels (#43803)
[Perf] Add do_not_specialize to Mamba SSD chunk kernels (#43803) Signed-off-by: Majid Taheri Andani <tahemaji@amazon.com> Co-authored-by: Majid Taheri Andani <tahemaji@amazon.com>
vllm/model_executor/layers/mamba/ops/ssd_chunk_state.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright (c) 2024, Tri Dao, Albert Gu. # Adapted from https://github.com/state-spaces/mamba/blob/v2.2.4/mamba_ssm/ops/triton/ssd_chunk_state.py # ruff: noqa: E501 import torch from vllm.model_executor.layer...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright (c) 2024, Tri Dao, Albert Gu. # Adapted from https://github.com/state-spaces/mamba/blob/v2.2.4/mamba_ssm/ops/triton/ssd_chunk_state.py # ruff: noqa: E501 import torch from vllm.model_executor.layer...
--- vllm/model_executor/layers/mamba/ops/ssd_chunk_state.py +++ vllm/model_executor/layers/mamba/ops/ssd_chunk_state.py @@ -35,7 +35,6 @@ dA_cumsum_ptr, cu_chunk_seqlens_ptr, # Matrix dimension - seqlen, nheads: tl.constexpr, chunk_size: tl.constexpr, dt_min: tl.constexpr, @@ -206,7 +20...
0
4
4
[ "mamba" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/mamba/ops/ssd_chunk_state.py). Goal: [Perf] Add do_not_specialize to Mamba SSD chunk kernels Target hardware: unspecified Target models: mamba Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contri...
## Purpose `seqlen` is a dead parameter in five Mamba prefill kernels (`_chunk_cumsum_fwd_kernel`, `_chunk_state_fwd_kernel`, `_chunk_scan_fwd_kernel`, `_bmm_chunk_fwd_kernel`, `_causal_conv1d_fwd_kernel`). It's either never read or overwritten on entry. Triton specializes plain `int` args by default, so every prefill...
[{"scope": "e2e", "hardware": "A10G", "model": "Nemotron-H-8B", "shape": null, "batch_size": 8, "metric": "TTFT", "unit": "ms", "higher_is_better": false, "baseline": 145.18, "optimized": 120.76, "stated_speedup": null, "speedup": 1.2022}, {"scope": "e2e", "hardware": "A10G", "model": "Nemotron-H-8B", "shape": null, "b...
null
1.5279
vllm
f3b2a819f7f4ee05e0ac46ab72ca1e9f41f27bd5
2026-05-28T21:47:08+08:00
43,667
https://github.com/vllm-project/vllm/pull/43667
[Perf][KDA] Fuse gate softplus, chunk-local cumsum, and RCP_LN2 scaling (#43667)
[Perf][KDA] Fuse gate softplus, chunk-local cumsum, and RCP_LN2 scaling (#43667) Signed-off-by: haojiangzheng <justineric096@gmail.com> Co-authored-by: haojiangzheng <justineric096@gmail.com>
vllm/model_executor/layers/fla/ops/kda.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # SPDX-FileCopyrightText: Songlin Yang, Yu Zhang # # This file contains code copied from the flash-linear-attention project. # The original source code was licensed under the MIT license and included # the followi...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # SPDX-FileCopyrightText: Songlin Yang, Yu Zhang # # This file contains code copied from the flash-linear-attention project. # The original source code was licensed under the MIT license and included # the followi...
--- vllm/model_executor/layers/fla/ops/kda.py +++ vllm/model_executor/layers/fla/ops/kda.py @@ -721,6 +721,7 @@ beta: torch.Tensor | None = None, scale: float | None = None, cu_seqlens: torch.Tensor | None = None, + chunk_indices: torch.Tensor | None = None, chunk_size: int = FLA_CHUNK_SIZE, ...
310
46
2
[]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/fla/ops/kda.py). Goal: [Perf][KDA] Fuse gate softplus, chunk-local cumsum, and RCP_LN2 scaling Target hardware: unspecified Target models: unspecified Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyrigh...
## Summary This PR follows the Kimi Linear KDA prefill optimization direction validated by SGLang in https://github.com/sgl-project/sglang/pull/23038. That PR showed that the KDA chunk prefill path benefits from moving the raw gate producer closer to the chunk consumer and fusing gate activation with chunk-local cumul...
[{"scope": "kernel", "hardware": null, "model": null, "shape": "Seq/Req=4096", "batch_size": 1, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 0.2294, "optimized": 0.1269, "stated_speedup": 1.81, "speedup": 1.8077}, {"scope": "kernel", "hardware": null, "model": null, "shape": "Seq/Req=1024",...
1.9455
1.0982
vllm
64e121867382d0d8f34b10fce194492be9b36745
2026-05-28T09:18:26-04:00
43,014
https://github.com/vllm-project/vllm/pull/43014
[Perf] Optimize moe permute by pre-allocate buffer, 9~14% kernel performance improvement (#43014)
[Perf] Optimize moe permute by pre-allocate buffer, 9~14% kernel performance improvement (#43014) Signed-off-by: yewentao256 <zhyanwentao@126.com>
csrc/moe/moe_ops.h
cpp
Apache-2.0
#pragma once #include <torch/all.h> void topk_softmax(torch::Tensor& topk_weights, torch::Tensor& topk_indices, torch::Tensor& token_expert_indices, torch::Tensor& gating_output, bool renormalize, std::optional<torch::Tensor> bias); void topk_sigmoid(torch::Tenso...
#pragma once #include <torch/all.h> void topk_softmax(torch::Tensor& topk_weights, torch::Tensor& topk_indices, torch::Tensor& token_expert_indices, torch::Tensor& gating_output, bool renormalize, std::optional<torch::Tensor> bias); void topk_sigmoid(torch::Tenso...
--- csrc/moe/moe_ops.h +++ csrc/moe/moe_ops.h @@ -62,6 +62,9 @@ bool moe_permute_unpermute_supported(); +int64_t moe_permute_sort_workspace_size(int64_t num_expanded_rows, + int64_t num_experts); + void shuffle_rows(const torch::Tensor& input_tensor, const...
3
0
6
[]
[]
[]
Optimize this cpp kernel file from vllm (csrc/moe/moe_ops.h). Goal: [Perf] Optimize moe permute by pre-allocate buffer, 9~14% kernel performance improvement Target hardware: unspecified Target models: unspecified Current file: ```cpp #pragma once #include <torch/all.h> void topk_softmax(torch::Tensor& topk_weights,...
## Purpose Optimize moe permute by pre-allocate buffer, very good for small batch size, no effect for large batch size ## Test Covered in unit tests Perf `python benchmarks/kernels/benchmark_moe_permute_unpermute.py` for two times | Batch Size | Now (us) | Main (us) | Improvement | |---:|---:|---:|---:| | 1 | 6.2...
[{"scope": "kernel", "hardware": null, "model": null, "shape": null, "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 7.34, "optimized": 6.28, "stated_speedup": null, "speedup": 1.1688}, {"scope": "kernel", "hardware": null, "model": null, "shape": null, "batch_size": 2, "metri...
1.0191
null
vllm
64e121867382d0d8f34b10fce194492be9b36745
2026-05-28T09:18:26-04:00
43,014
https://github.com/vllm-project/vllm/pull/43014
[Perf] Optimize moe permute by pre-allocate buffer, 9~14% kernel performance improvement (#43014)
[Perf] Optimize moe permute by pre-allocate buffer, 9~14% kernel performance improvement (#43014) Signed-off-by: yewentao256 <zhyanwentao@126.com>
csrc/moe/moe_permute_unpermute_op.cu
cuda
Apache-2.0
#include <c10/core/ScalarType.h> #include <torch/all.h> #include <ATen/cuda/CUDAContext.h> #include "permute_unpermute_kernels/moe_permute_unpermute_kernel.h" #include "permute_unpermute_kernels/dispatch.h" #include "core/registration.h" // moe_permute kernels require at least CUDA 12.0 #if defined(CUDA_VERSION) && (C...
#include <c10/core/ScalarType.h> #include <torch/all.h> #include <ATen/cuda/CUDAContext.h> #include "permute_unpermute_kernels/moe_permute_unpermute_kernel.h" #include "permute_unpermute_kernels/dispatch.h" #include "core/registration.h" // moe_permute kernels require at least CUDA 12.0 #if defined(CUDA_VERSION) && (C...
--- csrc/moe/moe_permute_unpermute_op.cu +++ csrc/moe/moe_permute_unpermute_op.cu @@ -7,6 +7,108 @@ // moe_permute kernels require at least CUDA 12.0 #if defined(CUDA_VERSION) && (CUDA_VERSION >= 12000) + +namespace { + +torch::Tensor maybe_allocate_tensor( + const std::optional<torch::Tensor>& maybe_tensor, + ...
142
59
6
[]
[]
[]
Optimize this cuda kernel file from vllm (csrc/moe/moe_permute_unpermute_op.cu). Goal: [Perf] Optimize moe permute by pre-allocate buffer, 9~14% kernel performance improvement Target hardware: unspecified Target models: unspecified Current file: ```cuda #include <c10/core/ScalarType.h> #include <torch/all.h> #include...
## Purpose Optimize moe permute by pre-allocate buffer, very good for small batch size, no effect for large batch size ## Test Covered in unit tests Perf `python benchmarks/kernels/benchmark_moe_permute_unpermute.py` for two times | Batch Size | Now (us) | Main (us) | Improvement | |---:|---:|---:|---:| | 1 | 6.2...
[{"scope": "kernel", "hardware": null, "model": null, "shape": null, "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 7.34, "optimized": 6.28, "stated_speedup": null, "speedup": 1.1688}, {"scope": "kernel", "hardware": null, "model": null, "shape": null, "batch_size": 2, "metri...
1.0191
null
vllm
64e121867382d0d8f34b10fce194492be9b36745
2026-05-28T09:18:26-04:00
43,014
https://github.com/vllm-project/vllm/pull/43014
[Perf] Optimize moe permute by pre-allocate buffer, 9~14% kernel performance improvement (#43014)
[Perf] Optimize moe permute by pre-allocate buffer, 9~14% kernel performance improvement (#43014) Signed-off-by: yewentao256 <zhyanwentao@126.com>
csrc/moe/torch_bindings.cpp
cpp
Apache-2.0
#include "core/registration.h" #include "moe_ops.h" TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, m) { // Apply topk softmax to the gating outputs. m.def( "topk_softmax(Tensor! topk_weights, Tensor! topk_indices, Tensor! " "token_expert_indices, Tensor gating_output, bool renormalize, Tensor? " "bia...
#include "core/registration.h" #include "moe_ops.h" TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, m) { // Apply topk softmax to the gating outputs. m.def( "topk_softmax(Tensor! topk_weights, Tensor! topk_indices, Tensor! " "token_expert_indices, Tensor gating_output, bool renormalize, Tensor? " "bia...
--- csrc/moe/torch_bindings.cpp +++ csrc/moe/torch_bindings.cpp @@ -101,12 +101,25 @@ "permuted_idx)->()"); m.def( + "moe_permute_with_scratch(Tensor input, Tensor topk_ids," + "Tensor token_expert_indices, Tensor? expert_map, int n_expert," + "int n_local_expert," + "int topk, Tensor! p...
13
0
6
[]
[]
[]
Optimize this cpp kernel file from vllm (csrc/moe/torch_bindings.cpp). Goal: [Perf] Optimize moe permute by pre-allocate buffer, 9~14% kernel performance improvement Target hardware: unspecified Target models: unspecified Current file: ```cpp #include "core/registration.h" #include "moe_ops.h" TORCH_LIBRARY_EXPAND(T...
## Purpose Optimize moe permute by pre-allocate buffer, very good for small batch size, no effect for large batch size ## Test Covered in unit tests Perf `python benchmarks/kernels/benchmark_moe_permute_unpermute.py` for two times | Batch Size | Now (us) | Main (us) | Improvement | |---:|---:|---:|---:| | 1 | 6.2...
[{"scope": "kernel", "hardware": null, "model": null, "shape": null, "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 7.34, "optimized": 6.28, "stated_speedup": null, "speedup": 1.1688}, {"scope": "kernel", "hardware": null, "model": null, "shape": null, "batch_size": 2, "metri...
1.0191
null
vllm
d56285c747ec3133163c740adc3c68f3f5feb4e7
2026-05-24T20:12:44+03:00
43,083
https://github.com/vllm-project/vllm/pull/43083
Tuning script and configs for Triton Mamba SSU kernel (#43083)
Tuning script and configs for Triton Mamba SSU kernel (#43083) Signed-off-by: Banani Ghosh <bg2502@nyu.edu> Signed-off-by: Daniel Serebrenik <daserebrenik@nvidia.com> Co-authored-by: Banani Ghosh <bg2502@nyu.edu>
vllm/model_executor/layers/mamba/ops/mamba_ssm.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright (c) 2024, Tri Dao, Albert Gu. # Adapted from https://github.com/state-spaces/mamba/blob/v2.2.4/mamba_ssm/ops/triton/selective_state_update.py import torch from packaging import version from vllm imp...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright (c) 2024, Tri Dao, Albert Gu. # Adapted from https://github.com/state-spaces/mamba/blob/v2.2.4/mamba_ssm/ops/triton/selective_state_update.py import functools import json import os from contextlib im...
--- vllm/model_executor/layers/mamba/ops/mamba_ssm.py +++ vllm/model_executor/layers/mamba/ops/mamba_ssm.py @@ -4,15 +4,189 @@ # Copyright (c) 2024, Tri Dao, Albert Gu. # Adapted from https://github.com/state-spaces/mamba/blob/v2.2.4/mamba_ssm/ops/triton/selective_state_update.py +import functools +import json +imp...
179
18
1
[ "mamba" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/mamba/ops/mamba_ssm.py). Goal: Tuning script and configs for Triton Mamba SSU kernel Target hardware: unspecified Target models: mamba Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors t...
<!-- markdownlint-disable --> PLEASE FILL IN THE PR DESCRIPTION HERE ENSURING ALL CHECKLIST ITEMS (AT THE BOTTOM) HAVE BEEN CONSIDERED. ## Purpose Follow up to PR #41398 Closes https://github.com/vllm-project/vllm/issues/33034 Address the code review comments: - Use "effective batch" - Add "triton_version" (infor...
[{"scope": "kernel", "hardware": "NVIDIA_B200", "model": null, "shape": "headdim=64,dstate=128,ngroups=8", "batch_size": 8, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 3.14, "optimized": 1.98, "stated_speedup": 1.58, "speedup": 1.5859}, {"scope": "kernel", "hardware": "NVIDIA_B200", "model...
1.3421
1.0261
vllm
1806d1adfc9b598bc6eb94de38a330aaad04c291
2026-05-24T18:43:08+08:00
43,385
https://github.com/vllm-project/vllm/pull/43385
[ROCm] [DSv4] [Perf] Support DeepSeek v4 MTP (#43385)
[ROCm] [DSv4] [Perf] Support DeepSeek v4 MTP (#43385) Signed-off-by: tjtanaa <tunjian.tan@embeddedllm.com>
vllm/model_executor/layers/fused_moe/experts/gpt_oss_triton_kernels_moe.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import torch import vllm.model_executor.layers.fused_moe.modular_kernel as mk from vllm import _custom_ops as ops from vllm.logger import init_logger from vllm.model_executor.layers.fused_moe.activation import M...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import torch import vllm.model_executor.layers.fused_moe.modular_kernel as mk from vllm import _custom_ops as ops from vllm.logger import init_logger from vllm.model_executor.layers.fused_moe.activation import M...
--- vllm/model_executor/layers/fused_moe/experts/gpt_oss_triton_kernels_moe.py +++ vllm/model_executor/layers/fused_moe/experts/gpt_oss_triton_kernels_moe.py @@ -81,17 +81,28 @@ import triton.language as tl try: - from vllm.third_party.triton_kernels.tensor_details import ( - bitmatrix as ...
22
11
2
[ "deepseek" ]
[ "ROCM" ]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/fused_moe/experts/gpt_oss_triton_kernels_moe.py). Goal: [ROCm] [DSv4] [Perf] Support DeepSeek v4 MTP Target hardware: ROCM Target models: deepseek Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright co...
## Purpose Enable MTP feature for DeepSeek V4 on ROCm. Side task: The first PR to implement the hardware specific modeling file. ## Test Plan Run all 1319 GSM8K requests at concurrency 256 with `--max-num-seqs 256` numshot 8, for both without MTP and with MTP. High concurrency is to ensure that the sparse indexe...
[{"scope": "e2e", "hardware": null, "model": "DeepSeek-V4-Pro", "shape": "input_len=8192,output_len=1024", "batch_size": 1, "metric": "throughput", "unit": "tok/s", "higher_is_better": true, "baseline": 20.1, "optimized": 35.1, "stated_speedup": 1.747, "speedup": 1.7463}, {"scope": "e2e", "hardware": null, "model": "De...
null
1.3821
vllm
1806d1adfc9b598bc6eb94de38a330aaad04c291
2026-05-24T18:43:08+08:00
43,385
https://github.com/vllm-project/vllm/pull/43385
[ROCm] [DSv4] [Perf] Support DeepSeek v4 MTP (#43385)
[ROCm] [DSv4] [Perf] Support DeepSeek v4 MTP (#43385) Signed-off-by: tjtanaa <tunjian.tan@embeddedllm.com>
vllm/v1/attention/ops/rocm_aiter_mla_sparse.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import functools import importlib import math from importlib.util import find_spec import torch import torch.nn.functional as F from vllm.compilation.breakable_cudagraph import eager_break_during_capture from vl...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import functools import importlib import math from importlib.util import find_spec import torch import torch.nn.functional as F from vllm.compilation.breakable_cudagraph import eager_break_during_capture from vl...
--- vllm/v1/attention/ops/rocm_aiter_mla_sparse.py +++ vllm/v1/attention/ops/rocm_aiter_mla_sparse.py @@ -144,35 +144,57 @@ HEAD_DIM: tl.constexpr, BLOCK_TILE_SIZE: tl.constexpr, HEAD_TILE_SIZE: tl.constexpr, + NUM_TOKENS: tl.constexpr, + NUM_BATCHES: tl.constexpr, + BLOCK_TABLE_WIDTH: tl.conste...
46
16
2
[ "deepseek" ]
[ "ROCM" ]
[]
Optimize this triton kernel file from vllm (vllm/v1/attention/ops/rocm_aiter_mla_sparse.py). Goal: [ROCm] [DSv4] [Perf] Support DeepSeek v4 MTP Target hardware: ROCM Target models: deepseek Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM proje...
## Purpose Enable MTP feature for DeepSeek V4 on ROCm. Side task: The first PR to implement the hardware specific modeling file. ## Test Plan Run all 1319 GSM8K requests at concurrency 256 with `--max-num-seqs 256` numshot 8, for both without MTP and with MTP. High concurrency is to ensure that the sparse indexe...
[{"scope": "e2e", "hardware": null, "model": "DeepSeek-V4-Pro", "shape": "input_len=8192,output_len=1024", "batch_size": 1, "metric": "throughput", "unit": "tok/s", "higher_is_better": true, "baseline": 20.1, "optimized": 35.1, "stated_speedup": 1.747, "speedup": 1.7463}, {"scope": "e2e", "hardware": null, "model": "De...
null
1.3821
vllm
b29cbf06525254693f29d98686e038eaf225be8c
2026-05-21T16:00:29-04:00
42,988
https://github.com/vllm-project/vllm/pull/42988
[Perf] `zeros` -> `empty` to remove additional fill (#42988)
[Perf] `zeros` -> `empty` to remove additional fill (#42988) Signed-off-by: yewentao256 <zhyanwentao@126.com>
vllm/model_executor/layers/mamba/gdn_linear_attn.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Inference-only Qwen3-Next/Qwen3.5 model.""" import torch from einops import rearrange from torch import nn from transformers.activations import ACT2FN from vllm import envs from vllm._aiter_ops import rocm_ai...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Inference-only Qwen3-Next/Qwen3.5 model.""" import torch from einops import rearrange from torch import nn from transformers.activations import ACT2FN from vllm import envs from vllm._aiter_ops import rocm_ai...
--- vllm/model_executor/layers/mamba/gdn_linear_attn.py +++ vllm/model_executor/layers/mamba/gdn_linear_attn.py @@ -1094,7 +1094,6 @@ ) core_attn_out.zero_() - z_out.zero_() num_tokens_all = qkvz.shape[0] mixed_qkv, z, b, a = self.prepare_gdn_attention_core_inputs( ...
0
1
3
[ "mamba" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/mamba/gdn_linear_attn.py). Goal: [Perf] `zeros` -> `empty` to remove additional fill Target hardware: unspecified Target models: mamba Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors t...
## Purpose `zeros` -> `empty` to remove additional fill: - switch FP4 quant output-scale allocation from `torch.zeros` to `torch.empty` in `vllm/_custom_ops.py` - switch packed FP8 scale allocation from `torch.zeros` to `torch.empty` in `vllm/model_executor/layers/quantization/utils/fp8_utils.py` - switch TurboQuant ...
[]
null
null
vllm
b29cbf06525254693f29d98686e038eaf225be8c
2026-05-21T16:00:29-04:00
42,988
https://github.com/vllm-project/vllm/pull/42988
[Perf] `zeros` -> `empty` to remove additional fill (#42988)
[Perf] `zeros` -> `empty` to remove additional fill (#42988) Signed-off-by: yewentao256 <zhyanwentao@126.com>
vllm/model_executor/layers/quantization/utils/fp8_utils.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Adapted from https://github.com/sgl-project/sglang/pull/2575 import functools import json import os from collections.abc import Callable, Sequence from typing import Any import torch import vllm.envs as envs ...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Adapted from https://github.com/sgl-project/sglang/pull/2575 import functools import json import os from collections.abc import Callable, Sequence from typing import Any import torch import vllm.envs as envs ...
--- vllm/model_executor/layers/quantization/utils/fp8_utils.py +++ vllm/model_executor/layers/quantization/utils/fp8_utils.py @@ -255,7 +255,7 @@ if output_q is None: output_q = torch.empty((M, N_2), dtype=fp8_dtype, device=input.device) - output_scale_packed = torch.zeros( + output_scale_packed =...
1
1
3
[]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/quantization/utils/fp8_utils.py). Goal: [Perf] `zeros` -> `empty` to remove additional fill Target hardware: unspecified Target models: unspecified Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright c...
## Purpose `zeros` -> `empty` to remove additional fill: - switch FP4 quant output-scale allocation from `torch.zeros` to `torch.empty` in `vllm/_custom_ops.py` - switch packed FP8 scale allocation from `torch.zeros` to `torch.empty` in `vllm/model_executor/layers/quantization/utils/fp8_utils.py` - switch TurboQuant ...
[]
null
null
vllm
5774aad9c5b67c5bb67bb7d306a9652a035ed0aa
2026-05-20T17:13:12-04:00
43,135
https://github.com/vllm-project/vllm/pull/43135
[Perf][gpt-oss] Downgrade triton_kernels to v3.5.1 (#43135)
[Perf][gpt-oss] Downgrade triton_kernels to v3.5.1 (#43135) Signed-off-by: mgoin <mgoin64@gmail.com>
vllm/model_executor/layers/fused_moe/experts/gpt_oss_triton_kernels_moe.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import torch import vllm.model_executor.layers.fused_moe.modular_kernel as mk from vllm import _custom_ops as ops from vllm.logger import init_logger from vllm.model_executor.layers.fused_moe.activation import M...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import torch import vllm.model_executor.layers.fused_moe.modular_kernel as mk from vllm import _custom_ops as ops from vllm.logger import init_logger from vllm.model_executor.layers.fused_moe.activation import M...
--- vllm/model_executor/layers/fused_moe/experts/gpt_oss_triton_kernels_moe.py +++ vllm/model_executor/layers/fused_moe/experts/gpt_oss_triton_kernels_moe.py @@ -209,6 +209,16 @@ _bm.make_bitmatrix_metadata = _make_bitmatrix_metadata_pow2_safe +# Two API generations of triton_kernels are supported: +# - v3.5...
60
35
1
[ "gpt-oss" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/fused_moe/experts/gpt_oss_triton_kernels_moe.py). Goal: [Perf][gpt-oss] Downgrade triton_kernels to v3.5.1 Target hardware: unspecified Target models: gpt-oss Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: ...
Recovers a decode-time regression on gpt-oss models after the triton_kernels v3.5.1 → v3.6.0 bump in #30525 and the routing rewrite in #38504. - Pin `triton_kernels` back to v3.5.1. - Activate the legacy routing path whenever `SparseMatrix` is missing (previously gated to ROCm only). - When no expert map is set, call ...
[]
null
null
vllm
37ece593c105b5bb818aa94885617b863d390d7f
2026-05-18T19:38:12-04:00
42,774
https://github.com/vllm-project/vllm/pull/42774
[Perf] Padded nvfp4 quant kernel to remove additional copy, 2.4%~5.7% e2e performance improvement (#42774)
[Perf] Padded nvfp4 quant kernel to remove additional copy, 2.4%~5.7% e2e performance improvement (#42774) Signed-off-by: yewentao256 <zhyanwentao@126.com>
csrc/libtorch_stable/quantization/fp4/nvfp4_quant_kernels.cu
cuda
Apache-2.0
/* * Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requi...
/* * Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requi...
--- csrc/libtorch_stable/quantization/fp4/nvfp4_quant_kernels.cu +++ csrc/libtorch_stable/quantization/fp4/nvfp4_quant_kernels.cu @@ -38,8 +38,8 @@ // Use UE4M3 by default. template <class Type, bool UE8M0_SF = false> __global__ void __launch_bounds__(512, VLLM_BLOCKS_PER_SM(512)) - cvt_fp16_to_fp4(int32_t numRow...
89
83
1
[]
[]
[]
Optimize this cuda kernel file from vllm (csrc/libtorch_stable/quantization/fp4/nvfp4_quant_kernels.cu). Goal: [Perf] Padded nvfp4 quant kernel to remove additional copy, 2.4%~5.7% e2e performance improvement Target hardware: unspecified Target models: unspecified Current file: ```cuda /* * Copyright (c) 2025, NVIDI...
## Purpose Padded nvfp4 quant kernel to remove additional copy, 15~40% kernel performance improvement, around 2.4%~5.7% e2e improvement ## Test Correctness covered by unit tests ### E2E perf ```bash CUDA_VISIBLE_DEVICES=0,1,2,3 \ vllm serve nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-NVFP4 \ --quantization modelopt_fp...
[{"scope": "e2e", "hardware": null, "model": "NVIDIA-Nemotron-3-Nano-30B-A3B-NVFP4", "shape": null, "batch_size": 128, "metric": "request throughput", "unit": "req/s", "higher_is_better": true, "baseline": 168.76, "optimized": 172.92, "stated_speedup": null, "speedup": 1.0247}, {"scope": "e2e", "hardware": null, "model...
1.2719
1.0247
vllm
998714b21b413c78db8eb7af7f384dc90c0b10dc
2026-05-18T01:32:46-07:00
42,849
https://github.com/vllm-project/vllm/pull/42849
[Perf] Add do_not_specialize in fused FP8 RoPE kernel (#42849)
[Perf] Add do_not_specialize in fused FP8 RoPE kernel (#42849) Signed-off-by: Xin Yang <xyangx@amazon.com>
vllm/v1/attention/ops/deepseek_v4_ops/fused_inv_rope_fp8_quant.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """ Fused inverse RoPE + block-scaled FP8 quantization kernel for DeepseekV4 attention. Output scale format is pre-transformed (MN-major TMA-aligned; FP32 on SM90, INT32-packed UE8M0 on SM100) so fp8_einsum skips...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """ Fused inverse RoPE + block-scaled FP8 quantization kernel for DeepseekV4 attention. Output scale format is pre-transformed (MN-major TMA-aligned; FP32 on SM90, INT32-packed UE8M0 on SM100) so fp8_einsum skips...
--- vllm/v1/attention/ops/deepseek_v4_ops/fused_inv_rope_fp8_quant.py +++ vllm/v1/attention/ops/deepseek_v4_ops/fused_inv_rope_fp8_quant.py @@ -14,7 +14,7 @@ from vllm.utils.torch_utils import direct_register_custom_op -@triton.jit +@triton.jit(do_not_specialize=["num_tokens"]) def _fused_inv_rope_fp8_quant_per_h...
1
1
1
[ "deepseek" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/v1/attention/ops/deepseek_v4_ops/fused_inv_rope_fp8_quant.py). Goal: [Perf] Add do_not_specialize in fused FP8 RoPE kernel Target hardware: unspecified Target models: deepseek Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyr...
## Purpose This PR add `do_not_specialize` in `_fused_inv_rope_fp8_quant_per_head` kernel, to prevent unnecessary recompilation of the kernel during inference when num_tokens are seen for the first time. e2e TTFT improves 9% on H200. ## Benchmark ``` rm -rf ~/.triton/cache vllm serve deepseek-ai/DeepSeek-V4-Fla...
[{"scope": "e2e", "hardware": "H200", "model": "deepseek-ai/DeepSeek-V4-Flash", "shape": null, "batch_size": 8, "metric": "TTFT", "unit": "ms", "higher_is_better": false, "baseline": 370.14, "optimized": 338.37, "stated_speedup": 1.09, "speedup": 1.0939}, {"scope": "e2e", "hardware": "H200", "model": "deepseek-ai/DeepS...
null
1.0093
vllm
5ab6d1b3fd407404cd78488bf6f4cbcde6d912b7
2026-05-18T10:14:36+02:00
42,311
https://github.com/vllm-project/vllm/pull/42311
[Model] [Perf] Use flatten for Qwen3.5's GDN output projection (#42311)
[Model] [Perf] Use flatten for Qwen3.5's GDN output projection (#42311) Signed-off-by: Rishapveer Singh <singhrishapveer@gmail.com>
vllm/model_executor/layers/mamba/gdn_linear_attn.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Inference-only Qwen3-Next/Qwen3.5 model.""" import torch from einops import rearrange from torch import nn from transformers.activations import ACT2FN from vllm import envs from vllm._aiter_ops import rocm_ai...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Inference-only Qwen3-Next/Qwen3.5 model.""" import torch from einops import rearrange from torch import nn from transformers.activations import ACT2FN from vllm import envs from vllm._aiter_ops import rocm_ai...
--- vllm/model_executor/layers/mamba/gdn_linear_attn.py +++ vllm/model_executor/layers/mamba/gdn_linear_attn.py @@ -680,7 +680,7 @@ z = z.reshape(-1, z.shape[-1]) core_attn_out = self.norm(core_attn_out, z) core_attn_out = core_attn_out.reshape(z_shape_og) - core_attn_out = rearrange(c...
3
3
1
[ "qwen", "mamba" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/mamba/gdn_linear_attn.py). Goal: [Model] [Perf] Use flatten for Qwen3.5's GDN output projection Target hardware: unspecified Target models: qwen, mamba Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyrig...
## Purpose For Qwen3.5's GDN output projection we currently use einops's `rearrange(core_attn_out, "... h d -> ... (h d)")` to merge the last 2 dimensions, which causes expensive python-level string parsing and validation on every GDN forward call. We can use the pytorch equivalent `core_attn_out.flatten(-2)` to avoid ...
[{"scope": "kernel", "hardware": "CUDA", "model": "Qwen/Qwen3.5-0.8B", "shape": null, "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 23.261, "optimized": 2.828, "stated_speedup": 8.23, "speedup": 8.2252}, {"scope": "kernel", "hardware": "CPU", "model": "Qwen/Qwen3.5-0.8B", "s...
14.8209
null
vllm
f351455f0f06c17c723341bc6d78c3d4470b5b09
2026-05-15T12:08:23+08:00
40,119
https://github.com/vllm-project/vllm/pull/40119
[CPU][RISC-V] Add RVV-optimized attention kernels for RISC-V Vector Extension (#40119)
[CPU][RISC-V] Add RVV-optimized attention kernels for RISC-V Vector Extension (#40119) Signed-off-by: liuyudong <liuyudong@iscas.ac.cn> Co-authored-by: Claude <noreply@anthropic.com>
csrc/cpu/cpu_arch_macros.h
cpp
Apache-2.0
#ifndef CPU_ARCH_MACROS_H #define CPU_ARCH_MACROS_H // x86_64 #ifdef __x86_64__ #define FAST_SPINNING _mm_pause(); #ifdef __AVX512F__ #define DEFINE_FAST_EXP \ const __m512 vec_factorial_1 = _mm512_set1_ps(0.999999701f); \ const __m512...
#ifndef CPU_ARCH_MACROS_H #define CPU_ARCH_MACROS_H // x86_64 #ifdef __x86_64__ #define FAST_SPINNING _mm_pause(); #ifdef __AVX512F__ #define DEFINE_FAST_EXP \ const __m512 vec_factorial_1 = _mm512_set1_ps(0.999999701f); \ const __m512...
--- csrc/cpu/cpu_arch_macros.h +++ csrc/cpu/cpu_arch_macros.h @@ -156,4 +156,20 @@ #endif // __aarch64__ +// RISC-V RVV +#ifdef __riscv_v + #include <riscv_vector.h> + + #ifdef __riscv_zihintpause + #define FAST_SPINNING __riscv_pause(); + #endif + + // FP32Vec16::exp() in cpu_types_riscv.hpp already imple...
16
0
7
[]
[ "CPU" ]
[]
Optimize this cpp kernel file from vllm (csrc/cpu/cpu_arch_macros.h). Goal: [CPU][RISC-V] Add RVV-optimized attention kernels for RISC-V Vector Extension Target hardware: CPU Target models: unspecified Current file: ```cpp #ifndef CPU_ARCH_MACROS_H #define CPU_ARCH_MACROS_H // x86_64 #ifdef __x86_64__ #define FAST...
Add RISC-V Vector Extension (RVV) optimized attention kernels for vLLM's CPU backend, enabling efficient LLM inference on RISC-V platforms. **Key changes:** - Add `cpu_attn_rvv.hpp`: RVV-specific tiled GEMM micro-kernels using `vfmacc_vf` (scalar-broadcast FMA) with Mx8 tiles and K- unroll-by-4 - Add RVV...
[{"scope": "e2e", "hardware": "SG2044", "model": null, "shape": "head_size=128", "batch_size": 32, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 19.67, "optimized": 8.65, "stated_speedup": 2.27, "speedup": 2.274}, {"scope": "e2e", "hardware": "SG2044", "model": null, "shape": "head_size=128"...
null
2.5249
vllm
f351455f0f06c17c723341bc6d78c3d4470b5b09
2026-05-15T12:08:23+08:00
40,119
https://github.com/vllm-project/vllm/pull/40119
[CPU][RISC-V] Add RVV-optimized attention kernels for RISC-V Vector Extension (#40119)
[CPU][RISC-V] Add RVV-optimized attention kernels for RISC-V Vector Extension (#40119) Signed-off-by: liuyudong <liuyudong@iscas.ac.cn> Co-authored-by: Claude <noreply@anthropic.com>
csrc/cpu/cpu_attn.cpp
cpp
Apache-2.0
#include "cpu_attn_dispatch_generated.h" // Maps kv_cache_dtype string to Fp8KVCacheDataType enum. // "auto" -> kAuto(0); "fp8"/"fp8_e4m3" -> kFp8E4M3; "fp8_e5m2" -> kFp8E5M2. static inline cpu_attention::Fp8KVCacheDataType parse_fp8_kv_dtype( const std::string& kv_cache_dtype) { if (kv_cache_dtype == "fp8_e5m2"...
#include "cpu_attn_dispatch_generated.h" // Maps kv_cache_dtype string to Fp8KVCacheDataType enum. // "auto" -> kAuto(0); "fp8"/"fp8_e4m3" -> kFp8E4M3; "fp8_e5m2" -> kFp8E5M2. static inline cpu_attention::Fp8KVCacheDataType parse_fp8_kv_dtype( const std::string& kv_cache_dtype) { if (kv_cache_dtype == "fp8_e5m2"...
--- csrc/cpu/cpu_attn.cpp +++ csrc/cpu/cpu_attn.cpp @@ -29,6 +29,8 @@ isa = cpu_attention::ISA::NEON; } else if (isa_hint == "vxe") { isa = cpu_attention::ISA::VXE; + } else if (isa_hint == "rvv") { + isa = cpu_attention::ISA::RVV; } else if (isa_hint == "vsx") { isa = cpu_attention::ISA::VSX; ...
4
0
7
[]
[ "CPU" ]
[]
Optimize this cpp kernel file from vllm (csrc/cpu/cpu_attn.cpp). Goal: [CPU][RISC-V] Add RVV-optimized attention kernels for RISC-V Vector Extension Target hardware: CPU Target models: unspecified Current file: ```cpp #include "cpu_attn_dispatch_generated.h" // Maps kv_cache_dtype string to Fp8KVCacheDataType enum. ...
Add RISC-V Vector Extension (RVV) optimized attention kernels for vLLM's CPU backend, enabling efficient LLM inference on RISC-V platforms. **Key changes:** - Add `cpu_attn_rvv.hpp`: RVV-specific tiled GEMM micro-kernels using `vfmacc_vf` (scalar-broadcast FMA) with Mx8 tiles and K- unroll-by-4 - Add RVV...
[{"scope": "e2e", "hardware": "SG2044", "model": null, "shape": "head_size=128", "batch_size": 32, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 19.67, "optimized": 8.65, "stated_speedup": 2.27, "speedup": 2.274}, {"scope": "e2e", "hardware": "SG2044", "model": null, "shape": "head_size=128"...
null
2.5249
vllm
f351455f0f06c17c723341bc6d78c3d4470b5b09
2026-05-15T12:08:23+08:00
40,119
https://github.com/vllm-project/vllm/pull/40119
[CPU][RISC-V] Add RVV-optimized attention kernels for RISC-V Vector Extension (#40119)
[CPU][RISC-V] Add RVV-optimized attention kernels for RISC-V Vector Extension (#40119) Signed-off-by: liuyudong <liuyudong@iscas.ac.cn> Co-authored-by: Claude <noreply@anthropic.com>
csrc/cpu/cpu_attn_impl.hpp
cpp
Apache-2.0
#ifndef CPU_ATTN_HPP #define CPU_ATTN_HPP #include <type_traits> #include <cstddef> #if defined(__APPLE__) #include <sys/sysctl.h> #endif #include "cpu/cpu_arch_macros.h" #include "cpu/utils.hpp" namespace cpu_attention { enum class ISA { AMX, VEC, VEC16, NEON, VXE, VSX }; // Mirrors csrc/attention/dtype_fp8.cuh...
#ifndef CPU_ATTN_HPP #define CPU_ATTN_HPP #include <type_traits> #include <cstddef> #if defined(__APPLE__) #include <sys/sysctl.h> #endif #include "cpu/cpu_arch_macros.h" #include "cpu/utils.hpp" namespace cpu_attention { enum class ISA { AMX, VEC, VEC16, NEON, VXE, RVV, VSX }; // Mirrors csrc/attention/dtype_fp...
--- csrc/cpu/cpu_attn_impl.hpp +++ csrc/cpu/cpu_attn_impl.hpp @@ -12,7 +12,7 @@ #include "cpu/utils.hpp" namespace cpu_attention { -enum class ISA { AMX, VEC, VEC16, NEON, VXE, VSX }; +enum class ISA { AMX, VEC, VEC16, NEON, VXE, RVV, VSX }; // Mirrors csrc/attention/dtype_fp8.cuh Fp8KVCacheDataType exactly. en...
4
1
7
[]
[ "CPU" ]
[]
Optimize this cpp kernel file from vllm (csrc/cpu/cpu_attn_impl.hpp). Goal: [CPU][RISC-V] Add RVV-optimized attention kernels for RISC-V Vector Extension Target hardware: CPU Target models: unspecified Current file: ```cpp #ifndef CPU_ATTN_HPP #define CPU_ATTN_HPP #include <type_traits> #include <cstddef> #if defin...
Add RISC-V Vector Extension (RVV) optimized attention kernels for vLLM's CPU backend, enabling efficient LLM inference on RISC-V platforms. **Key changes:** - Add `cpu_attn_rvv.hpp`: RVV-specific tiled GEMM micro-kernels using `vfmacc_vf` (scalar-broadcast FMA) with Mx8 tiles and K- unroll-by-4 - Add RVV...
[{"scope": "e2e", "hardware": "SG2044", "model": null, "shape": "head_size=128", "batch_size": 32, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 19.67, "optimized": 8.65, "stated_speedup": 2.27, "speedup": 2.274}, {"scope": "e2e", "hardware": "SG2044", "model": null, "shape": "head_size=128"...
null
2.5249
vllm
f351455f0f06c17c723341bc6d78c3d4470b5b09
2026-05-15T12:08:23+08:00
40,119
https://github.com/vllm-project/vllm/pull/40119
[CPU][RISC-V] Add RVV-optimized attention kernels for RISC-V Vector Extension (#40119)
[CPU][RISC-V] Add RVV-optimized attention kernels for RISC-V Vector Extension (#40119) Signed-off-by: liuyudong <liuyudong@iscas.ac.cn> Co-authored-by: Claude <noreply@anthropic.com>
csrc/cpu/cpu_types_riscv_defs.hpp
cpp
Apache-2.0
#ifndef CPU_TYPES_RISCV_DEFS_HPP #define CPU_TYPES_RISCV_DEFS_HPP // VLEN-to-LMUL mapping for RISC-V Vector extension. // // LMUL_<N> expands to the LMUL suffix giving N total bits of vector data: // VLEN=128: LMUL_128=m1, LMUL_256=m2, LMUL_512=m4, LMUL_1024=m8 // VLEN=256: LMUL_128=mf2, LMUL_256=m1, LMUL_512=...
#ifndef CPU_TYPES_RISCV_DEFS_HPP #define CPU_TYPES_RISCV_DEFS_HPP // VLEN-to-LMUL mapping for RISC-V Vector extension. // // LMUL_<N> expands to the LMUL suffix giving N total bits of vector data: // VLEN=128: LMUL_128=m1, LMUL_256=m2, LMUL_512=m4, LMUL_1024=m8 // VLEN=256: LMUL_128=mf2, LMUL_256=m1, LMUL_512=...
--- csrc/cpu/cpu_types_riscv_defs.hpp +++ csrc/cpu/cpu_types_riscv_defs.hpp @@ -72,7 +72,7 @@ __attribute__((riscv_rvv_vector_bits(512))); // bfloat16 -#ifdef RISCV_BF16_SUPPORT +#ifdef __riscv_zvfbfmin typedef RVVTYPE(vbfloat16, LMUL_128, _t) fixed_bf16x8_t __attribute__((riscv_rvv_vector_bits(128))); t...
1
1
7
[]
[ "CPU" ]
[]
Optimize this cpp kernel file from vllm (csrc/cpu/cpu_types_riscv_defs.hpp). Goal: [CPU][RISC-V] Add RVV-optimized attention kernels for RISC-V Vector Extension Target hardware: CPU Target models: unspecified Current file: ```cpp #ifndef CPU_TYPES_RISCV_DEFS_HPP #define CPU_TYPES_RISCV_DEFS_HPP // VLEN-to-LMUL mappi...
Add RISC-V Vector Extension (RVV) optimized attention kernels for vLLM's CPU backend, enabling efficient LLM inference on RISC-V platforms. **Key changes:** - Add `cpu_attn_rvv.hpp`: RVV-specific tiled GEMM micro-kernels using `vfmacc_vf` (scalar-broadcast FMA) with Mx8 tiles and K- unroll-by-4 - Add RVV...
[{"scope": "e2e", "hardware": "SG2044", "model": null, "shape": "head_size=128", "batch_size": 32, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 19.67, "optimized": 8.65, "stated_speedup": 2.27, "speedup": 2.274}, {"scope": "e2e", "hardware": "SG2044", "model": null, "shape": "head_size=128"...
null
2.5249
vllm
f351455f0f06c17c723341bc6d78c3d4470b5b09
2026-05-15T12:08:23+08:00
40,119
https://github.com/vllm-project/vllm/pull/40119
[CPU][RISC-V] Add RVV-optimized attention kernels for RISC-V Vector Extension (#40119)
[CPU][RISC-V] Add RVV-optimized attention kernels for RISC-V Vector Extension (#40119) Signed-off-by: liuyudong <liuyudong@iscas.ac.cn> Co-authored-by: Claude <noreply@anthropic.com>
csrc/cpu/cpu_types_riscv_impl.hpp
cpp
Apache-2.0
#ifndef CPU_TYPES_RISCV_IMPL_HPP #define CPU_TYPES_RISCV_IMPL_HPP // Shared implementation of RVV vector-type wrapper classes. // This file is VLEN-independent: it uses the semantic type names and // RVVI() intrinsic macros from cpu_types_riscv_defs.hpp. // // DO NOT include this file directly; include cpu_types_riscv...
#ifndef CPU_TYPES_RISCV_IMPL_HPP #define CPU_TYPES_RISCV_IMPL_HPP // Shared implementation of RVV vector-type wrapper classes. // This file is VLEN-independent: it uses the semantic type names and // RVVI() intrinsic macros from cpu_types_riscv_defs.hpp. // // DO NOT include this file directly; include cpu_types_riscv...
--- csrc/cpu/cpu_types_riscv_impl.hpp +++ csrc/cpu/cpu_types_riscv_impl.hpp @@ -15,8 +15,17 @@ #include <torch/all.h> namespace vec_op { -// BFloat16 is always supported on RISC-V: natively when RISCV_BF16_SUPPORT -// is defined, otherwise via the FP32-simulation fallback path. +// FP8 KV cache is not supported on ...
29
6
7
[]
[ "CPU" ]
[]
Optimize this cpp kernel file from vllm (csrc/cpu/cpu_types_riscv_impl.hpp). Goal: [CPU][RISC-V] Add RVV-optimized attention kernels for RISC-V Vector Extension Target hardware: CPU Target models: unspecified Current file: ```cpp #ifndef CPU_TYPES_RISCV_IMPL_HPP #define CPU_TYPES_RISCV_IMPL_HPP // Shared implementat...
Add RISC-V Vector Extension (RVV) optimized attention kernels for vLLM's CPU backend, enabling efficient LLM inference on RISC-V platforms. **Key changes:** - Add `cpu_attn_rvv.hpp`: RVV-specific tiled GEMM micro-kernels using `vfmacc_vf` (scalar-broadcast FMA) with Mx8 tiles and K- unroll-by-4 - Add RVV...
[{"scope": "e2e", "hardware": "SG2044", "model": null, "shape": "head_size=128", "batch_size": 32, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 19.67, "optimized": 8.65, "stated_speedup": 2.27, "speedup": 2.274}, {"scope": "e2e", "hardware": "SG2044", "model": null, "shape": "head_size=128"...
null
2.5249
vllm
0a65d46628fdc7d8e83c1111b46a078219d7d983
2026-05-14T20:11:02+08:00
41,263
https://github.com/vllm-project/vllm/pull/41263
[DSV4] Fuse norm and router for low latency scenario (#41263)
[DSV4] Fuse norm and router for low latency scenario (#41263) Signed-off-by: Jee Jee Li <pandaleefree@gmail.com> Signed-off-by: jeejeelee <jeejeelee@verda-b300-05.datacrunch.io> Co-authored-by: jeejeelee <jeejeelee@verda-b300-05.datacrunch.io> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github....
csrc/moe/moe_ops.h
cpp
Apache-2.0
#pragma once #include <torch/all.h> void topk_softmax(torch::Tensor& topk_weights, torch::Tensor& topk_indices, torch::Tensor& token_expert_indices, torch::Tensor& gating_output, bool renormalize, std::optional<torch::Tensor> bias); void topk_sigmoid(torch::Tenso...
#pragma once #include <torch/all.h> void topk_softmax(torch::Tensor& topk_weights, torch::Tensor& topk_indices, torch::Tensor& token_expert_indices, torch::Tensor& gating_output, bool renormalize, std::optional<torch::Tensor> bias); void topk_sigmoid(torch::Tenso...
--- csrc/moe/moe_ops.h +++ csrc/moe/moe_ops.h @@ -75,4 +75,12 @@ // Supports num_tokens in [1, 16], num_experts in {256, 384}, hidden_dim = 7168 void dsv3_router_gemm(torch::Tensor& output, const torch::Tensor& mat_a, const torch::Tensor& mat_b); + +// Fused RMSNorm + router GEMV for DeepSeek V...
8
0
2
[ "deepseek" ]
[ "B300" ]
[]
Optimize this cpp kernel file from vllm (csrc/moe/moe_ops.h). Goal: [DSV4] Fuse norm and router for low latency scenario Target hardware: B300 Target models: deepseek Current file: ```cpp #pragma once #include <torch/all.h> void topk_softmax(torch::Tensor& topk_weights, torch::Tensor& topk_indices, ...
## Purpose ## Test Plan ### performance - DSV4PRO TP8 on B300 | Conc | Req/s | Tok/s | Total tok/s | P50 TTFT (ms) | P50 TPOT (ms) | |---:|---:|---:|---:|---:|---:| | 1 | 0.05 / 0.05 | 79.59 / **81.24** | 610.22 / **622.87** | **464.78** / 465.56 | 12.27 / **12.01** | | 2 | 0.10 / 0.10 | 149.32 / **153.65** | 1...
[]
null
null
vllm
0a65d46628fdc7d8e83c1111b46a078219d7d983
2026-05-14T20:11:02+08:00
41,263
https://github.com/vllm-project/vllm/pull/41263
[DSV4] Fuse norm and router for low latency scenario (#41263)
[DSV4] Fuse norm and router for low latency scenario (#41263) Signed-off-by: Jee Jee Li <pandaleefree@gmail.com> Signed-off-by: jeejeelee <jeejeelee@verda-b300-05.datacrunch.io> Co-authored-by: jeejeelee <jeejeelee@verda-b300-05.datacrunch.io> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github....
csrc/moe/torch_bindings.cpp
cpp
Apache-2.0
#include "core/registration.h" #include "moe_ops.h" TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, m) { // Apply topk softmax to the gating outputs. m.def( "topk_softmax(Tensor! topk_weights, Tensor! topk_indices, Tensor! " "token_expert_indices, Tensor gating_output, bool renormalize, Tensor? " "bia...
#include "core/registration.h" #include "moe_ops.h" TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, m) { // Apply topk softmax to the gating outputs. m.def( "topk_softmax(Tensor! topk_weights, Tensor! topk_indices, Tensor! " "token_expert_indices, Tensor gating_output, bool renormalize, Tensor? " "bia...
--- csrc/moe/torch_bindings.cpp +++ csrc/moe/torch_bindings.cpp @@ -135,6 +135,12 @@ // DeepSeek V3 optimized router GEMM for SM90+ m.def("dsv3_router_gemm(Tensor! output, Tensor mat_a, Tensor mat_b) -> ()"); // conditionally compiled so impl registration is in source file + + // DeepSeek V4 fused RMSNorm + r...
6
0
2
[ "deepseek" ]
[ "B300" ]
[]
Optimize this cpp kernel file from vllm (csrc/moe/torch_bindings.cpp). Goal: [DSV4] Fuse norm and router for low latency scenario Target hardware: B300 Target models: deepseek Current file: ```cpp #include "core/registration.h" #include "moe_ops.h" TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, m) { // Apply topk so...
## Purpose ## Test Plan ### performance - DSV4PRO TP8 on B300 | Conc | Req/s | Tok/s | Total tok/s | P50 TTFT (ms) | P50 TPOT (ms) | |---:|---:|---:|---:|---:|---:| | 1 | 0.05 / 0.05 | 79.59 / **81.24** | 610.22 / **622.87** | **464.78** / 465.56 | 12.27 / **12.01** | | 2 | 0.10 / 0.10 | 149.32 / **153.65** | 1...
[]
null
null
vllm
dd6b3a5ef548e9349e6c103dfa7b1b484c9ca41a
2026-05-12T22:01:30+08:00
42,153
https://github.com/vllm-project/vllm/pull/42153
[Perf] Use 2D-grid to eliminate divmod in W8W8 group quant (#42153)
[Perf] Use 2D-grid to eliminate divmod in W8W8 group quant (#42153) Signed-off-by: jiahanc <173873397+jiahanc@users.noreply.github.com> Co-authored-by: Yongye Zhu <zyy1102000@gmail.com>
csrc/libtorch_stable/quantization/w8a8/fp8/per_token_group_quant.cu
cuda
Apache-2.0
#include <torch/csrc/stable/tensor.h> #include <torch/csrc/stable/ops.h> #include <torch/headeronly/util/Exception.h> #include <torch/headeronly/core/ScalarType.h> #include "libtorch_stable/quantization/w8a8/per_token_group_quant_8bit.h" #include <cmath> #include <cuda_fp8.h> #include "libtorch_stable/quantization/...
#include <torch/csrc/stable/tensor.h> #include <torch/csrc/stable/ops.h> #include <torch/headeronly/util/Exception.h> #include <torch/headeronly/core/ScalarType.h> #include "libtorch_stable/quantization/w8a8/per_token_group_quant_8bit.h" #include <cmath> #include <cuda_fp8.h> #include "libtorch_stable/quantization/...
--- csrc/libtorch_stable/quantization/w8a8/fp8/per_token_group_quant.cu +++ csrc/libtorch_stable/quantization/w8a8/fp8/per_token_group_quant.cu @@ -154,6 +154,17 @@ return 2; } return 1; +} + +// Largest divisor of padded_groups_per_row that is <= 16. ry = 16 / kx. +inline int GetGroupsPerBlockX(int64_t padd...
69
40
1
[]
[]
[]
Optimize this cuda kernel file from vllm (csrc/libtorch_stable/quantization/w8a8/fp8/per_token_group_quant.cu). Goal: [Perf] Use 2D-grid to eliminate divmod in W8W8 group quant Target hardware: unspecified Target models: unspecified Current file: ```cuda #include <torch/csrc/stable/tensor.h> #include <torch/csrc/stab...
## Purpose Replace the 1D-grid `(global_group_id % padded_gpr, / padded_gpr)` divmod with a 2D grid + template-constant index unpack. Since the tile sizes are compile-time constants, the compiler can lower the coordinate math to simple bit operations instead of emitting runtime division/modulo setup. Micro-benchma...
[{"scope": "kernel", "hardware": null, "model": "DeepSeek V4 Pro", "shape": "K=7168,M=8192", "batch_size": 8192, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 36.95, "optimized": 33.62, "stated_speedup": 1.099, "speedup": 1.099}, {"scope": "kernel", "hardware": null, "model": "DeepSeek V4 Pr...
1.0503
null
vllm
0d453e23364701f6fe2f20deafbb372b28714a86
2026-05-11T12:20:58-04:00
40,408
https://github.com/vllm-project/vllm/pull/40408
[Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement (#40408)
[Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement (#40408) Signed-off-by: yewentao256 <zhyanwentao@126.com> Signed-off-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm100_fp8.cu
cuda
Apache-2.0
#include "scaled_mm_kernels.hpp" #include "scaled_mm_sm100_fp8_dispatch.cuh" namespace vllm { void cutlass_scaled_mm_sm100_fp8( torch::stable::Tensor& out, torch::stable::Tensor const& a, torch::stable::Tensor const& b, torch::stable::Tensor const& a_scales, torch::stable::Tensor const& b_scales, std:...
#include "scaled_mm_kernels.hpp" #include "scaled_mm_sm100_fp8_dispatch.cuh" #include "core/batch_invariant.hpp" namespace vllm { void cutlass_scaled_mm_sm100_fp8( torch::stable::Tensor& out, torch::stable::Tensor const& a, torch::stable::Tensor const& b, torch::stable::Tensor const& a_scales, torch::stab...
--- csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm100_fp8.cu +++ csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm100_fp8.cu @@ -1,5 +1,6 @@ #include "scaled_mm_kernels.hpp" #include "scaled_mm_sm100_fp8_dispatch.cuh" +#include "core/batch_invariant.hpp" namespace vllm { @@ -13,9 +...
9
0
10
[]
[]
[]
Optimize this cuda kernel file from vllm (csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm100_fp8.cu). Goal: [Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement Target hardware: unspecified Target models: unspecified Current file: ```cuda #include "scaled_mm_kernels.hpp" #in...
## Purpose Use cutlass fp8 to avoid quantize/dequantize overhead ## Test ### Perf `VLLM_BATCH_INVARIANT=1 vllm bench latency --model=Qwen/Qwen3-1.7B --quantization=fp8 --attention-backend=TRITON_ATTN --input-len=1024 --output-len=128 --batch-size=8` ```bash # now Avg latency: 0.5149560342853268 seconds...
[{"scope": "e2e", "hardware": null, "model": "Qwen/Qwen3-1.7B", "shape": "input-len=1024,output-len=128", "batch_size": 8, "metric": "latency", "unit": "seconds", "higher_is_better": false, "baseline": 0.6638397837368151, "optimized": 0.5149560342853268, "stated_speedup": null, "speedup": 1.2891}]
null
1.2891
vllm
0d453e23364701f6fe2f20deafbb372b28714a86
2026-05-11T12:20:58-04:00
40,408
https://github.com/vllm-project/vllm/pull/40408
[Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement (#40408)
[Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement (#40408) Signed-off-by: yewentao256 <zhyanwentao@126.com> Signed-off-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm100_fp8_dispatch.cuh
cuda
Apache-2.0
#pragma once #include <torch/headeronly/util/shim_utils.h> #include "scaled_mm.cuh" #include "cutlass_gemm_caller.cuh" #include "cutlass_extensions/epilogue/scaled_mm_epilogues_c3x.hpp" /** * This file defines Gemm kernel configurations for SM100 (fp8) based on the * Gemm shape. */ namespace vllm { using c3x::c...
#pragma once #include <torch/headeronly/util/shim_utils.h> #include "scaled_mm.cuh" #include "cutlass_gemm_caller.cuh" #include "cutlass_extensions/epilogue/scaled_mm_epilogues_c3x.hpp" /** * This file defines Gemm kernel configurations for SM100 (fp8) based on the * Gemm shape. */ namespace vllm { using c3x::c...
--- csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm100_fp8_dispatch.cuh +++ csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm100_fp8_dispatch.cuh @@ -294,6 +294,34 @@ } } +template <typename InType, typename OutType, bool EnableBias, + typename... EpilogueArgs> +inline void ...
52
0
10
[]
[]
[]
Optimize this cuda kernel file from vllm (csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm100_fp8_dispatch.cuh). Goal: [Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement Target hardware: unspecified Target models: unspecified Current file: ```cuda #pragma once #include <to...
## Purpose Use cutlass fp8 to avoid quantize/dequantize overhead ## Test ### Perf `VLLM_BATCH_INVARIANT=1 vllm bench latency --model=Qwen/Qwen3-1.7B --quantization=fp8 --attention-backend=TRITON_ATTN --input-len=1024 --output-len=128 --batch-size=8` ```bash # now Avg latency: 0.5149560342853268 seconds...
[{"scope": "e2e", "hardware": null, "model": "Qwen/Qwen3-1.7B", "shape": "input-len=1024,output-len=128", "batch_size": 8, "metric": "latency", "unit": "seconds", "higher_is_better": false, "baseline": 0.6638397837368151, "optimized": 0.5149560342853268, "stated_speedup": null, "speedup": 1.2891}]
null
1.2891
vllm
0d453e23364701f6fe2f20deafbb372b28714a86
2026-05-11T12:20:58-04:00
40,408
https://github.com/vllm-project/vllm/pull/40408
[Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement (#40408)
[Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement (#40408) Signed-off-by: yewentao256 <zhyanwentao@126.com> Signed-off-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm120_fp8.cu
cuda
Apache-2.0
#include "scaled_mm_kernels.hpp" #include "scaled_mm_sm120_fp8_dispatch.cuh" #include "cutlass_extensions/epilogue/scaled_mm_epilogues_c3x.hpp" namespace vllm { void cutlass_scaled_mm_sm120_fp8( torch::stable::Tensor& out, torch::stable::Tensor const& a, torch::stable::Tensor const& b, torch::stable::Tensor c...
#include "scaled_mm_kernels.hpp" #include "scaled_mm_sm120_fp8_dispatch.cuh" #include "core/batch_invariant.hpp" #include "cutlass_extensions/epilogue/scaled_mm_epilogues_c3x.hpp" namespace vllm { void cutlass_scaled_mm_sm120_fp8( torch::stable::Tensor& out, torch::stable::Tensor const& a, torch::stable::Tens...
--- csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm120_fp8.cu +++ csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm120_fp8.cu @@ -1,5 +1,6 @@ #include "scaled_mm_kernels.hpp" #include "scaled_mm_sm120_fp8_dispatch.cuh" +#include "core/batch_invariant.hpp" #include "cutlass_extensions/ep...
9
0
10
[]
[]
[]
Optimize this cuda kernel file from vllm (csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm120_fp8.cu). Goal: [Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement Target hardware: unspecified Target models: unspecified Current file: ```cuda #include "scaled_mm_kernels.hpp" #in...
## Purpose Use cutlass fp8 to avoid quantize/dequantize overhead ## Test ### Perf `VLLM_BATCH_INVARIANT=1 vllm bench latency --model=Qwen/Qwen3-1.7B --quantization=fp8 --attention-backend=TRITON_ATTN --input-len=1024 --output-len=128 --batch-size=8` ```bash # now Avg latency: 0.5149560342853268 seconds...
[{"scope": "e2e", "hardware": null, "model": "Qwen/Qwen3-1.7B", "shape": "input-len=1024,output-len=128", "batch_size": 8, "metric": "latency", "unit": "seconds", "higher_is_better": false, "baseline": 0.6638397837368151, "optimized": 0.5149560342853268, "stated_speedup": null, "speedup": 1.2891}]
null
1.2891
vllm
0d453e23364701f6fe2f20deafbb372b28714a86
2026-05-11T12:20:58-04:00
40,408
https://github.com/vllm-project/vllm/pull/40408
[Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement (#40408)
[Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement (#40408) Signed-off-by: yewentao256 <zhyanwentao@126.com> Signed-off-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm120_fp8_dispatch.cuh
cuda
Apache-2.0
#pragma once #include <torch/headeronly/util/shim_utils.h> #include "scaled_mm.cuh" #include "cutlass_gemm_caller.cuh" /** * This file defines Gemm kernel configurations for SM120 (fp8) based on the * Gemm shape. */ namespace vllm { using c3x::cutlass_gemm_caller; // Custom wrapper to allow specifying Epilogue...
#pragma once #include <torch/headeronly/util/shim_utils.h> #include "scaled_mm.cuh" #include "cutlass_gemm_caller.cuh" /** * This file defines Gemm kernel configurations for SM120 (fp8) based on the * Gemm shape. */ namespace vllm { using c3x::cutlass_gemm_caller; // Custom wrapper to allow specifying Epilogue...
--- csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm120_fp8_dispatch.cuh +++ csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm120_fp8_dispatch.cuh @@ -179,6 +179,26 @@ out, a, b, std::forward<EpilogueArgs>(args)...); } +template <typename InType, typename OutType, + templ...
42
0
10
[]
[]
[]
Optimize this cuda kernel file from vllm (csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm120_fp8_dispatch.cuh). Goal: [Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement Target hardware: unspecified Target models: unspecified Current file: ```cuda #pragma once #include <to...
## Purpose Use cutlass fp8 to avoid quantize/dequantize overhead ## Test ### Perf `VLLM_BATCH_INVARIANT=1 vllm bench latency --model=Qwen/Qwen3-1.7B --quantization=fp8 --attention-backend=TRITON_ATTN --input-len=1024 --output-len=128 --batch-size=8` ```bash # now Avg latency: 0.5149560342853268 seconds...
[{"scope": "e2e", "hardware": null, "model": "Qwen/Qwen3-1.7B", "shape": "input-len=1024,output-len=128", "batch_size": 8, "metric": "latency", "unit": "seconds", "higher_is_better": false, "baseline": 0.6638397837368151, "optimized": 0.5149560342853268, "stated_speedup": null, "speedup": 1.2891}]
null
1.2891
vllm
0d453e23364701f6fe2f20deafbb372b28714a86
2026-05-11T12:20:58-04:00
40,408
https://github.com/vllm-project/vllm/pull/40408
[Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement (#40408)
[Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement (#40408) Signed-off-by: yewentao256 <zhyanwentao@126.com> Signed-off-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm90_fp8.cu
cuda
Apache-2.0
#include "scaled_mm_kernels.hpp" #include "scaled_mm_sm90_fp8_dispatch.cuh" namespace vllm { void cutlass_scaled_mm_sm90_fp8( torch::stable::Tensor& out, torch::stable::Tensor const& a, torch::stable::Tensor const& b, torch::stable::Tensor const& a_scales, torch::stable::Tensor const& b_scales, std::o...
#include "scaled_mm_kernels.hpp" #include "scaled_mm_sm90_fp8_dispatch.cuh" #include "core/batch_invariant.hpp" namespace vllm { void cutlass_scaled_mm_sm90_fp8( torch::stable::Tensor& out, torch::stable::Tensor const& a, torch::stable::Tensor const& b, torch::stable::Tensor const& a_scales, torch::stable...
--- csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm90_fp8.cu +++ csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm90_fp8.cu @@ -1,5 +1,6 @@ #include "scaled_mm_kernels.hpp" #include "scaled_mm_sm90_fp8_dispatch.cuh" +#include "core/batch_invariant.hpp" namespace vllm { @@ -13,9 +14,...
9
0
10
[]
[]
[]
Optimize this cuda kernel file from vllm (csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm90_fp8.cu). Goal: [Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement Target hardware: unspecified Target models: unspecified Current file: ```cuda #include "scaled_mm_kernels.hpp" #inc...
## Purpose Use cutlass fp8 to avoid quantize/dequantize overhead ## Test ### Perf `VLLM_BATCH_INVARIANT=1 vllm bench latency --model=Qwen/Qwen3-1.7B --quantization=fp8 --attention-backend=TRITON_ATTN --input-len=1024 --output-len=128 --batch-size=8` ```bash # now Avg latency: 0.5149560342853268 seconds...
[{"scope": "e2e", "hardware": null, "model": "Qwen/Qwen3-1.7B", "shape": "input-len=1024,output-len=128", "batch_size": 8, "metric": "latency", "unit": "seconds", "higher_is_better": false, "baseline": 0.6638397837368151, "optimized": 0.5149560342853268, "stated_speedup": null, "speedup": 1.2891}]
null
1.2891
vllm
0d453e23364701f6fe2f20deafbb372b28714a86
2026-05-11T12:20:58-04:00
40,408
https://github.com/vllm-project/vllm/pull/40408
[Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement (#40408)
[Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement (#40408) Signed-off-by: yewentao256 <zhyanwentao@126.com> Signed-off-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm90_fp8_dispatch.cuh
cuda
Apache-2.0
#pragma once #include <torch/headeronly/util/shim_utils.h> #include "scaled_mm.cuh" #include "cutlass_gemm_caller.cuh" #include "cutlass_extensions/epilogue/scaled_mm_epilogues_c3x.hpp" /** * This file defines Gemm kernel configurations for SM90 (fp8) based on the Gemm * shape. */ namespace vllm { using c3x::cu...
#pragma once #include <torch/headeronly/util/shim_utils.h> #include "scaled_mm.cuh" #include "cutlass_gemm_caller.cuh" #include "cutlass_extensions/epilogue/scaled_mm_epilogues_c3x.hpp" /** * This file defines Gemm kernel configurations for SM90 (fp8) based on the Gemm * shape. */ namespace vllm { using c3x::cu...
--- csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm90_fp8_dispatch.cuh +++ csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm90_fp8_dispatch.cuh @@ -349,6 +349,35 @@ } } +template <typename InType, typename OutType, bool EnableBias, + typename... EpilogueArgs> +inline void cu...
53
0
10
[]
[]
[]
Optimize this cuda kernel file from vllm (csrc/libtorch_stable/quantization/w8a8/cutlass/c3x/scaled_mm_sm90_fp8_dispatch.cuh). Goal: [Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement Target hardware: unspecified Target models: unspecified Current file: ```cuda #pragma once #include <tor...
## Purpose Use cutlass fp8 to avoid quantize/dequantize overhead ## Test ### Perf `VLLM_BATCH_INVARIANT=1 vllm bench latency --model=Qwen/Qwen3-1.7B --quantization=fp8 --attention-backend=TRITON_ATTN --input-len=1024 --output-len=128 --batch-size=8` ```bash # now Avg latency: 0.5149560342853268 seconds...
[{"scope": "e2e", "hardware": null, "model": "Qwen/Qwen3-1.7B", "shape": "input-len=1024,output-len=128", "batch_size": 8, "metric": "latency", "unit": "seconds", "higher_is_better": false, "baseline": 0.6638397837368151, "optimized": 0.5149560342853268, "stated_speedup": null, "speedup": 1.2891}]
null
1.2891
vllm
0d453e23364701f6fe2f20deafbb372b28714a86
2026-05-11T12:20:58-04:00
40,408
https://github.com/vllm-project/vllm/pull/40408
[Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement (#40408)
[Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement (#40408) Signed-off-by: yewentao256 <zhyanwentao@126.com> Signed-off-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
csrc/libtorch_stable/quantization/w8a8/cutlass/scaled_mm_c2x.cu
cuda
Apache-2.0
#include <stddef.h> #include <torch/csrc/stable/tensor.h> #include <torch/headeronly/core/ScalarType.h> #include "cutlass/cutlass.h" #include "scaled_mm_c2x.cuh" #include "scaled_mm_c2x_sm75_dispatch.cuh" #include "scaled_mm_c2x_sm80_dispatch.cuh" #include "scaled_mm_c2x_sm89_fp8_dispatch.cuh" #include "scaled_mm_c2x_...
#include <stddef.h> #include <torch/csrc/stable/tensor.h> #include <torch/headeronly/core/ScalarType.h> #include "cutlass/cutlass.h" #include "scaled_mm_c2x.cuh" #include "scaled_mm_c2x_sm75_dispatch.cuh" #include "scaled_mm_c2x_sm80_dispatch.cuh" #include "scaled_mm_c2x_sm89_fp8_dispatch.cuh" #include "scaled_mm_c2x_...
--- csrc/libtorch_stable/quantization/w8a8/cutlass/scaled_mm_c2x.cu +++ csrc/libtorch_stable/quantization/w8a8/cutlass/scaled_mm_c2x.cu @@ -9,6 +9,7 @@ #include "scaled_mm_c2x_sm89_fp8_dispatch.cuh" #include "scaled_mm_c2x_sm89_int8_dispatch.cuh" +#include "core/batch_invariant.hpp" #include "libtorch_stable/cutla...
9
0
10
[]
[]
[]
Optimize this cuda kernel file from vllm (csrc/libtorch_stable/quantization/w8a8/cutlass/scaled_mm_c2x.cu). Goal: [Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement Target hardware: unspecified Target models: unspecified Current file: ```cuda #include <stddef.h> #include <torch/csrc/stabl...
## Purpose Use cutlass fp8 to avoid quantize/dequantize overhead ## Test ### Perf `VLLM_BATCH_INVARIANT=1 vllm bench latency --model=Qwen/Qwen3-1.7B --quantization=fp8 --attention-backend=TRITON_ATTN --input-len=1024 --output-len=128 --batch-size=8` ```bash # now Avg latency: 0.5149560342853268 seconds...
[{"scope": "e2e", "hardware": null, "model": "Qwen/Qwen3-1.7B", "shape": "input-len=1024,output-len=128", "batch_size": 8, "metric": "latency", "unit": "seconds", "higher_is_better": false, "baseline": 0.6638397837368151, "optimized": 0.5149560342853268, "stated_speedup": null, "speedup": 1.2891}]
null
1.2891
vllm
0d453e23364701f6fe2f20deafbb372b28714a86
2026-05-11T12:20:58-04:00
40,408
https://github.com/vllm-project/vllm/pull/40408
[Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement (#40408)
[Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement (#40408) Signed-off-by: yewentao256 <zhyanwentao@126.com> Signed-off-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
csrc/libtorch_stable/quantization/w8a8/cutlass/scaled_mm_c2x_sm89_fp8_dispatch.cuh
cuda
Apache-2.0
#pragma once #include <torch/headeronly/util/shim_utils.h> #include "scaled_mm_c2x.cuh" #include "cutlass/float8.h" /** * This file defines Gemm kernel configurations for SM89 (FP8) based on the Gemm * shape. */ namespace vllm { template <typename InType, typename OutType, template <typename, typename...
#pragma once #include <torch/headeronly/util/shim_utils.h> #include "scaled_mm_c2x.cuh" #include "cutlass/float8.h" /** * This file defines Gemm kernel configurations for SM89 (FP8) based on the Gemm * shape. */ namespace vllm { template <typename InType, typename OutType, template <typename, typename...
--- csrc/libtorch_stable/quantization/w8a8/cutlass/scaled_mm_c2x_sm89_fp8_dispatch.cuh +++ csrc/libtorch_stable/quantization/w8a8/cutlass/scaled_mm_c2x_sm89_fp8_dispatch.cuh @@ -381,4 +381,43 @@ } } +template <typename InType, typename OutType, + template <typename, typename> typename Epilogue, + ...
39
0
10
[]
[]
[]
Optimize this cuda kernel file from vllm (csrc/libtorch_stable/quantization/w8a8/cutlass/scaled_mm_c2x_sm89_fp8_dispatch.cuh). Goal: [Perf] Batch invariance with Cutlass fp8 support, 28.9% E2E latency improvement Target hardware: unspecified Target models: unspecified Current file: ```cuda #pragma once #include <tor...
## Purpose Use cutlass fp8 to avoid quantize/dequantize overhead ## Test ### Perf `VLLM_BATCH_INVARIANT=1 vllm bench latency --model=Qwen/Qwen3-1.7B --quantization=fp8 --attention-backend=TRITON_ATTN --input-len=1024 --output-len=128 --batch-size=8` ```bash # now Avg latency: 0.5149560342853268 seconds...
[{"scope": "e2e", "hardware": null, "model": "Qwen/Qwen3-1.7B", "shape": "input-len=1024,output-len=128", "batch_size": 8, "metric": "latency", "unit": "seconds", "higher_is_better": false, "baseline": 0.6638397837368151, "optimized": 0.5149560342853268, "stated_speedup": null, "speedup": 1.2891}]
null
1.2891
vllm
a51376b3f05a2f74eac6ceeed7e52598b871a0fb
2026-05-11T07:10:50-07:00
40,392
https://github.com/vllm-project/vllm/pull/40392
[Performance][DSR1]: Fused RoPE+KVCache+q_concat for MLA (#40392)
[Performance][DSR1]: Fused RoPE+KVCache+q_concat for MLA (#40392) Signed-off-by: Rohan138 <rohanpotdar138@gmail.com> Signed-off-by: Rohan Potdar <66227218+Rohan138@users.noreply.github.com> Co-authored-by: ElizaWszola <ewszola@redhat.com>
csrc/cache_kernels_fused.cu
cuda
Apache-2.0
#include <torch/all.h> #include <ATen/cuda/CUDAContext.h> #include <c10/cuda/CUDAGuard.h> #include "cuda_compat.h" #include "dispatch_utils.h" #include "quantization/w8a8/fp8/common.cuh" #ifdef USE_ROCM #include "quantization/w8a8/fp8/amd/quant_utils.cuh" #else #include "quantization/w8a8/fp8/nvidia/quant_utils.c...
#include <torch/all.h> #include <ATen/cuda/CUDAContext.h> #include <c10/cuda/CUDAGuard.h> #include "cuda_compat.h" #include "dispatch_utils.h" #include "quantization/w8a8/fp8/common.cuh" #ifdef USE_ROCM #include "quantization/w8a8/fp8/amd/quant_utils.cuh" #else #include "quantization/w8a8/fp8/nvidia/quant_utils.c...
--- csrc/cache_kernels_fused.cu +++ csrc/cache_kernels_fused.cu @@ -21,28 +21,33 @@ // NOTE Be EXTRA careful with raw_kv_scalar_t, for __half and __nv_bfloat16 it's // using u16 as the backing type. -template <typename qk_t, bool IS_NEOX, typename raw_kv_scalar_t, - typename cache_t, Fp8KVCacheDataType kv_...
77
62
4
[ "deepseek" ]
[]
[]
Optimize this cuda kernel file from vllm (csrc/cache_kernels_fused.cu). Goal: [Performance][DSR1]: Fused RoPE+KVCache+q_concat for MLA Target hardware: unspecified Target models: deepseek Current file: ```cuda #include <torch/all.h> #include <ATen/cuda/CUDAContext.h> #include <c10/cuda/CUDAGuard.h> #include "cuda_co...
## Purpose Reland updated version of #35245 #35879 #38646, to fuse MLA RoPE and KV Cache ops. Adding some pattern matching fixes/minimization on top of #35879. ## Test Plan ``` # server startup vllm serve amd/DeepSeek-R1-0528-MXFP4 --tensor-parallel-size=8 --gpu-memory-utilization=0.94 --dtype=auto --kv-cache-dtype=fp...
[]
null
null
vllm
989c176c0a14e1adc5a9ba33cb5c3a39fceec3d3
2026-05-07T19:44:24-07:00
41,434
https://github.com/vllm-project/vllm/pull/41434
[Perf][3/n] Eliminate GPU<->CPU syncs in attention impls (#41434)
[Perf][3/n] Eliminate GPU<->CPU syncs in attention impls (#41434) Signed-off-by: Nick Hill <nickhill123@gmail.com>
vllm/v1/attention/backends/flashinfer.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Attention layer with FlashInfer.""" from dataclasses import dataclass from functools import partial from typing import ClassVar import numpy as np import torch from flashinfer import ( BatchDecodeWithPage...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Attention layer with FlashInfer.""" from dataclasses import dataclass from functools import partial from typing import ClassVar import numpy as np import torch from flashinfer import ( BatchDecodeWithPage...
--- vllm/v1/attention/backends/flashinfer.py +++ vllm/v1/attention/backends/flashinfer.py @@ -1105,7 +1105,8 @@ paged_kv_indptr_prefill_gpu = self.paged_kv_indptr.gpu[ prefill_start : num_reqs + 1 ] - paged_kv_indptr_prefill_gpu[0] = 0 + ...
2
1
7
[]
[ "CPU" ]
[]
Optimize this triton kernel file from vllm (vllm/v1/attention/backends/flashinfer.py). Goal: [Perf][3/n] Eliminate GPU<->CPU syncs in attention impls Target hardware: CPU Target models: unspecified Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vL...
Unnecessary gpu/cpu syncs in attention implementations, found via https://github.com/vllm-project/vllm/pull/40561. ### TurboQuant benchmark Each scenario runs vLLM with `--tensor-parallel-size 1 --distributed-executor-backend uni` (UniProcExecutor) on a single NVIDIA GB200 GPU. Model: `Qwen/Qwen3-0.6B`. Each side (wi...
[{"scope": "e2e", "hardware": "NVIDIA GB200", "model": "Qwen/Qwen3-0.6B", "shape": "c=32, 256 in / 2048 out", "batch_size": 384, "metric": "Output throughput", "unit": "tok/s", "higher_is_better": true, "baseline": 7441.51, "optimized": 7801.99, "stated_speedup": null, "speedup": 1.0484}, {"scope": "e2e", "hardware": "...
null
1.0484
vllm
bc635fad2389e228a31d6bc6e698caf53d395e13
2026-05-01T22:06:00+08:00
41,217
https://github.com/vllm-project/vllm/pull/41217
[ROCm][Deepseek] dsv3.2 further optimization (#41217)
[ROCm][Deepseek] dsv3.2 further optimization (#41217) Signed-off-by: ganyi <ygan@amd.com> Signed-off-by: Matthew Wong <Matthew.Wong2@amd.com> Co-authored-by: Matthew Wong <Matthew.Wong2@amd.com>
vllm/v1/attention/backends/mla/indexer.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from dataclasses import dataclass import torch import vllm.envs as envs from vllm.config import VllmConfig from vllm.logger import init_logger from vllm.platforms import current_platform from vllm.triton_utils i...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from dataclasses import dataclass import torch import vllm.envs as envs from vllm.config import VllmConfig from vllm.logger import init_logger from vllm.platforms import current_platform from vllm.triton_utils i...
--- vllm/v1/attention/backends/mla/indexer.py +++ vllm/v1/attention/backends/mla/indexer.py @@ -122,7 +122,7 @@ @staticmethod def get_supported_kernel_block_sizes() -> list[int | MultipleOf]: - return [1 if current_platform.is_rocm() else 64] + return [1, 64] if current_platform.is_rocm() else...
1
1
4
[ "deepseek" ]
[ "ROCM" ]
[]
Optimize this triton kernel file from vllm (vllm/v1/attention/backends/mla/indexer.py). Goal: [ROCm][Deepseek] dsv3.2 further optimization Target hardware: ROCM Target models: deepseek Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project fr...
## Purpose This PR will replace https://github.com/vllm-project/vllm/pull/32649. The main optimization include the following part: - shuffle indexer cache layout for kv cache update and fetch - rocm gluon version of ·paged_mqa_logits` integration - build ragged metadata for mla at metadata_builder instead of runti...
[]
null
null
vllm
bc635fad2389e228a31d6bc6e698caf53d395e13
2026-05-01T22:06:00+08:00
41,217
https://github.com/vllm-project/vllm/pull/41217
[ROCm][Deepseek] dsv3.2 further optimization (#41217)
[ROCm][Deepseek] dsv3.2 further optimization (#41217) Signed-off-by: ganyi <ygan@amd.com> Signed-off-by: Matthew Wong <Matthew.Wong2@amd.com> Co-authored-by: Matthew Wong <Matthew.Wong2@amd.com>
vllm/v1/attention/backends/mla/rocm_aiter_mla.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from dataclasses import dataclass from typing import ClassVar, Final import torch from vllm._aiter_ops import rocm_aiter_ops from vllm.config import VllmConfig from vllm.config.cache import CacheDType from vllm...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from dataclasses import dataclass from typing import ClassVar, Final import torch from vllm._aiter_ops import rocm_aiter_ops from vllm.config import VllmConfig from vllm.config.cache import CacheDType from vllm...
--- vllm/v1/attention/backends/mla/rocm_aiter_mla.py +++ vllm/v1/attention/backends/mla/rocm_aiter_mla.py @@ -396,6 +396,7 @@ """ _AITER_MIN_MLA_HEADS: Final = 16 + _AITER_UNSUPPORTED_HEADS = [32] @staticmethod def check_num_heads_validity(num_heads: int): @@ -419,6 +420,9 @@ @staticme...
4
0
4
[ "deepseek" ]
[ "ROCM" ]
[]
Optimize this triton kernel file from vllm (vllm/v1/attention/backends/mla/rocm_aiter_mla.py). Goal: [ROCm][Deepseek] dsv3.2 further optimization Target hardware: ROCM Target models: deepseek Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM pro...
## Purpose This PR will replace https://github.com/vllm-project/vllm/pull/32649. The main optimization include the following part: - shuffle indexer cache layout for kv cache update and fetch - rocm gluon version of ·paged_mqa_logits` integration - build ragged metadata for mla at metadata_builder instead of runti...
[]
null
null
vllm
bc635fad2389e228a31d6bc6e698caf53d395e13
2026-05-01T22:06:00+08:00
41,217
https://github.com/vllm-project/vllm/pull/41217
[ROCm][Deepseek] dsv3.2 further optimization (#41217)
[ROCm][Deepseek] dsv3.2 further optimization (#41217) Signed-off-by: ganyi <ygan@amd.com> Signed-off-by: Matthew Wong <Matthew.Wong2@amd.com> Co-authored-by: Matthew Wong <Matthew.Wong2@amd.com>
vllm/v1/attention/backends/mla/rocm_aiter_mla_sparse.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from dataclasses import dataclass from typing import TYPE_CHECKING, ClassVar import numpy as np import torch from vllm._aiter_ops import rocm_aiter_ops from vllm.config import VllmConfig from vllm.config.cache ...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from dataclasses import dataclass from typing import TYPE_CHECKING, ClassVar import numpy as np import torch from vllm import _custom_ops as ops from vllm._aiter_ops import rocm_aiter_ops from vllm.config impor...
--- vllm/v1/attention/backends/mla/rocm_aiter_mla_sparse.py +++ vllm/v1/attention/backends/mla/rocm_aiter_mla_sparse.py @@ -7,6 +7,7 @@ import numpy as np import torch +from vllm import _custom_ops as ops from vllm._aiter_ops import rocm_aiter_ops from vllm.config import VllmConfig from vllm.config.cache import ...
227
29
4
[ "deepseek" ]
[ "ROCM" ]
[]
Optimize this triton kernel file from vllm (vllm/v1/attention/backends/mla/rocm_aiter_mla_sparse.py). Goal: [ROCm][Deepseek] dsv3.2 further optimization Target hardware: ROCM Target models: deepseek Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the v...
## Purpose This PR will replace https://github.com/vllm-project/vllm/pull/32649. The main optimization include the following part: - shuffle indexer cache layout for kv cache update and fetch - rocm gluon version of ·paged_mqa_logits` integration - build ragged metadata for mla at metadata_builder instead of runti...
[]
null
null
vllm
bc635fad2389e228a31d6bc6e698caf53d395e13
2026-05-01T22:06:00+08:00
41,217
https://github.com/vllm-project/vllm/pull/41217
[ROCm][Deepseek] dsv3.2 further optimization (#41217)
[ROCm][Deepseek] dsv3.2 further optimization (#41217) Signed-off-by: ganyi <ygan@amd.com> Signed-off-by: Matthew Wong <Matthew.Wong2@amd.com> Co-authored-by: Matthew Wong <Matthew.Wong2@amd.com>
vllm/v1/attention/ops/rocm_aiter_mla_sparse.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import functools import importlib from importlib.util import find_spec import torch from vllm.forward_context import get_forward_context from vllm.platforms import current_platform from vllm.triton_utils import ...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import functools import importlib from importlib.util import find_spec import torch from vllm.forward_context import get_forward_context from vllm.platforms import current_platform from vllm.triton_utils import ...
--- vllm/v1/attention/ops/rocm_aiter_mla_sparse.py +++ vllm/v1/attention/ops/rocm_aiter_mla_sparse.py @@ -12,9 +12,6 @@ from vllm.utils.torch_utils import LayerNameType from vllm.v1.attention.backends.mla.indexer import DeepseekV32IndexerMetadata from vllm.v1.attention.ops.common import pack_seq_triton, unpack_seq_t...
23
20
4
[ "deepseek" ]
[ "ROCM" ]
[]
Optimize this triton kernel file from vllm (vllm/v1/attention/ops/rocm_aiter_mla_sparse.py). Goal: [ROCm][Deepseek] dsv3.2 further optimization Target hardware: ROCM Target models: deepseek Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM proje...
## Purpose This PR will replace https://github.com/vllm-project/vllm/pull/32649. The main optimization include the following part: - shuffle indexer cache layout for kv cache update and fetch - rocm gluon version of ·paged_mqa_logits` integration - build ragged metadata for mla at metadata_builder instead of runti...
[]
null
null
vllm
a3c83ff2fd050bc6392260d6e84ee1150f238f26
2026-04-30T21:09:55-04:00
41,326
https://github.com/vllm-project/vllm/pull/41326
Faster per-token fp8 group quant packed kernel for blackwell (#41326)
Faster per-token fp8 group quant packed kernel for blackwell (#41326) Signed-off-by: Yongye Zhu <zyy1102000@gmail.com> Co-authored-by: Roger Wang <hey@rogerw.io>
csrc/libtorch_stable/quantization/w8a8/fp8/per_token_group_quant.cu
cuda
Apache-2.0
#include <torch/csrc/stable/tensor.h> #include <torch/csrc/stable/ops.h> #include <torch/headeronly/util/Exception.h> #include <torch/headeronly/core/ScalarType.h> #include "libtorch_stable/quantization/w8a8/per_token_group_quant_8bit.h" #include <cmath> #include <cuda_fp8.h> #include "libtorch_stable/quantization/...
#include <torch/csrc/stable/tensor.h> #include <torch/csrc/stable/ops.h> #include <torch/headeronly/util/Exception.h> #include <torch/headeronly/core/ScalarType.h> #include "libtorch_stable/quantization/w8a8/per_token_group_quant_8bit.h" #include <cmath> #include <cuda_fp8.h> #include "libtorch_stable/quantization/...
--- csrc/libtorch_stable/quantization/w8a8/fp8/per_token_group_quant.cu +++ csrc/libtorch_stable/quantization/w8a8/fp8/per_token_group_quant.cu @@ -236,17 +236,41 @@ #undef LAUNCH_KERNEL } -template <typename T, typename DST_DTYPE> -__global__ void per_token_group_quant_8bit_packed_kernel( +// Register-resident fas...
180
90
2
[]
[ "BLACKWELL" ]
[]
Optimize this cuda kernel file from vllm (csrc/libtorch_stable/quantization/w8a8/fp8/per_token_group_quant.cu). Goal: Faster per-token fp8 group quant packed kernel for blackwell Target hardware: BLACKWELL Target models: unspecified Current file: ```cuda #include <torch/csrc/stable/tensor.h> #include <torch/csrc/stab...
## Purpose Better fp8 group quant packed kernel, deliver 60% - 2x to speed across batch size. ## Test Plan V4-Flash gsm8k score ## Test Result ``` |Tasks|Version| Filter |n-shot| Metric | |Value | |Stderr| |-----|------:|----------------|-----:|-----------|---|-----:|---|-----:| |gsm8k| 3|flex...
[]
null
null
vllm
a3c83ff2fd050bc6392260d6e84ee1150f238f26
2026-04-30T21:09:55-04:00
41,326
https://github.com/vllm-project/vllm/pull/41326
Faster per-token fp8 group quant packed kernel for blackwell (#41326)
Faster per-token fp8 group quant packed kernel for blackwell (#41326) Signed-off-by: Yongye Zhu <zyy1102000@gmail.com> Co-authored-by: Roger Wang <hey@rogerw.io>
csrc/libtorch_stable/quantization/w8a8/per_token_group_quant_8bit.h
cpp
Apache-2.0
#pragma once #include <torch/csrc/stable/tensor.h> // 8-bit per-token-group quantization helper used by both FP8 and INT8 void per_token_group_quant_8bit(const torch::stable::Tensor& input, torch::stable::Tensor& output_q, torch::stable::Tensor& output_s...
#pragma once #include <torch/csrc/stable/tensor.h> // 8-bit per-token-group quantization helper used by both FP8 and INT8 void per_token_group_quant_8bit(const torch::stable::Tensor& input, torch::stable::Tensor& output_q, torch::stable::Tensor& output_s...
--- csrc/libtorch_stable/quantization/w8a8/per_token_group_quant_8bit.h +++ csrc/libtorch_stable/quantization/w8a8/per_token_group_quant_8bit.h @@ -8,3 +8,13 @@ torch::stable::Tensor& output_s, int64_t group_size, double eps, double min_8bit, ...
10
0
2
[]
[ "BLACKWELL" ]
[]
Optimize this cpp kernel file from vllm (csrc/libtorch_stable/quantization/w8a8/per_token_group_quant_8bit.h). Goal: Faster per-token fp8 group quant packed kernel for blackwell Target hardware: BLACKWELL Target models: unspecified Current file: ```cpp #pragma once #include <torch/csrc/stable/tensor.h> // 8-bit per...
## Purpose Better fp8 group quant packed kernel, deliver 60% - 2x to speed across batch size. ## Test Plan V4-Flash gsm8k score ## Test Result ``` |Tasks|Version| Filter |n-shot| Metric | |Value | |Stderr| |-----|------:|----------------|-----:|-----------|---|-----:|---|-----:| |gsm8k| 3|flex...
[]
null
null
vllm
2f314bc5e6706bffe77933ae5b13756d04641ed8
2026-04-23T14:14:44+01:00
38,112
https://github.com/vllm-project/vllm/pull/38112
[CPU] Added faster exp routine for lower precision data types. (#38112)
[CPU] Added faster exp routine for lower precision data types. (#38112) Signed-off-by: Anna Mayne <anna.mayne@arm.com> Co-authored-by: Fadi Arafeh <fadi.arafeh@arm.com> Co-authored-by: Li, Jiang <jiang1.li@intel.com>
csrc/cpu/cpu_arch_macros.h
cpp
Apache-2.0
#ifndef CPU_ARCH_MACROS_H #define CPU_ARCH_MACROS_H // x86_64 #ifdef __x86_64__ #define FAST_SPINNING _mm_pause(); #ifdef __AVX512F__ #define DEFINE_FAST_EXP \ const __m512 vec_factorial_1 = _mm512_set1_ps(0.999999701f); \ const __m512...
#ifndef CPU_ARCH_MACROS_H #define CPU_ARCH_MACROS_H // x86_64 #ifdef __x86_64__ #define FAST_SPINNING _mm_pause(); #ifdef __AVX512F__ #define DEFINE_FAST_EXP \ const __m512 vec_factorial_1 = _mm512_set1_ps(0.999999701f); \ const __m512...
--- csrc/cpu/cpu_arch_macros.h +++ csrc/cpu/cpu_arch_macros.h @@ -61,8 +61,23 @@ #endif #ifdef __aarch64__ - // Implementation copied from Arm Optimized Routines (expf AdvSIMD) + // Implementation of neon_expf copied from Arm Optimized Routines (expf + // AdvSIMD) // https://github.com/ARM-software/optimized-...
48
2
2
[]
[ "CPU" ]
[]
Optimize this cpp kernel file from vllm (csrc/cpu/cpu_arch_macros.h). Goal: [CPU] Added faster exp routine for lower precision data types. Target hardware: CPU Target models: unspecified Current file: ```cpp #ifndef CPU_ARCH_MACROS_H #define CPU_ARCH_MACROS_H // x86_64 #ifdef __x86_64__ #define FAST_SPINNING _mm_p...
## Purpose Add a faster exp routine for lower precision dtypes on NEON hardware. Observed a 3-4% speedup on neoverse V1. ## Test Plan Run `LD_PRELOAD="/usr/lib/aarch64-linux-gnu/libtcmalloc_minimal.so.4:/usr/lib/aarch64-linux-gnu/libgomp.so.1" taskset -c 20-27 python benchmark_attention_minimal.py` Where benchmar...
[{"scope": "kernel", "hardware": "neoverse V1", "model": null, "shape": "seq_len=512, batch_size=64, num_heads=(32,8), head_size=128, dtype=bfloat16", "batch_size": 64, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 1.04, "optimized": 1.0, "stated_speedup": 1.03, "speedup": 1.04}]
1.04
null
vllm
2f314bc5e6706bffe77933ae5b13756d04641ed8
2026-04-23T14:14:44+01:00
38,112
https://github.com/vllm-project/vllm/pull/38112
[CPU] Added faster exp routine for lower precision data types. (#38112)
[CPU] Added faster exp routine for lower precision data types. (#38112) Signed-off-by: Anna Mayne <anna.mayne@arm.com> Co-authored-by: Fadi Arafeh <fadi.arafeh@arm.com> Co-authored-by: Li, Jiang <jiang1.li@intel.com>
csrc/cpu/cpu_attn_impl.hpp
cpp
Apache-2.0
#ifndef CPU_ATTN_HPP #define CPU_ATTN_HPP #include <type_traits> #include <cstddef> #if defined(__APPLE__) #include <sys/sysctl.h> #endif #include "cpu/cpu_arch_macros.h" #include "cpu/utils.hpp" namespace cpu_attention { enum class ISA { AMX, VEC, VEC16, NEON, VXE }; template <ISA isa, typename scalar_t, int64_...
#ifndef CPU_ATTN_HPP #define CPU_ATTN_HPP #include <type_traits> #include <cstddef> #if defined(__APPLE__) #include <sys/sysctl.h> #endif #include "cpu/cpu_arch_macros.h" #include "cpu/utils.hpp" namespace cpu_attention { enum class ISA { AMX, VEC, VEC16, NEON, VXE }; template <ISA isa, typename scalar_t, int64_...
--- csrc/cpu/cpu_attn_impl.hpp +++ csrc/cpu/cpu_attn_impl.hpp @@ -1152,7 +1152,11 @@ bool use_sink) { #ifdef DEFINE_FAST_EXP DEFINE_FAST_EXP + bool constexpr IsReducedPrecision = + std::is_same_v<query_t, c10::BFloat16> || + std::is_same_v<query_t, c10::Half>; #en...
28
4
2
[]
[ "CPU" ]
[]
Optimize this cpp kernel file from vllm (csrc/cpu/cpu_attn_impl.hpp). Goal: [CPU] Added faster exp routine for lower precision data types. Target hardware: CPU Target models: unspecified Current file: ```cpp #ifndef CPU_ATTN_HPP #define CPU_ATTN_HPP #include <type_traits> #include <cstddef> #if defined(__APPLE__) ...
## Purpose Add a faster exp routine for lower precision dtypes on NEON hardware. Observed a 3-4% speedup on neoverse V1. ## Test Plan Run `LD_PRELOAD="/usr/lib/aarch64-linux-gnu/libtcmalloc_minimal.so.4:/usr/lib/aarch64-linux-gnu/libgomp.so.1" taskset -c 20-27 python benchmark_attention_minimal.py` Where benchmar...
[{"scope": "kernel", "hardware": "neoverse V1", "model": null, "shape": "seq_len=512, batch_size=64, num_heads=(32,8), head_size=128, dtype=bfloat16", "batch_size": 64, "metric": "latency", "unit": "ms", "higher_is_better": false, "baseline": 1.04, "optimized": 1.0, "stated_speedup": 1.03, "speedup": 1.04}]
1.04
null
vllm
257015d5e50029e8ebcbce4fe0c83f43b531552e
2026-04-20T23:37:11-07:00
39,016
https://github.com/vllm-project/vllm/pull/39016
[MoE] Triton MoE Perf regression - restore low latency path (#39016)
[MoE] Triton MoE Perf regression - restore low latency path (#39016)
vllm/model_executor/layers/fused_moe/fused_moe.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Fused MoE Triton kernels.""" import functools import json import os from collections.abc import Callable from typing import Any import torch import vllm.envs as envs import vllm.model_executor.layers.fused_m...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Fused MoE Triton kernels.""" import functools import json import os from collections.abc import Callable from typing import Any import torch import vllm.envs as envs import vllm.model_executor.layers.fused_m...
--- vllm/model_executor/layers/fused_moe/fused_moe.py +++ vllm/model_executor/layers/fused_moe/fused_moe.py @@ -1551,6 +1551,55 @@ return torch_vllm_outplace_fused_experts +def _prepare_expert_assignment( + topk_ids: torch.Tensor, + config: dict[str, Any], + num_tokens: int, + top_k_num: int, + ...
73
32
1
[]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/fused_moe/fused_moe.py). Goal: [MoE] Triton MoE Perf regression - restore low latency path Target hardware: unspecified Target models: unspecified Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright co...
The refactor in https://github.com/vllm-project/vllm/pull/36286 made it so that the unquantized MoE path taken now bypasses the low-latency optimization introduced in https://github.com/vllm-project/vllm/pull/29354. FP8 regression was also introduced by https://github.com/vllm-project/vllm/pull/30825. This PR re-intro...
[{"scope": "e2e", "hardware": "B200", "model": "nemotron nano 3", "shape": "ISL50 OSL1000", "batch_size": 1, "metric": "throughput", "unit": "tok/s", "higher_is_better": true, "baseline": 250.42, "optimized": 258.02, "stated_speedup": 1.0303, "speedup": 1.0303}, {"scope": "e2e", "hardware": "B200", "model": "nemotron n...
null
1.0369
vllm
bf9a5ddb24af910f53e7d20305045010d7471072
2026-04-16T16:27:51-07:00
39,458
https://github.com/vllm-project/vllm/pull/39458
[MLA] Optimize mla indexer prepare uniform decode for MTP > 1 (#39458)
[MLA] Optimize mla indexer prepare uniform decode for MTP > 1 (#39458) Signed-off-by: Giancarlo Delfin <gdelfin@inferact.ai>
vllm/v1/attention/backends/mla/indexer.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from dataclasses import dataclass import torch import vllm.envs as envs from vllm.config import VllmConfig from vllm.logger import init_logger from vllm.platforms import current_platform from vllm.utils.deep_gem...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from dataclasses import dataclass import torch import vllm.envs as envs from vllm.config import VllmConfig from vllm.logger import init_logger from vllm.platforms import current_platform from vllm.triton_utils i...
--- vllm/v1/attention/backends/mla/indexer.py +++ vllm/v1/attention/backends/mla/indexer.py @@ -8,6 +8,7 @@ from vllm.config import VllmConfig from vllm.logger import init_logger from vllm.platforms import current_platform +from vllm.triton_utils import tl, triton from vllm.utils.deep_gemm import ( get_paged_m...
102
45
1
[]
[]
[]
Optimize this triton kernel file from vllm (vllm/v1/attention/backends/mla/indexer.py). Goal: [MLA] Optimize mla indexer prepare uniform decode for MTP > 1 Target hardware: unspecified Target models: unspecified Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contribu...
# Purpose While profiling DeepSeek-V3.2 + NVFP4 with MTP > 1 speculative decoding, I noticed that `_prepare_decode_tensors` in `vllm/v1/attention/backends/mla/indexer.py` was adding per-step overhead from pytorch ops like `repeat_interleave`. This function is called once per decode step to build MLA attention metadata,...
[{"scope": "e2e", "hardware": "B300", "model": "DeepSeek-V3.2-NVFP4", "shape": "input=256", "batch_size": 1, "metric": "ITL", "unit": "ms", "higher_is_better": false, "baseline": 12.72, "optimized": 12.67, "stated_speedup": null, "speedup": 1.0039}, {"scope": "e2e", "hardware": "B300", "model": "DeepSeek-V3.2-NVFP4", "...
null
1.0051
vllm
445b7093fdbbc6c52875d2deef28df1d5da56089
2026-04-16T07:26:17+02:00
37,469
https://github.com/vllm-project/vllm/pull/37469
[perf][cpu] Accelerate BF16 GELU with LUT impl on Arm CPUs (#37469)
[perf][cpu] Accelerate BF16 GELU with LUT impl on Arm CPUs (#37469) Signed-off-by: Fadi Arafeh <fadi.arafeh@arm.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
csrc/cpu/torch_bindings.cpp
cpp
Apache-2.0
#include "cache.h" #include "ops.h" #include "core/registration.h" #include <torch/library.h> // Note: overwrite the external definition for sharing same name between // libraries use different ISAs. #define TORCH_EXTENSION_NAME _C void release_dnnl_matmul_handler(int64_t handler); int64_t create_onednn_scaled_mm_h...
#include "cache.h" #include "ops.h" #include "core/registration.h" #include <torch/library.h> // Note: overwrite the external definition for sharing same name between // libraries use different ISAs. #define TORCH_EXTENSION_NAME _C void release_dnnl_matmul_handler(int64_t handler); int64_t create_onednn_scaled_mm_h...
--- csrc/cpu/torch_bindings.cpp +++ csrc/cpu/torch_bindings.cpp @@ -84,6 +84,9 @@ at::Tensor int4_scaled_mm_cpu(at::Tensor& x, at::Tensor& w, at::Tensor& w_zeros, at::Tensor& w_scales, std::optional<at::Tensor> bias); + +void activation_lut_bf16(torch::Tens...
12
0
3
[]
[ "CPU" ]
[]
Optimize this cpp kernel file from vllm (csrc/cpu/torch_bindings.cpp). Goal: [perf][cpu] Accelerate BF16 GELU with LUT impl on Arm CPUs Target hardware: CPU Target models: unspecified Current file: ```cpp #include "cache.h" #include "ops.h" #include "core/registration.h" #include <torch/library.h> // Note: overwrit...
[perf][cpu] Accelerate BF16 GELU with LUT impl on Arm CPUs ## Purpose We noticed that PyTorch's GELU can take ~ 5% of quantized Whisper runtime, which is way too much for a non-GEMM op. This PR introduces a Look Up Table (LUT) based implementation for BF16 GELU on Arm CPUs It accelerates GELU by up to 8x compared to ...
[{"scope": "kernel", "hardware": "Arm CPUs", "model": null, "shape": null, "batch_size": null, "metric": "performance", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 8.0, "speedup": 8.0}, {"scope": "e2e", "hardware": "Arm CPUs", "model": "quantized Whisper", "shape": nul...
8
1.05
vllm
445b7093fdbbc6c52875d2deef28df1d5da56089
2026-04-16T07:26:17+02:00
37,469
https://github.com/vllm-project/vllm/pull/37469
[perf][cpu] Accelerate BF16 GELU with LUT impl on Arm CPUs (#37469)
[perf][cpu] Accelerate BF16 GELU with LUT impl on Arm CPUs (#37469) Signed-off-by: Fadi Arafeh <fadi.arafeh@arm.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
csrc/ops.h
cpp
Apache-2.0
#pragma once #include <optional> #include <torch/library.h> #include <tuple> #include "core/scalar_type.hpp" #include <vector> torch::Tensor weak_ref_tensor(torch::Tensor& tensor) { // Ensure tensor is on CUDA if (!tensor.is_cuda()) { throw std::runtime_error("Tensor must be on CUDA device"); } // Get ...
#pragma once #include <optional> #include <string> #include <torch/library.h> #include <tuple> #include "core/scalar_type.hpp" #include <vector> torch::Tensor weak_ref_tensor(torch::Tensor& tensor) { // Ensure tensor is on CUDA if (!tensor.is_cuda()) { throw std::runtime_error("Tensor must be on CUDA device...
--- csrc/ops.h +++ csrc/ops.h @@ -1,6 +1,7 @@ #pragma once #include <optional> +#include <string> #include <torch/library.h> #include <tuple>
1
0
3
[]
[ "CPU" ]
[]
Optimize this cpp kernel file from vllm (csrc/ops.h). Goal: [perf][cpu] Accelerate BF16 GELU with LUT impl on Arm CPUs Target hardware: CPU Target models: unspecified Current file: ```cpp #pragma once #include <optional> #include <torch/library.h> #include <tuple> #include "core/scalar_type.hpp" #include <vector> ...
[perf][cpu] Accelerate BF16 GELU with LUT impl on Arm CPUs ## Purpose We noticed that PyTorch's GELU can take ~ 5% of quantized Whisper runtime, which is way too much for a non-GEMM op. This PR introduces a Look Up Table (LUT) based implementation for BF16 GELU on Arm CPUs It accelerates GELU by up to 8x compared to ...
[{"scope": "kernel", "hardware": "Arm CPUs", "model": null, "shape": null, "batch_size": null, "metric": "performance", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 8.0, "speedup": 8.0}, {"scope": "e2e", "hardware": "Arm CPUs", "model": "quantized Whisper", "shape": nul...
8
1.05
vllm
445b7093fdbbc6c52875d2deef28df1d5da56089
2026-04-16T07:26:17+02:00
37,469
https://github.com/vllm-project/vllm/pull/37469
[perf][cpu] Accelerate BF16 GELU with LUT impl on Arm CPUs (#37469)
[perf][cpu] Accelerate BF16 GELU with LUT impl on Arm CPUs (#37469) Signed-off-by: Fadi Arafeh <fadi.arafeh@arm.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
vllm/model_executor/layers/activation.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Custom activation functions.""" import math import torch import torch.nn as nn import torch.nn.functional as F from vllm.distributed import ( divide, get_tensor_model_parallel_rank, get_tensor_mo...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Custom activation functions.""" import math import torch import torch.nn as nn import torch.nn.functional as F from vllm.distributed import ( divide, get_tensor_model_parallel_rank, get_tensor_mo...
--- vllm/model_executor/layers/activation.py +++ vllm/model_executor/layers/activation.py @@ -16,7 +16,7 @@ from vllm.logger import init_logger from vllm.model_executor.custom_op import CustomOp from vllm.model_executor.utils import set_weight_attrs -from vllm.platforms import current_platform +from vllm.platforms i...
30
2
3
[]
[ "CPU" ]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/activation.py). Goal: [perf][cpu] Accelerate BF16 GELU with LUT impl on Arm CPUs Target hardware: CPU Target models: unspecified Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the ...
[perf][cpu] Accelerate BF16 GELU with LUT impl on Arm CPUs ## Purpose We noticed that PyTorch's GELU can take ~ 5% of quantized Whisper runtime, which is way too much for a non-GEMM op. This PR introduces a Look Up Table (LUT) based implementation for BF16 GELU on Arm CPUs It accelerates GELU by up to 8x compared to ...
[{"scope": "kernel", "hardware": "Arm CPUs", "model": null, "shape": null, "batch_size": null, "metric": "performance", "unit": null, "higher_is_better": true, "baseline": null, "optimized": null, "stated_speedup": 8.0, "speedup": 8.0}, {"scope": "e2e", "hardware": "Arm CPUs", "model": "quantized Whisper", "shape": nul...
8
1.05
vllm
4beeb0689cb6d86c5dbc6a8688a468892196b540
2026-04-13T10:58:37+08:00
37,376
https://github.com/vllm-project/vllm/pull/37376
fused qknorm+rope kernel optimization for SM9.0 (#37376)
fused qknorm+rope kernel optimization for SM9.0 (#37376) Signed-off-by: EricccYang <yangyang4991@gmail.com> Signed-off-by: Kaicheng Yang <53411596+EricccYang@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
csrc/fused_qknorm_rope_kernel.cu
cuda
Apache-2.0
/* * Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requi...
/* * Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requi...
--- csrc/fused_qknorm_rope_kernel.cu +++ csrc/fused_qknorm_rope_kernel.cu @@ -19,8 +19,10 @@ #include <type_traits> #include <torch/cuda.h> +#include <ATen/cuda/CUDAContext.h> #include <c10/cuda/CUDAGuard.h> +#include "async_util.cuh" #include "cuda_compat.h" #include "dispatch_utils.h" #include "type_convert...
387
8
3
[]
[]
[]
Optimize this cuda kernel file from vllm (csrc/fused_qknorm_rope_kernel.cu). Goal: fused qknorm+rope kernel optimization for SM9.0 Target hardware: unspecified Target models: unspecified Current file: ```cuda /* * Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved. * * Licensed under the Apache License, ...
## Purpose The qknorm+rope fused kernel performs worse than the unfused Triton kernel on H100. The main reason is that the 1-head per warp pattern does not perform well with large token batches. This PR improves the qknorm+rope kernel by dynamically adjusting the workload per warp based on the number of tokens in the ...
[]
null
null
vllm
4beeb0689cb6d86c5dbc6a8688a468892196b540
2026-04-13T10:58:37+08:00
37,376
https://github.com/vllm-project/vllm/pull/37376
fused qknorm+rope kernel optimization for SM9.0 (#37376)
fused qknorm+rope kernel optimization for SM9.0 (#37376) Signed-off-by: EricccYang <yangyang4991@gmail.com> Signed-off-by: Kaicheng Yang <53411596+EricccYang@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
csrc/ops.h
cpp
Apache-2.0
#pragma once #include <optional> #include <torch/library.h> #include <tuple> #include "core/scalar_type.hpp" #include <vector> torch::Tensor weak_ref_tensor(torch::Tensor& tensor) { // Ensure tensor is on CUDA if (!tensor.is_cuda()) { throw std::runtime_error("Tensor must be on CUDA device"); } // Get ...
#pragma once #include <optional> #include <torch/library.h> #include <tuple> #include "core/scalar_type.hpp" #include <vector> torch::Tensor weak_ref_tensor(torch::Tensor& tensor) { // Ensure tensor is on CUDA if (!tensor.is_cuda()) { throw std::runtime_error("Tensor must be on CUDA device"); } // Get ...
--- csrc/ops.h +++ csrc/ops.h @@ -96,7 +96,8 @@ int64_t num_heads_k, int64_t num_heads_v, int64_t head_dim, double eps, torch::Tensor& q_weight, torch::Tensor& k_weight, torch::Tensor& cos_sin_cache, - bool is_neox, torch:...
2
1
3
[]
[]
[]
Optimize this cpp kernel file from vllm (csrc/ops.h). Goal: fused qknorm+rope kernel optimization for SM9.0 Target hardware: unspecified Target models: unspecified Current file: ```cpp #pragma once #include <optional> #include <torch/library.h> #include <tuple> #include "core/scalar_type.hpp" #include <vector> to...
## Purpose The qknorm+rope fused kernel performs worse than the unfused Triton kernel on H100. The main reason is that the 1-head per warp pattern does not perform well with large token batches. This PR improves the qknorm+rope kernel by dynamically adjusting the workload per warp based on the number of tokens in the ...
[]
null
null
vllm
4beeb0689cb6d86c5dbc6a8688a468892196b540
2026-04-13T10:58:37+08:00
37,376
https://github.com/vllm-project/vllm/pull/37376
fused qknorm+rope kernel optimization for SM9.0 (#37376)
fused qknorm+rope kernel optimization for SM9.0 (#37376) Signed-off-by: EricccYang <yangyang4991@gmail.com> Signed-off-by: Kaicheng Yang <53411596+EricccYang@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
csrc/torch_bindings.cpp
cpp
Apache-2.0
#include "cache.h" #include "cuda_utils.h" #include "ops.h" #include "core/registration.h" #include <torch/library.h> #include <torch/version.h> // Note on op signatures: // The X_meta signatures are for the meta functions corresponding to op X. // They must be kept in sync with the signature for X. Generally, only //...
#include "cache.h" #include "cuda_utils.h" #include "ops.h" #include "core/registration.h" #include <torch/library.h> #include <torch/version.h> // Note on op signatures: // The X_meta signatures are for the meta functions corresponding to op X. // They must be kept in sync with the signature for X. Generally, only //...
--- csrc/torch_bindings.cpp +++ csrc/torch_bindings.cpp @@ -173,7 +173,8 @@ "fused_qk_norm_rope(Tensor! qkv, int num_heads_q, " "int num_heads_k, int num_heads_v, int head_dim, float eps, " "Tensor q_weight, Tensor k_weight, Tensor cos_sin_cache, " - "bool is_neox, Tensor position_ids) -> ()")...
2
1
3
[]
[]
[]
Optimize this cpp kernel file from vllm (csrc/torch_bindings.cpp). Goal: fused qknorm+rope kernel optimization for SM9.0 Target hardware: unspecified Target models: unspecified Current file: ```cpp #include "cache.h" #include "cuda_utils.h" #include "ops.h" #include "core/registration.h" #include <torch/library.h> #i...
## Purpose The qknorm+rope fused kernel performs worse than the unfused Triton kernel on H100. The main reason is that the 1-head per warp pattern does not perform well with large token batches. This PR improves the qknorm+rope kernel by dynamically adjusting the workload per warp based on the number of tokens in the ...
[]
null
null
vllm
59b2f7b64007c6eae7d8ec82cbf1f33500d1ad2d
2026-04-11T10:16:51-04:00
39,547
https://github.com/vllm-project/vllm/pull/39547
[Perf] Fuse Zero Initializer for FP8 DeepGemm Block Quant Kernel (#39547)
[Perf] Fuse Zero Initializer for FP8 DeepGemm Block Quant Kernel (#39547) Signed-off-by: wzhao18 <wzhao18.sz@gmail.com>
csrc/libtorch_stable/quantization/w8a8/fp8/per_token_group_quant.cu
cuda
Apache-2.0
#include <torch/csrc/stable/tensor.h> #include <torch/csrc/stable/ops.h> #include <torch/headeronly/util/Exception.h> #include <torch/headeronly/core/ScalarType.h> #include "libtorch_stable/quantization/w8a8/per_token_group_quant_8bit.h" #include <cmath> #include <cuda_fp8.h> #include "libtorch_stable/quantization/...
#include <torch/csrc/stable/tensor.h> #include <torch/csrc/stable/ops.h> #include <torch/headeronly/util/Exception.h> #include <torch/headeronly/core/ScalarType.h> #include "libtorch_stable/quantization/w8a8/per_token_group_quant_8bit.h" #include <cmath> #include <cuda_fp8.h> #include "libtorch_stable/quantization/...
--- csrc/libtorch_stable/quantization/w8a8/fp8/per_token_group_quant.cu +++ csrc/libtorch_stable/quantization/w8a8/fp8/per_token_group_quant.cu @@ -240,8 +240,9 @@ __global__ void per_token_group_quant_8bit_packed_kernel( const T* __restrict__ input, void* __restrict__ output_q, unsigned int* __restrict__ ou...
73
52
1
[]
[]
[]
Optimize this cuda kernel file from vllm (csrc/libtorch_stable/quantization/w8a8/fp8/per_token_group_quant.cu). Goal: [Perf] Fuse Zero Initializer for FP8 DeepGemm Block Quant Kernel Target hardware: unspecified Target models: unspecified Current file: ```cuda #include <torch/csrc/stable/tensor.h> #include <torch/csr...
## Purpose Currently, `per_token_group_quant_fp8_packed_for_deepgemm` requires calling `torch::stable::zero_(output_s_packed)` to initialize the scale buffer before the quant kernel. <img width="699" height="258" alt="Screenshot 2026-04-10 at 6 12 58 PM" src="https://github.com/user-attachments/assets/7b6102da-2d1c-470...
[{"scope": "e2e", "hardware": null, "model": "MiniMax-M2.5", "shape": "1K/1K", "batch_size": 128, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 240, "optimized": 237.6, "stated_speedup": 1.01, "speedup": 1.0101}]
null
1.0101
vllm
f976e3b98ba45677a2213673a442c6cbff141e8e
2026-04-10T13:27:35+02:00
37,539
https://github.com/vllm-project/vllm/pull/37539
[Performance] Remove unnecessary zero-fill of MLA decode output tensor in Aiter backend (#37539)
[Performance] Remove unnecessary zero-fill of MLA decode output tensor in Aiter backend (#37539) Signed-off-by: xaguilar-amd <xaguilar@amd.com>
vllm/v1/attention/backends/mla/rocm_aiter_mla.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from dataclasses import dataclass from typing import ClassVar import torch from vllm._aiter_ops import rocm_aiter_ops from vllm.config import VllmConfig from vllm.config.cache import CacheDType from vllm.model_...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from dataclasses import dataclass from typing import ClassVar import torch from vllm._aiter_ops import rocm_aiter_ops from vllm.config import VllmConfig from vllm.config.cache import CacheDType from vllm.model_...
--- vllm/v1/attention/backends/mla/rocm_aiter_mla.py +++ vllm/v1/attention/backends/mla/rocm_aiter_mla.py @@ -416,7 +416,7 @@ else: kernel_num_heads = self.num_heads - o = torch.zeros( + o = torch.empty( B, kernel_num_heads, self.kv_lora_rank,
1
1
1
[]
[]
[]
Optimize this triton kernel file from vllm (vllm/v1/attention/backends/mla/rocm_aiter_mla.py). Goal: [Performance] Remove unnecessary zero-fill of MLA decode output tensor in Aiter backend Target hardware: unspecified Target models: unspecified Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-File...
## Problem During the MLA decode phase on ROCm with the Aiter backend, a vectorized_elementwise GPU kernel is launched to zero-fill the output tensor before the MLA kernel overwrites it entirely. This adds unnecessary kernel launch latency on the critical decode path. ## Root In `rocm_aiter_mla.py`, the output tens...
[]
null
null
vllm
b55d830ec782b47f89c8457ba453f521fa092660
2026-04-08T19:35:57+02:00
37,421
https://github.com/vllm-project/vllm/pull/37421
[Perf][Kernel] Persistent TopK scheduler: unified CUDAGraph-safe kernel with dynamic per-row dispatch - DeepSeek-V3.2 DSA decode (#37421)
[Perf][Kernel] Persistent TopK scheduler: unified CUDAGraph-safe kernel with dynamic per-row dispatch - DeepSeek-V3.2 DSA decode (#37421) Signed-off-by: LopezCastroRoberto <rocastro@redhat.com> Signed-off-by: Roberto L. Castro <38211239+LopezCastroRoberto@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <no...
csrc/ops.h
cpp
Apache-2.0
#pragma once #include <optional> #include <torch/library.h> #include <tuple> #include "core/scalar_type.hpp" #include <vector> torch::Tensor weak_ref_tensor(torch::Tensor& tensor) { // Ensure tensor is on CUDA if (!tensor.is_cuda()) { throw std::runtime_error("Tensor must be on CUDA device"); } // Get ...
#pragma once #include <optional> #include <torch/library.h> #include <tuple> #include "core/scalar_type.hpp" #include <vector> torch::Tensor weak_ref_tensor(torch::Tensor& tensor) { // Ensure tensor is on CUDA if (!tensor.is_cuda()) { throw std::runtime_error("Tensor must be on CUDA device"); } // Get ...
--- csrc/ops.h +++ csrc/ops.h @@ -114,9 +114,9 @@ int64_t numRows, int64_t stride0, int64_t stride1, int64_t topK); -void large_context_topk(const torch::Tensor& score, torch::Tensor& indices, - const torch::Tensor& lengths, - ...
3
3
5
[ "deepseek" ]
[]
[]
Optimize this cpp kernel file from vllm (csrc/ops.h). Goal: [Perf][Kernel] Persistent TopK scheduler: unified CUDAGraph-safe kernel with dynamic per-row dispatch - DeepSeek-V3.2 DSA decode Target hardware: unspecified Target models: deepseek Current file: ```cpp #pragma once #include <optional> #include <torch/libra...
## Summary Redesigns the persistent TopK kernel used by DSA as a true persistent scheduler with dynamic per-row path selection. This supersedes and closes #34265, which took a CUDAGraph-specialization approach. Instead, this PR follows a persistent scheduler pattern where a single fixed-grid kernel dynamically di...
[{"scope": "kernel", "hardware": null, "model": "DeepSeek-V3.2", "shape": "seq_len=4096", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 6.49, "optimized": 5.08, "stated_speedup": 1.28, "speedup": 1.2776}, {"scope": "kernel", "hardware": null, "model": "DeepSeek-V3.2", "shape...
1.0014
1.1685
vllm
b55d830ec782b47f89c8457ba453f521fa092660
2026-04-08T19:35:57+02:00
37,421
https://github.com/vllm-project/vllm/pull/37421
[Perf][Kernel] Persistent TopK scheduler: unified CUDAGraph-safe kernel with dynamic per-row dispatch - DeepSeek-V3.2 DSA decode (#37421)
[Perf][Kernel] Persistent TopK scheduler: unified CUDAGraph-safe kernel with dynamic per-row dispatch - DeepSeek-V3.2 DSA decode (#37421) Signed-off-by: LopezCastroRoberto <rocastro@redhat.com> Signed-off-by: Roberto L. Castro <38211239+LopezCastroRoberto@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <no...
csrc/topk.cu
cuda
Apache-2.0
// Portions of this file are adapted from SGLang PR: // https://github.com/sgl-project/sglang/pull/11194 // and // https://github.com/sgl-project/sglang/pull/17747 #include "cuda_compat.h" #include "dispatch_utils.h" #include <torch/cuda.h> #include <c10/cuda/CUDAGuard.h> #ifndef USE_ROCM #include <cub/cub.cuh> #e...
// Persistent TopK kernel for DeepSeek V3 sparse attention indexer. // See persistent_topk.cuh for kernel implementation. #include <torch/all.h> #include <ATen/cuda/CUDAContext.h> #include <cuda_runtime.h> #include <algorithm> #ifndef USE_ROCM #include "persistent_topk.cuh" #endif void persistent_topk(const torch:...
--- csrc/topk.cu +++ csrc/topk.cu @@ -1,373 +1,154 @@ -// Portions of this file are adapted from SGLang PR: -// https://github.com/sgl-project/sglang/pull/11194 -// and -// https://github.com/sgl-project/sglang/pull/17747 +// Persistent TopK kernel for DeepSeek V3 sparse attention indexer. +// See persistent_topk.cuh f...
135
354
5
[ "deepseek" ]
[]
[]
Optimize this cuda kernel file from vllm (csrc/topk.cu). Goal: [Perf][Kernel] Persistent TopK scheduler: unified CUDAGraph-safe kernel with dynamic per-row dispatch - DeepSeek-V3.2 DSA decode Target hardware: unspecified Target models: deepseek Current file: ```cuda // Portions of this file are adapted from SGLang PR...
## Summary Redesigns the persistent TopK kernel used by DSA as a true persistent scheduler with dynamic per-row path selection. This supersedes and closes #34265, which took a CUDAGraph-specialization approach. Instead, this PR follows a persistent scheduler pattern where a single fixed-grid kernel dynamically di...
[{"scope": "kernel", "hardware": null, "model": "DeepSeek-V3.2", "shape": "seq_len=4096", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 6.49, "optimized": 5.08, "stated_speedup": 1.28, "speedup": 1.2776}, {"scope": "kernel", "hardware": null, "model": "DeepSeek-V3.2", "shape...
1.0014
1.1685
vllm
b55d830ec782b47f89c8457ba453f521fa092660
2026-04-08T19:35:57+02:00
37,421
https://github.com/vllm-project/vllm/pull/37421
[Perf][Kernel] Persistent TopK scheduler: unified CUDAGraph-safe kernel with dynamic per-row dispatch - DeepSeek-V3.2 DSA decode (#37421)
[Perf][Kernel] Persistent TopK scheduler: unified CUDAGraph-safe kernel with dynamic per-row dispatch - DeepSeek-V3.2 DSA decode (#37421) Signed-off-by: LopezCastroRoberto <rocastro@redhat.com> Signed-off-by: Roberto L. Castro <38211239+LopezCastroRoberto@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <no...
csrc/torch_bindings.cpp
cpp
Apache-2.0
#include "cache.h" #include "cuda_utils.h" #include "ops.h" #include "core/registration.h" #include <torch/library.h> #include <torch/version.h> // Note on op signatures: // The X_meta signatures are for the meta functions corresponding to op X. // They must be kept in sync with the signature for X. Generally, only //...
#include "cache.h" #include "cuda_utils.h" #include "ops.h" #include "core/registration.h" #include <torch/library.h> #include <torch/version.h> // Note on op signatures: // The X_meta signatures are for the meta functions corresponding to op X. // They must be kept in sync with the signature for X. Generally, only //...
--- csrc/torch_bindings.cpp +++ csrc/torch_bindings.cpp @@ -197,10 +197,9 @@ ops.impl("top_k_per_row_decode", torch::kCUDA, &top_k_per_row_decode); ops.def( - "large_context_topk(Tensor score, Tensor indices, Tensor lengths, " - "Tensor? " - "row_starts_opt) -> ()"); - ops.impl("large_context_to...
3
4
5
[ "deepseek" ]
[]
[]
Optimize this cpp kernel file from vllm (csrc/torch_bindings.cpp). Goal: [Perf][Kernel] Persistent TopK scheduler: unified CUDAGraph-safe kernel with dynamic per-row dispatch - DeepSeek-V3.2 DSA decode Target hardware: unspecified Target models: deepseek Current file: ```cpp #include "cache.h" #include "cuda_utils.h"...
## Summary Redesigns the persistent TopK kernel used by DSA as a true persistent scheduler with dynamic per-row path selection. This supersedes and closes #34265, which took a CUDAGraph-specialization approach. Instead, this PR follows a persistent scheduler pattern where a single fixed-grid kernel dynamically di...
[{"scope": "kernel", "hardware": null, "model": "DeepSeek-V3.2", "shape": "seq_len=4096", "batch_size": 1, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 6.49, "optimized": 5.08, "stated_speedup": 1.28, "speedup": 1.2776}, {"scope": "kernel", "hardware": null, "model": "DeepSeek-V3.2", "shape...
1.0014
1.1685
vllm
4a06e1246e30214d644a1732d6853cfe2b935a75
2026-04-03T06:13:23+03:00
38,460
https://github.com/vllm-project/vllm/pull/38460
[Perf] Batch KV cache swap copies via cuMemcpyBatchAsync (#38460)
[Perf] Batch KV cache swap copies via cuMemcpyBatchAsync (#38460) Signed-off-by: Itay Etelis <itay.etelis@ibm.com> Co-authored-by: Itay Etelis <itay.etelis@ibm.com> Co-authored-by: Or Ozeri <oro@il.ibm.com>
csrc/cache.h
cpp
Apache-2.0
#pragma once #include <torch/all.h> #include <c10/util/Optional.h> #include <map> #include <vector> void swap_blocks(torch::Tensor& src, torch::Tensor& dst, int64_t block_size_in_bytes, const torch::Tensor& block_mapping); void reshape_and_cache(torch::Tensor& key, torch::Tensor& v...
#pragma once #include <torch/all.h> #include <c10/util/Optional.h> #include <map> #include <vector> void swap_blocks(torch::Tensor& src, torch::Tensor& dst, int64_t block_size_in_bytes, const torch::Tensor& block_mapping); void swap_blocks_batch(const torch::Tensor& src_ptrs, ...
--- csrc/cache.h +++ csrc/cache.h @@ -9,6 +9,10 @@ void swap_blocks(torch::Tensor& src, torch::Tensor& dst, int64_t block_size_in_bytes, const torch::Tensor& block_mapping); + +void swap_blocks_batch(const torch::Tensor& src_ptrs, + const torch::Tensor& dst_ptr...
4
0
3
[]
[]
[]
Optimize this cpp kernel file from vllm (csrc/cache.h). Goal: [Perf] Batch KV cache swap copies via cuMemcpyBatchAsync Target hardware: unspecified Target models: unspecified Current file: ```cpp #pragma once #include <torch/all.h> #include <c10/util/Optional.h> #include <map> #include <vector> void swap_blocks(to...
Replace per-layer per-block `swap_blocks` calls in the KV cache offloading handler with a single `swap_blocks_batch` call that submits all copies in one driver invocation. On CUDA 12.8+ this uses `cuMemcpyBatchAsync`; on older CUDA/ROCm it falls back to a flat `cudaMemcpyAsync` loop with `cudaMemcpyDefault`. Zero extr...
[{"scope": "kernel", "hardware": "8xH100 80GB HBM3", "model": "LLaMA-8B", "shape": "Layers=32,KV Heads=8,Head Dim=128,Tensors=64,Per-tensor block size=32 KB", "batch_size": 64, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 16358, "optimized": 4519, "stated_speedup": 3.6, "speedup": 3.6198}, ...
6.1482
1.162
vllm
4a06e1246e30214d644a1732d6853cfe2b935a75
2026-04-03T06:13:23+03:00
38,460
https://github.com/vllm-project/vllm/pull/38460
[Perf] Batch KV cache swap copies via cuMemcpyBatchAsync (#38460)
[Perf] Batch KV cache swap copies via cuMemcpyBatchAsync (#38460) Signed-off-by: Itay Etelis <itay.etelis@ibm.com> Co-authored-by: Itay Etelis <itay.etelis@ibm.com> Co-authored-by: Or Ozeri <oro@il.ibm.com>
csrc/cache_kernels.cu
cuda
Apache-2.0
#include <torch/all.h> #include <ATen/cuda/CUDAContext.h> #include <c10/cuda/CUDAGuard.h> #include <c10/cuda/CUDAException.h> #include <c10/util/Optional.h> #include "cuda_utils.h" #include "cuda_compat.h" #include "dispatch_utils.h" #include "libtorch_stable/quantization/vectorization_utils.cuh" #include "concat_mla...
#include <torch/all.h> #include <ATen/cuda/CUDAContext.h> #include <c10/cuda/CUDAGuard.h> #include <c10/cuda/CUDAException.h> #include <c10/util/Optional.h> #include "cuda_utils.h" #include "cuda_compat.h" #include "dispatch_utils.h" #include "libtorch_stable/quantization/vectorization_utils.cuh" #include "concat_mla...
--- csrc/cache_kernels.cu +++ csrc/cache_kernels.cu @@ -24,6 +24,8 @@ #ifdef USE_ROCM #include <hip/hip_bf16.h> typedef __hip_bfloat16 __nv_bfloat16; +#else + #include <cuda.h> #endif #if defined(__gfx942__) @@ -71,6 +73,59 @@ cudaMemcpyAsync(dst_ptr + dst_offset, src_ptr + src_offset, ...
55
0
3
[]
[]
[]
Optimize this cuda kernel file from vllm (csrc/cache_kernels.cu). Goal: [Perf] Batch KV cache swap copies via cuMemcpyBatchAsync Target hardware: unspecified Target models: unspecified Current file: ```cuda #include <torch/all.h> #include <ATen/cuda/CUDAContext.h> #include <c10/cuda/CUDAGuard.h> #include <c10/cuda/CU...
Replace per-layer per-block `swap_blocks` calls in the KV cache offloading handler with a single `swap_blocks_batch` call that submits all copies in one driver invocation. On CUDA 12.8+ this uses `cuMemcpyBatchAsync`; on older CUDA/ROCm it falls back to a flat `cudaMemcpyAsync` loop with `cudaMemcpyDefault`. Zero extr...
[{"scope": "kernel", "hardware": "8xH100 80GB HBM3", "model": "LLaMA-8B", "shape": "Layers=32,KV Heads=8,Head Dim=128,Tensors=64,Per-tensor block size=32 KB", "batch_size": 64, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 16358, "optimized": 4519, "stated_speedup": 3.6, "speedup": 3.6198}, ...
6.1482
1.162
vllm
4a06e1246e30214d644a1732d6853cfe2b935a75
2026-04-03T06:13:23+03:00
38,460
https://github.com/vllm-project/vllm/pull/38460
[Perf] Batch KV cache swap copies via cuMemcpyBatchAsync (#38460)
[Perf] Batch KV cache swap copies via cuMemcpyBatchAsync (#38460) Signed-off-by: Itay Etelis <itay.etelis@ibm.com> Co-authored-by: Itay Etelis <itay.etelis@ibm.com> Co-authored-by: Or Ozeri <oro@il.ibm.com>
csrc/torch_bindings.cpp
cpp
Apache-2.0
#include "cache.h" #include "cuda_utils.h" #include "ops.h" #include "core/registration.h" #include <torch/library.h> #include <torch/version.h> // Note on op signatures: // The X_meta signatures are for the meta functions corresponding to op X. // They must be kept in sync with the signature for X. Generally, only //...
#include "cache.h" #include "cuda_utils.h" #include "ops.h" #include "core/registration.h" #include <torch/library.h> #include <torch/version.h> // Note on op signatures: // The X_meta signatures are for the meta functions corresponding to op X. // They must be kept in sync with the signature for X. Generally, only //...
--- csrc/torch_bindings.cpp +++ csrc/torch_bindings.cpp @@ -508,6 +508,12 @@ " int block_size_in_bytes, Tensor block_mapping) -> ()"); cache_ops.impl("swap_blocks", torch::kCUDA, &swap_blocks); + // Batch swap: submit all block copies in a single driver call. + cache_ops.def( + "swap_block...
6
0
3
[]
[]
[]
Optimize this cpp kernel file from vllm (csrc/torch_bindings.cpp). Goal: [Perf] Batch KV cache swap copies via cuMemcpyBatchAsync Target hardware: unspecified Target models: unspecified Current file: ```cpp #include "cache.h" #include "cuda_utils.h" #include "ops.h" #include "core/registration.h" #include <torch/libr...
Replace per-layer per-block `swap_blocks` calls in the KV cache offloading handler with a single `swap_blocks_batch` call that submits all copies in one driver invocation. On CUDA 12.8+ this uses `cuMemcpyBatchAsync`; on older CUDA/ROCm it falls back to a flat `cudaMemcpyAsync` loop with `cudaMemcpyDefault`. Zero extr...
[{"scope": "kernel", "hardware": "8xH100 80GB HBM3", "model": "LLaMA-8B", "shape": "Layers=32,KV Heads=8,Head Dim=128,Tensors=64,Per-tensor block size=32 KB", "batch_size": 64, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 16358, "optimized": 4519, "stated_speedup": 3.6, "speedup": 3.6198}, ...
6.1482
1.162
vllm
d9408ffba3c8da5e289b5695d507707afce10a2f
2026-04-02T06:40:01-07:00
33,529
https://github.com/vllm-project/vllm/pull/33529
Triton MLA perf fixes (#33529)
Triton MLA perf fixes (#33529) Signed-off-by: Koushik Dutta <koushd@gmail.com> Co-authored-by: root <root@ubuntu-nvidia.localdomain> Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
vllm/v1/attention/ops/triton_decode_attention.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Adapted from # https://github.com/sgl-project/sglang/blob/9f635ea50de920aa507f486daafba26a5b837574/python/sglang/srt/layers/attention/triton_ops/decode_attention.py # which was originally adapted from # https:/...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Adapted from # https://github.com/sgl-project/sglang/blob/9f635ea50de920aa507f486daafba26a5b837574/python/sglang/srt/layers/attention/triton_ops/decode_attention.py # which was originally adapted from # https:/...
--- vllm/v1/attention/ops/triton_decode_attention.py +++ vllm/v1/attention/ops/triton_decode_attention.py @@ -291,6 +291,7 @@ logit_cap: tl.constexpr, Lk: tl.constexpr, Lv: tl.constexpr, + IS_MLA: tl.constexpr = False, ): cur_batch = tl.program_id(0) cur_head_id = tl.program_id(1) @@ -310,7...
50
28
2
[]
[]
[]
Optimize this triton kernel file from vllm (vllm/v1/attention/ops/triton_decode_attention.py). Goal: Triton MLA perf fixes Target hardware: unspecified Target models: unspecified Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Adapt...
## Purpose Triton MLA on sm120 performance degrades on batch size 1 as context length increases. This perf issue has been bugging me for a while as it made deepseek and Kimi k2 unusable, and when Kimi k2.5 was released I finally got around to digging into it. I'm familiar with w/ cuda but this is my first foray into ...
[{"scope": "e2e", "hardware": null, "model": "Kimi 2.5", "shape": "context=80K", "batch_size": 1, "metric": "throughput", "unit": "tok/s", "higher_is_better": true, "baseline": 34.0, "optimized": 52.0, "stated_speedup": 1.5294, "speedup": 1.5294}, {"scope": "e2e", "hardware": null, "model": "Kimi 2.5", "shape": "contex...
null
1.032
vllm
4eefbf9609e5ddb996e3ac37e192e92466ec35cc
2026-04-02T19:52:18+08:00
37,813
https://github.com/vllm-project/vllm/pull/37813
[Perf] fuse kernels in gdn (#37813)
[Perf] fuse kernels in gdn (#37813) Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
vllm/model_executor/layers/mamba/gdn_linear_attn.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Inference-only Qwen3-Next/Qwen3.5 model.""" import torch from einops import rearrange from torch import nn from transformers.activations import ACT2FN from vllm import envs from vllm.config import ( VllmC...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Inference-only Qwen3-Next/Qwen3.5 model.""" import torch from einops import rearrange from torch import nn from transformers.activations import ACT2FN from vllm import envs from vllm.config import ( VllmC...
--- vllm/model_executor/layers/mamba/gdn_linear_attn.py +++ vllm/model_executor/layers/mamba/gdn_linear_attn.py @@ -24,6 +24,7 @@ chunk_gated_delta_rule as fla_chunk_gated_delta_rule, ) from vllm.model_executor.layers.fla.ops import ( + fused_post_conv_prep, fused_recurrent_gated_delta_rule_packed_decode...
36
10
2
[ "mamba" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/mamba/gdn_linear_attn.py). Goal: [Perf] fuse kernels in gdn Target hardware: unspecified Target models: mamba Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Inf...
## Purpose ## Test Plan ``` vllm serve Qwen/Qwen3.5-35B-A3B --language-model-only ``` ``` vllm bench serve \ --backend vllm \ --base-url http://localhost:8000 \ --model Q...
[]
null
null
vllm
551b3fb39f3a95ff3dc3feca9528ab4c90649316
2026-04-02T16:13:42+08:00
38,086
https://github.com/vllm-project/vllm/pull/38086
[ROCm] Enable VLLM triton FP8 moe for gfx1201, tuned for Qwen3-30B-A3B-FP8 tp=2 and Qwen/Qwen3.5-35B-A3B-FP8 tp=2 (#38086)
[ROCm] Enable VLLM triton FP8 moe for gfx1201, tuned for Qwen3-30B-A3B-FP8 tp=2 and Qwen/Qwen3.5-35B-A3B-FP8 tp=2 (#38086) Signed-off-by: big-yellow-duck <jeffaw99@hotmail.com> Co-authored-by: vllmellm <vllm.ellm@embeddedllm.com>
vllm/model_executor/layers/fused_moe/fused_moe.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Fused MoE Triton kernels.""" import functools import json import os from collections.abc import Callable from typing import Any import torch import vllm.envs as envs import vllm.model_executor.layers.fused_m...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Fused MoE Triton kernels.""" import functools import json import os from collections.abc import Callable from typing import Any import torch import vllm.envs as envs import vllm.model_executor.layers.fused_m...
--- vllm/model_executor/layers/fused_moe/fused_moe.py +++ vllm/model_executor/layers/fused_moe/fused_moe.py @@ -1923,14 +1923,17 @@ ) -> bool: p = current_platform if p.is_rocm(): - from vllm.platforms.rocm import on_gfx9 + from vllm.platforms.rocm import on_gfx9, on_gfx12x ...
4
1
1
[ "qwen" ]
[ "GFX1201", "ROCM" ]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/fused_moe/fused_moe.py). Goal: [ROCm] Enable VLLM triton FP8 moe for gfx1201, tuned for Qwen3-30B-A3B-FP8 tp=2 and Qwen/Qwen3.5-35B-A3B-FP8 tp=2 Target hardware: GFX1201, ROCM Target models: qwen Current file: ```python # SPDX-License-Identifier: ...
## Purpose Enable Triton FP8 MoE for RDNA4 (`gfx12xx`) in vLLM so FP8 MoE models can run on ROCm with these GPUs. This resolves https://github.com/vllm-project/vllm/issues/36105, where FP8 MoE model startup failed with `NotImplementedError: No FP8 MoE backend supports the deployment configuration`. This PR also inclu...
[{"scope": "e2e", "hardware": "Radeon PRO 9700", "model": "Qwen/Qwen3-30B-A3B-Instruct-2507-FP8", "shape": "ISL-OSL=512-512", "batch_size": 512, "metric": "TTFT", "unit": "ms", "higher_is_better": false, "baseline": 1176.38, "optimized": 982.67, "stated_speedup": null, "speedup": 1.1971}, {"scope": "e2e", "hardware": "...
null
1.0962
vllm
c49497726ba4a8a2b86d7b0fccb9ced5f53d18a8
2026-04-01T06:30:19+03:00
32,914
https://github.com/vllm-project/vllm/pull/32914
[ROCm][perf] Shuffle KV cache to use paged_attention_common (#32914)
[ROCm][perf] Shuffle KV cache to use paged_attention_common (#32914) Signed-off-by: Samu Tamminen <stammine@amd.com> Co-authored-by: Tuukka Sarvi <tuukka.sarvi@amd.com>
vllm/v1/attention/backends/rocm_aiter_fa.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Attention layer with AiterFlashAttention.""" from dataclasses import dataclass from typing import ClassVar import torch from vllm._aiter_ops import rocm_aiter_ops from vllm.config import VllmConfig, get_laye...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Attention layer with AiterFlashAttention.""" from dataclasses import dataclass from typing import ClassVar import torch from vllm._aiter_ops import rocm_aiter_ops from vllm.config import VllmConfig, get_laye...
--- vllm/v1/attention/backends/rocm_aiter_fa.py +++ vllm/v1/attention/backends/rocm_aiter_fa.py @@ -1247,7 +1247,23 @@ v_descale=layer._v_scale.expand(descale_shape), ) elif rocm_aiter_ops.is_shuffle_kv_cache_enabled(): - num_blocks, bloc...
38
4
1
[]
[ "ROCM" ]
[]
Optimize this triton kernel file from vllm (vllm/v1/attention/backends/rocm_aiter_fa.py). Goal: [ROCm][perf] Shuffle KV cache to use paged_attention_common Target hardware: ROCM Target models: unspecified Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to...
## Purpose For Qwen/Qwen3-235B-A22B-Instruct-2507-FP8 model, currently `VLLM_ROCM_SHUFFLE_KV_CACHE_LAYOUT=1` performs worse on small concurrencies, compared to `VLLM_ROCM_SHUFFLE_KV_CACHE_LAYOUT=0`. This PR fixes the issue using `paged_attention_common` from aiter (see https://github.com/ROCm/aiter/pull/1821). ## Te...
[]
null
null
vllm
e7221180e1d67a91e84a93aea08841fef8c67680
2026-03-25T23:20:04+08:00
37,970
https://github.com/vllm-project/vllm/pull/37970
[Kernel] Optimize SM120 CUTLASS blockwise FP8 GEMM (#37970)
[Kernel] Optimize SM120 CUTLASS blockwise FP8 GEMM (#37970) Signed-off-by: Necofish <liuxiangyang@mail.ustc.edu.cn> Co-authored-by: Michael Goin <mgoin64@gmail.com>
csrc/quantization/w8a8/cutlass/c3x/scaled_mm_blockwise_sm120_fp8_dispatch.cuh
cuda
Apache-2.0
#pragma once #include "cuda_utils.h" #include "cutlass/cutlass.h" #include "cutlass/numeric_types.h" #include "cute/tensor.hpp" #include "cutlass/tensor_ref.h" #include "cutlass/gemm/dispatch_policy.hpp" #include "cutlass/gemm/collective/collective_builder.hpp" #include "cutlass/gemm/device/gemm_universal_adapter.h" ...
#pragma once #include "cuda_utils.h" #include "cutlass/cutlass.h" #include "cutlass/numeric_types.h" #include "cute/tensor.hpp" #include "cutlass/tensor_ref.h" #include "cutlass/gemm/dispatch_policy.hpp" #include "cutlass/gemm/collective/collective_builder.hpp" #include "cutlass/gemm/device/gemm_universal_adapter.h" ...
--- csrc/quantization/w8a8/cutlass/c3x/scaled_mm_blockwise_sm120_fp8_dispatch.cuh +++ csrc/quantization/w8a8/cutlass/c3x/scaled_mm_blockwise_sm120_fp8_dispatch.cuh @@ -110,6 +110,33 @@ struct GemmKernel : public KernelType {}; }; +// Tile configurations for different M ranges +template <typename OutType> +struct ...
36
5
1
[]
[ "SM120" ]
[]
Optimize this cuda kernel file from vllm (csrc/quantization/w8a8/cutlass/c3x/scaled_mm_blockwise_sm120_fp8_dispatch.cuh). Goal: [Kernel] Optimize SM120 CUTLASS blockwise FP8 GEMM Target hardware: SM120 Target models: unspecified Current file: ```cuda #pragma once #include "cuda_utils.h" #include "cutlass/cutlass.h" ...
## Purpose The SM120 blockwise FP8 GEMM dispatch used a single `Shape<_128, _128, _128>` / `KernelScheduleAuto` configuration for all problem sizes , leaving significant performance on the table during decode (small-M) workloads. To address this, this PR splits the dispatch logic based on the $M$ dimension: - **S...
[{"scope": "kernel", "hardware": null, "model": null, "shape": "M=16,N=5120,K=16384", "batch_size": null, "metric": "latency", "unit": "us", "higher_is_better": false, "baseline": 187, "optimized": 97, "stated_speedup": null, "speedup": 1.9278}, {"scope": "kernel", "hardware": null, "model": null, "shape": "M=16,N=5120...
1.7963
null
vllm
a16133a0f12e8e406206be1bc8041727d9f1ea7d
2026-03-23T09:37:58+02:00
37,338
https://github.com/vllm-project/vllm/pull/37338
[Perf] [Bugfix] Fix Triton autotuning in inference for Qwen3.5 (#37338)
[Perf] [Bugfix] Fix Triton autotuning in inference for Qwen3.5 (#37338) Signed-off-by: Artem Perevedentsev <aperevedents@nvidia.com>
vllm/model_executor/layers/fla/ops/chunk_delta_h.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # SPDX-FileCopyrightText: Songlin Yang, Yu Zhang # # This file contains code copied from the flash-linear-attention project. # The original source code was licensed under the MIT license and included # the followi...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # SPDX-FileCopyrightText: Songlin Yang, Yu Zhang # # This file contains code copied from the flash-linear-attention project. # The original source code was licensed under the MIT license and included # the followi...
--- vllm/model_executor/layers/fla/ops/chunk_delta_h.py +++ vllm/model_executor/layers/fla/ops/chunk_delta_h.py @@ -288,7 +288,7 @@ output_final_state: bool = False, chunk_size: int = 64, # SY: remove this argument and force chunk size 64? save_new_value: bool = True, - cu_seqlens: torch.LongTensor |...
1
1
9
[ "qwen" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/fla/ops/chunk_delta_h.py). Goal: [Perf] [Bugfix] Fix Triton autotuning in inference for Qwen3.5 Target hardware: unspecified Target models: qwen Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright cont...
## Purpose Bugfix for PR #36599 + type annotation cleanup: the GDN Triton warmup introduced in that PR uses dummy tensors whose dtypes don't match real inference, so Triton autotuner cache entries created during warmup are never reused — autotuning re-runs on the first inference batch. Additionally, `cu_seqlens` type ...
[{"scope": "e2e", "hardware": "8\u00d7 NVIDIA B200", "model": "Qwen/Qwen3.5-397B-A17B-FP8", "shape": "128 prompts, 8K input tokens each", "batch_size": 128, "metric": "duration", "unit": "s", "higher_is_better": false, "baseline": 109.73, "optimized": 27.34, "stated_speedup": 4.0, "speedup": 4.0135}, {"scope": "e2e", "...
null
4.0136
vllm
a16133a0f12e8e406206be1bc8041727d9f1ea7d
2026-03-23T09:37:58+02:00
37,338
https://github.com/vllm-project/vllm/pull/37338
[Perf] [Bugfix] Fix Triton autotuning in inference for Qwen3.5 (#37338)
[Perf] [Bugfix] Fix Triton autotuning in inference for Qwen3.5 (#37338) Signed-off-by: Artem Perevedentsev <aperevedents@nvidia.com>
vllm/model_executor/layers/fla/ops/chunk_o.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # SPDX-FileCopyrightText: Songlin Yang, Yu Zhang # # This file contains code copied from the flash-linear-attention project. # The original source code was licensed under the MIT license and included # the followi...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # SPDX-FileCopyrightText: Songlin Yang, Yu Zhang # # This file contains code copied from the flash-linear-attention project. # The original source code was licensed under the MIT license and included # the followi...
--- vllm/model_executor/layers/fla/ops/chunk_o.py +++ vllm/model_executor/layers/fla/ops/chunk_o.py @@ -145,7 +145,7 @@ h: torch.Tensor, g: torch.Tensor | None = None, # cumsum of log decay scale: float | None = None, - cu_seqlens: torch.LongTensor | None = None, + cu_seqlens: torch.Tensor | None ...
1
1
9
[ "qwen" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/fla/ops/chunk_o.py). Goal: [Perf] [Bugfix] Fix Triton autotuning in inference for Qwen3.5 Target hardware: unspecified Target models: qwen Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributo...
## Purpose Bugfix for PR #36599 + type annotation cleanup: the GDN Triton warmup introduced in that PR uses dummy tensors whose dtypes don't match real inference, so Triton autotuner cache entries created during warmup are never reused — autotuning re-runs on the first inference batch. Additionally, `cu_seqlens` type ...
[{"scope": "e2e", "hardware": "8\u00d7 NVIDIA B200", "model": "Qwen/Qwen3.5-397B-A17B-FP8", "shape": "128 prompts, 8K input tokens each", "batch_size": 128, "metric": "duration", "unit": "s", "higher_is_better": false, "baseline": 109.73, "optimized": 27.34, "stated_speedup": 4.0, "speedup": 4.0135}, {"scope": "e2e", "...
null
4.0136
vllm
a16133a0f12e8e406206be1bc8041727d9f1ea7d
2026-03-23T09:37:58+02:00
37,338
https://github.com/vllm-project/vllm/pull/37338
[Perf] [Bugfix] Fix Triton autotuning in inference for Qwen3.5 (#37338)
[Perf] [Bugfix] Fix Triton autotuning in inference for Qwen3.5 (#37338) Signed-off-by: Artem Perevedentsev <aperevedents@nvidia.com>
vllm/model_executor/layers/fla/ops/chunk_scaled_dot_kkt.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # SPDX-FileCopyrightText: Songlin Yang, Yu Zhang # # This file contains code copied from the flash-linear-attention project. # The original source code was licensed under the MIT license and included # the followi...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # SPDX-FileCopyrightText: Songlin Yang, Yu Zhang # # This file contains code copied from the flash-linear-attention project. # The original source code was licensed under the MIT license and included # the followi...
--- vllm/model_executor/layers/fla/ops/chunk_scaled_dot_kkt.py +++ vllm/model_executor/layers/fla/ops/chunk_scaled_dot_kkt.py @@ -102,7 +102,7 @@ k: torch.Tensor, g: torch.Tensor | None = None, beta: torch.Tensor | None = None, - cu_seqlens: torch.LongTensor | None = None, + cu_seqlens: torch.Tenso...
2
2
9
[ "qwen" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/fla/ops/chunk_scaled_dot_kkt.py). Goal: [Perf] [Bugfix] Fix Triton autotuning in inference for Qwen3.5 Target hardware: unspecified Target models: qwen Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyrig...
## Purpose Bugfix for PR #36599 + type annotation cleanup: the GDN Triton warmup introduced in that PR uses dummy tensors whose dtypes don't match real inference, so Triton autotuner cache entries created during warmup are never reused — autotuning re-runs on the first inference batch. Additionally, `cu_seqlens` type ...
[{"scope": "e2e", "hardware": "8\u00d7 NVIDIA B200", "model": "Qwen/Qwen3.5-397B-A17B-FP8", "shape": "128 prompts, 8K input tokens each", "batch_size": 128, "metric": "duration", "unit": "s", "higher_is_better": false, "baseline": 109.73, "optimized": 27.34, "stated_speedup": 4.0, "speedup": 4.0135}, {"scope": "e2e", "...
null
4.0136
vllm
a16133a0f12e8e406206be1bc8041727d9f1ea7d
2026-03-23T09:37:58+02:00
37,338
https://github.com/vllm-project/vllm/pull/37338
[Perf] [Bugfix] Fix Triton autotuning in inference for Qwen3.5 (#37338)
[Perf] [Bugfix] Fix Triton autotuning in inference for Qwen3.5 (#37338) Signed-off-by: Artem Perevedentsev <aperevedents@nvidia.com>
vllm/model_executor/layers/fla/ops/fused_recurrent.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # SPDX-FileCopyrightText: Songlin Yang, Yu Zhang # # This file contains code copied from the flash-linear-attention project. # The original source code was licensed under the MIT license and included # the followi...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # SPDX-FileCopyrightText: Songlin Yang, Yu Zhang # # This file contains code copied from the flash-linear-attention project. # The original source code was licensed under the MIT license and included # the followi...
--- vllm/model_executor/layers/fla/ops/fused_recurrent.py +++ vllm/model_executor/layers/fla/ops/fused_recurrent.py @@ -184,7 +184,7 @@ scale: float, initial_state: torch.Tensor, inplace_final_state: bool = True, - cu_seqlens: torch.LongTensor | None = None, + cu_seqlens: torch.Tensor | None = None...
5
5
9
[ "qwen" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/fla/ops/fused_recurrent.py). Goal: [Perf] [Bugfix] Fix Triton autotuning in inference for Qwen3.5 Target hardware: unspecified Target models: qwen Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright co...
## Purpose Bugfix for PR #36599 + type annotation cleanup: the GDN Triton warmup introduced in that PR uses dummy tensors whose dtypes don't match real inference, so Triton autotuner cache entries created during warmup are never reused — autotuning re-runs on the first inference batch. Additionally, `cu_seqlens` type ...
[{"scope": "e2e", "hardware": "8\u00d7 NVIDIA B200", "model": "Qwen/Qwen3.5-397B-A17B-FP8", "shape": "128 prompts, 8K input tokens each", "batch_size": 128, "metric": "duration", "unit": "s", "higher_is_better": false, "baseline": 109.73, "optimized": 27.34, "stated_speedup": 4.0, "speedup": 4.0135}, {"scope": "e2e", "...
null
4.0136
vllm
a16133a0f12e8e406206be1bc8041727d9f1ea7d
2026-03-23T09:37:58+02:00
37,338
https://github.com/vllm-project/vllm/pull/37338
[Perf] [Bugfix] Fix Triton autotuning in inference for Qwen3.5 (#37338)
[Perf] [Bugfix] Fix Triton autotuning in inference for Qwen3.5 (#37338) Signed-off-by: Artem Perevedentsev <aperevedents@nvidia.com>
vllm/model_executor/layers/fla/ops/fused_sigmoid_gating.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # SPDX-FileCopyrightText: Songlin Yang, Yu Zhang # # This file contains code copied from the flash-linear-attention project. # The original source code was licensed under the MIT license and included # the followi...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # SPDX-FileCopyrightText: Songlin Yang, Yu Zhang # # This file contains code copied from the flash-linear-attention project. # The original source code was licensed under the MIT license and included # the followi...
--- vllm/model_executor/layers/fla/ops/fused_sigmoid_gating.py +++ vllm/model_executor/layers/fla/ops/fused_sigmoid_gating.py @@ -191,7 +191,7 @@ scale: float = None, initial_state: torch.Tensor = None, inplace_final_state: bool = True, - cu_seqlens: torch.LongTensor | None = None, + cu_seqlens: to...
1
1
9
[ "qwen" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/fla/ops/fused_sigmoid_gating.py). Goal: [Perf] [Bugfix] Fix Triton autotuning in inference for Qwen3.5 Target hardware: unspecified Target models: qwen Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyrig...
## Purpose Bugfix for PR #36599 + type annotation cleanup: the GDN Triton warmup introduced in that PR uses dummy tensors whose dtypes don't match real inference, so Triton autotuner cache entries created during warmup are never reused — autotuning re-runs on the first inference batch. Additionally, `cu_seqlens` type ...
[{"scope": "e2e", "hardware": "8\u00d7 NVIDIA B200", "model": "Qwen/Qwen3.5-397B-A17B-FP8", "shape": "128 prompts, 8K input tokens each", "batch_size": 128, "metric": "duration", "unit": "s", "higher_is_better": false, "baseline": 109.73, "optimized": 27.34, "stated_speedup": 4.0, "speedup": 4.0135}, {"scope": "e2e", "...
null
4.0136
vllm
a16133a0f12e8e406206be1bc8041727d9f1ea7d
2026-03-23T09:37:58+02:00
37,338
https://github.com/vllm-project/vllm/pull/37338
[Perf] [Bugfix] Fix Triton autotuning in inference for Qwen3.5 (#37338)
[Perf] [Bugfix] Fix Triton autotuning in inference for Qwen3.5 (#37338) Signed-off-by: Artem Perevedentsev <aperevedents@nvidia.com>
vllm/model_executor/layers/fla/ops/kda.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # SPDX-FileCopyrightText: Songlin Yang, Yu Zhang # # This file contains code copied from the flash-linear-attention project. # The original source code was licensed under the MIT license and included # the followi...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # SPDX-FileCopyrightText: Songlin Yang, Yu Zhang # # This file contains code copied from the flash-linear-attention project. # The original source code was licensed under the MIT license and included # the followi...
--- vllm/model_executor/layers/fla/ops/kda.py +++ vllm/model_executor/layers/fla/ops/kda.py @@ -38,7 +38,7 @@ scale: float, initial_state: torch.Tensor, inplace_final_state: bool = True, - cu_seqlens: torch.LongTensor | None = None, + cu_seqlens: torch.Tensor | None = None, ssm_state_indices: ...
8
8
9
[ "qwen" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/fla/ops/kda.py). Goal: [Perf] [Bugfix] Fix Triton autotuning in inference for Qwen3.5 Target hardware: unspecified Target models: qwen Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors t...
## Purpose Bugfix for PR #36599 + type annotation cleanup: the GDN Triton warmup introduced in that PR uses dummy tensors whose dtypes don't match real inference, so Triton autotuner cache entries created during warmup are never reused — autotuning re-runs on the first inference batch. Additionally, `cu_seqlens` type ...
[{"scope": "e2e", "hardware": "8\u00d7 NVIDIA B200", "model": "Qwen/Qwen3.5-397B-A17B-FP8", "shape": "128 prompts, 8K input tokens each", "batch_size": 128, "metric": "duration", "unit": "s", "higher_is_better": false, "baseline": 109.73, "optimized": 27.34, "stated_speedup": 4.0, "speedup": 4.0135}, {"scope": "e2e", "...
null
4.0136
vllm
a16133a0f12e8e406206be1bc8041727d9f1ea7d
2026-03-23T09:37:58+02:00
37,338
https://github.com/vllm-project/vllm/pull/37338
[Perf] [Bugfix] Fix Triton autotuning in inference for Qwen3.5 (#37338)
[Perf] [Bugfix] Fix Triton autotuning in inference for Qwen3.5 (#37338) Signed-off-by: Artem Perevedentsev <aperevedents@nvidia.com>
vllm/model_executor/layers/fla/ops/wy_fast.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # SPDX-FileCopyrightText: Songlin Yang, Yu Zhang # # This file contains code copied from the flash-linear-attention project. # The original source code was licensed under the MIT license and included # the followi...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # SPDX-FileCopyrightText: Songlin Yang, Yu Zhang # # This file contains code copied from the flash-linear-attention project. # The original source code was licensed under the MIT license and included # the followi...
--- vllm/model_executor/layers/fla/ops/wy_fast.py +++ vllm/model_executor/layers/fla/ops/wy_fast.py @@ -122,7 +122,7 @@ beta: torch.Tensor, g_cumsum: torch.Tensor, A: torch.Tensor, - cu_seqlens: torch.LongTensor | None, + cu_seqlens: torch.Tensor | None, ) -> tuple[torch.Tensor, torch.Tensor]: ...
1
1
9
[ "qwen" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/fla/ops/wy_fast.py). Goal: [Perf] [Bugfix] Fix Triton autotuning in inference for Qwen3.5 Target hardware: unspecified Target models: qwen Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributo...
## Purpose Bugfix for PR #36599 + type annotation cleanup: the GDN Triton warmup introduced in that PR uses dummy tensors whose dtypes don't match real inference, so Triton autotuner cache entries created during warmup are never reused — autotuning re-runs on the first inference batch. Additionally, `cu_seqlens` type ...
[{"scope": "e2e", "hardware": "8\u00d7 NVIDIA B200", "model": "Qwen/Qwen3.5-397B-A17B-FP8", "shape": "128 prompts, 8K input tokens each", "batch_size": 128, "metric": "duration", "unit": "s", "higher_is_better": false, "baseline": 109.73, "optimized": 27.34, "stated_speedup": 4.0, "speedup": 4.0135}, {"scope": "e2e", "...
null
4.0136
vllm
d0532bf38da5c8f4758e34e53a3708be0955d2db
2026-03-20T10:28:41-07:00
37,683
https://github.com/vllm-project/vllm/pull/37683
[Perf] Eliminate redundant SparseMatrix creation in gpt_oss_triton_kernels (#37683)
[Perf] Eliminate redundant SparseMatrix creation in gpt_oss_triton_kernels (#37683) Signed-off-by: Xin Yang <xyangx@amazon.com>
vllm/model_executor/layers/fused_moe/gpt_oss_triton_kernels_moe.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import torch import vllm.model_executor.layers.fused_moe.modular_kernel as mk from vllm import _custom_ops as ops from vllm._aiter_ops import rocm_aiter_ops from vllm.logger import init_logger from vllm.model_e...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import torch import vllm.model_executor.layers.fused_moe.modular_kernel as mk from vllm import _custom_ops as ops from vllm._aiter_ops import rocm_aiter_ops from vllm.logger import init_logger from vllm.model_e...
--- vllm/model_executor/layers/fused_moe/gpt_oss_triton_kernels_moe.py +++ vllm/model_executor/layers/fused_moe/gpt_oss_triton_kernels_moe.py @@ -142,6 +142,33 @@ return routing_data, gather_idx, scatter_idx +def legacy_routing_from_sparsematrix( + sparse_logits: "SparseMatrix", + n_expts_tot: int, + ...
29
4
1
[]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/fused_moe/gpt_oss_triton_kernels_moe.py). Goal: [Perf] Eliminate redundant SparseMatrix creation in gpt_oss_triton_kernels Target hardware: unspecified Target models: unspecified Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX...
## Purpose During profiling I noticed `_sum_bitmatrix_rows` + `_bitmatrix_metadata_compute_stage1` +`_bitmatrix_metadata_compute_stage2` kernels were launched twice. * Creating `SparseMatrix` object will launch these 3 kernels, see in triton_kernels [SparseMatrix](https://github.com/triton-lang/triton/blob/v3.6.0/...
[{"scope": "e2e", "hardware": "H200", "model": "gpt-oss-20b", "shape": null, "batch_size": 1, "metric": "Output token throughput", "unit": "tok/s", "higher_is_better": true, "baseline": 265.06, "optimized": 275.91, "stated_speedup": null, "speedup": 1.0409}, {"scope": "e2e", "hardware": "H200", "model": "gpt-oss-20b", ...
null
1.0259
vllm
9e19f8338b4098047175ca3119d5ae0368bcf24a
2026-03-12T19:01:57+08:00
36,596
https://github.com/vllm-project/vllm/pull/36596
[Perf] add packed recurrent fast path for decode (#36596)
[Perf] add packed recurrent fast path for decode (#36596) Signed-off-by: hdj <1293066020@qq.com> Co-authored-by: Roger Wang <hey@rogerw.io>
vllm/model_executor/layers/fla/ops/fused_recurrent.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # SPDX-FileCopyrightText: Songlin Yang, Yu Zhang # # This file contains code copied from the flash-linear-attention project. # The original source code was licensed under the MIT license and included # the followi...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # SPDX-FileCopyrightText: Songlin Yang, Yu Zhang # # This file contains code copied from the flash-linear-attention project. # The original source code was licensed under the MIT license and included # the followi...
--- vllm/model_executor/layers/fla/ops/fused_recurrent.py +++ vllm/model_executor/layers/fla/ops/fused_recurrent.py @@ -252,6 +252,231 @@ return o, final_state +@triton.jit +def fused_recurrent_gated_delta_rule_packed_decode_kernel( + mixed_qkv, + a, + b, + A_log, + dt_bias, + o, + h0, + ...
225
0
2
[]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/fla/ops/fused_recurrent.py). Goal: [Perf] add packed recurrent fast path for decode Target hardware: unspecified Target models: unspecified Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contribut...
<!-- markdownlint-disable --> ## Purpose - Add a packed recurrent decode fast path for **Qwen3Next GDN non-spec uniform decode (`T=1`)**. - Directly consume packed `mixed_qkv` in a decode-only fast path instead of materializing contiguous `q/k/v`. - Fuse the packed data flow with recurrent decode state update/output w...
[{"scope": "e2e", "hardware": null, "model": "Qwen3.5-35B-A3B", "shape": null, "batch_size": 800, "metric": "Output token throughput", "unit": "tok/s", "higher_is_better": true, "baseline": 8533.93, "optimized": 9077.62, "stated_speedup": 1.0637, "speedup": 1.0637}, {"scope": "e2e", "hardware": null, "model": "Qwen3.5-...
null
1.067
vllm
894843eb25ddbdedec93b68140f2eb14fceea7ce
2026-03-12T14:12:57+08:00
36,144
https://github.com/vllm-project/vllm/pull/36144
replace `with torch.cuda.device` with `with torch.accelerator.device_index` (#36144)
replace `with torch.cuda.device` with `with torch.accelerator.device_index` (#36144) Signed-off-by: Yan Ma <yan.ma@intel.com>
vllm/model_executor/layers/mamba/ops/layernorm_gated.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright (c) 2024, Tri Dao. # Adapted from https://github.com/state-spaces/mamba/blob/60dadf2e0ee730ac337035d5533de10bc26e4847/mamba_ssm/ops/triton/layernorm_gated.py import torch from vllm.triton_utils impor...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright (c) 2024, Tri Dao. # Adapted from https://github.com/state-spaces/mamba/blob/60dadf2e0ee730ac337035d5533de10bc26e4847/mamba_ssm/ops/triton/layernorm_gated.py import torch from vllm.triton_utils impor...
--- vllm/model_executor/layers/mamba/ops/layernorm_gated.py +++ vllm/model_executor/layers/mamba/ops/layernorm_gated.py @@ -119,7 +119,7 @@ # heuristics for number of warps num_warps = min(max(BLOCK_N // 256, 1), 8) grid = (M, ngroups) - with torch.cuda.device(x.device.index): + with torch.accelera...
1
1
6
[ "mamba" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/mamba/ops/layernorm_gated.py). Goal: replace `with torch.cuda.device` with `with torch.accelerator.device_index` Target hardware: unspecified Target models: mamba Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightTe...
## Purpose There are several `torch.cuda.device` usage in project and we'd better to change to `torch.accelerator.device_index` for XPU support. ## Test Plan ## Test Result --- <details> <summary> Essential Elements of an Effective PR Description Checklist </summary> - [ ] The purpose of the PR, such as "Fix some ...
[]
null
null
vllm
894843eb25ddbdedec93b68140f2eb14fceea7ce
2026-03-12T14:12:57+08:00
36,144
https://github.com/vllm-project/vllm/pull/36144
replace `with torch.cuda.device` with `with torch.accelerator.device_index` (#36144)
replace `with torch.cuda.device` with `with torch.accelerator.device_index` (#36144) Signed-off-by: Yan Ma <yan.ma@intel.com>
vllm/model_executor/layers/mamba/ops/mamba_ssm.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright (c) 2024, Tri Dao, Albert Gu. # Adapted from https://github.com/state-spaces/mamba/blob/v2.2.4/mamba_ssm/ops/triton/selective_state_update.py import torch from packaging import version from vllm imp...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright (c) 2024, Tri Dao, Albert Gu. # Adapted from https://github.com/state-spaces/mamba/blob/v2.2.4/mamba_ssm/ops/triton/selective_state_update.py import torch from packaging import version from vllm imp...
--- vllm/model_executor/layers/mamba/ops/mamba_ssm.py +++ vllm/model_executor/layers/mamba/ops/mamba_ssm.py @@ -419,7 +419,7 @@ and dt.stride(-1) == 0 and dt_bias.stride(-1) == 0 ) - with torch.cuda.device(x.device.index): + with torch.accelerator.device_index(x.device.index): _sel...
1
1
6
[ "mamba" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/mamba/ops/mamba_ssm.py). Goal: replace `with torch.cuda.device` with `with torch.accelerator.device_index` Target hardware: unspecified Target models: mamba Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Co...
## Purpose There are several `torch.cuda.device` usage in project and we'd better to change to `torch.accelerator.device_index` for XPU support. ## Test Plan ## Test Result --- <details> <summary> Essential Elements of an Effective PR Description Checklist </summary> - [ ] The purpose of the PR, such as "Fix some ...
[]
null
null
vllm
894843eb25ddbdedec93b68140f2eb14fceea7ce
2026-03-12T14:12:57+08:00
36,144
https://github.com/vllm-project/vllm/pull/36144
replace `with torch.cuda.device` with `with torch.accelerator.device_index` (#36144)
replace `with torch.cuda.device` with `with torch.accelerator.device_index` (#36144) Signed-off-by: Yan Ma <yan.ma@intel.com>
vllm/model_executor/layers/mamba/ops/ssd_bmm.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright (c) 2024, Tri Dao, Albert Gu. # Adapted from https://github.com/state-spaces/mamba/blob/v2.2.4/mamba_ssm/ops/triton/ssd_bmm.py # ruff: noqa: E501,SIM102 import torch from vllm.triton_utils import t...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright (c) 2024, Tri Dao, Albert Gu. # Adapted from https://github.com/state-spaces/mamba/blob/v2.2.4/mamba_ssm/ops/triton/ssd_bmm.py # ruff: noqa: E501,SIM102 import torch from vllm.triton_utils import t...
--- vllm/model_executor/layers/mamba/ops/ssd_bmm.py +++ vllm/model_executor/layers/mamba/ops/ssd_bmm.py @@ -185,7 +185,7 @@ * triton.cdiv(chunk_size, META["BLOCK_SIZE_N"]), nchunks * ngroups, ) - with torch.cuda.device(a.device.index): + with torch.accelerator.device_index(a.device.index): ...
1
1
6
[ "mamba" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/mamba/ops/ssd_bmm.py). Goal: replace `with torch.cuda.device` with `with torch.accelerator.device_index` Target hardware: unspecified Target models: mamba Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copy...
## Purpose There are several `torch.cuda.device` usage in project and we'd better to change to `torch.accelerator.device_index` for XPU support. ## Test Plan ## Test Result --- <details> <summary> Essential Elements of an Effective PR Description Checklist </summary> - [ ] The purpose of the PR, such as "Fix some ...
[]
null
null
vllm
894843eb25ddbdedec93b68140f2eb14fceea7ce
2026-03-12T14:12:57+08:00
36,144
https://github.com/vllm-project/vllm/pull/36144
replace `with torch.cuda.device` with `with torch.accelerator.device_index` (#36144)
replace `with torch.cuda.device` with `with torch.accelerator.device_index` (#36144) Signed-off-by: Yan Ma <yan.ma@intel.com>
vllm/model_executor/layers/mamba/ops/ssd_chunk_state.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright (c) 2024, Tri Dao, Albert Gu. # Adapted from https://github.com/state-spaces/mamba/blob/v2.2.4/mamba_ssm/ops/triton/ssd_chunk_state.py # ruff: noqa: E501 import torch from vllm.model_executor.layer...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright (c) 2024, Tri Dao, Albert Gu. # Adapted from https://github.com/state-spaces/mamba/blob/v2.2.4/mamba_ssm/ops/triton/ssd_chunk_state.py # ruff: noqa: E501 import torch from vllm.model_executor.layer...
--- vllm/model_executor/layers/mamba/ops/ssd_chunk_state.py +++ vllm/model_executor/layers/mamba/ops/ssd_chunk_state.py @@ -323,7 +323,7 @@ nheads, nchunks, chunk_size, device=dt.device, dtype=torch.float32 ) grid_chunk_cs = lambda META: (nchunks, triton.cdiv(nheads, META["BLOCK_SIZE_H"])) - with ...
2
2
6
[ "mamba" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/mamba/ops/ssd_chunk_state.py). Goal: replace `with torch.cuda.device` with `with torch.accelerator.device_index` Target hardware: unspecified Target models: mamba Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightTe...
## Purpose There are several `torch.cuda.device` usage in project and we'd better to change to `torch.accelerator.device_index` for XPU support. ## Test Plan ## Test Result --- <details> <summary> Essential Elements of an Effective PR Description Checklist </summary> - [ ] The purpose of the PR, such as "Fix some ...
[]
null
null
vllm
894843eb25ddbdedec93b68140f2eb14fceea7ce
2026-03-12T14:12:57+08:00
36,144
https://github.com/vllm-project/vllm/pull/36144
replace `with torch.cuda.device` with `with torch.accelerator.device_index` (#36144)
replace `with torch.cuda.device` with `with torch.accelerator.device_index` (#36144) Signed-off-by: Yan Ma <yan.ma@intel.com>
vllm/model_executor/layers/mamba/ops/ssd_state_passing.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright (c) 2024, Tri Dao, Albert Gu. # Adapted from https://github.com/state-spaces/mamba/blob/v2.2.4/mamba_ssm/ops/triton/ssd_state_passing.py # ruff: noqa: E501 import torch from vllm.model_executor.lay...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright (c) 2024, Tri Dao, Albert Gu. # Adapted from https://github.com/state-spaces/mamba/blob/v2.2.4/mamba_ssm/ops/triton/ssd_state_passing.py # ruff: noqa: E501 import torch from vllm.model_executor.lay...
--- vllm/model_executor/layers/mamba/ops/ssd_state_passing.py +++ vllm/model_executor/layers/mamba/ops/ssd_state_passing.py @@ -120,7 +120,7 @@ ) grid = lambda META: (triton.cdiv(dim, META["BLOCK_SIZE"]), batch, nheads) - with torch.cuda.device(states.device.index): + with torch.accelerator.device_ind...
1
1
6
[ "mamba" ]
[]
[]
Optimize this triton kernel file from vllm (vllm/model_executor/layers/mamba/ops/ssd_state_passing.py). Goal: replace `with torch.cuda.device` with `with torch.accelerator.device_index` Target hardware: unspecified Target models: mamba Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyright...
## Purpose There are several `torch.cuda.device` usage in project and we'd better to change to `torch.accelerator.device_index` for XPU support. ## Test Plan ## Test Result --- <details> <summary> Essential Elements of an Effective PR Description Checklist </summary> - [ ] The purpose of the PR, such as "Fix some ...
[]
null
null
vllm
82f3f30e266e24b26c46916a8c9daaea7d5e32bd
2026-03-11T00:14:35+08:00
35,719
https://github.com/vllm-project/vllm/pull/35719
[ROCm][Perf] Enable `sparse_mla`'s cudagraph on ROCm platform (#35719)
[ROCm][Perf] Enable `sparse_mla`'s cudagraph on ROCm platform (#35719) Signed-off-by: ganyi <ygan@amd.com>
vllm/v1/attention/backends/mla/rocm_aiter_mla_sparse.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from dataclasses import dataclass from typing import TYPE_CHECKING, ClassVar import numpy as np import torch from vllm._aiter_ops import rocm_aiter_ops from vllm.config import VllmConfig from vllm.config.cache ...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from dataclasses import dataclass from typing import TYPE_CHECKING, ClassVar import numpy as np import torch from vllm._aiter_ops import rocm_aiter_ops from vllm.config import VllmConfig from vllm.config.cache ...
--- vllm/v1/attention/backends/mla/rocm_aiter_mla_sparse.py +++ vllm/v1/attention/backends/mla/rocm_aiter_mla_sparse.py @@ -151,7 +151,9 @@ class ROCMAiterMLASparseMetadataBuilder( AttentionMetadataBuilder[ROCMAiterMLASparseMetadata] ): - _cudagraph_support: ClassVar[AttentionCGSupport] = AttentionCGSupport.N...
3
1
2
[]
[ "ROCM" ]
[]
Optimize this triton kernel file from vllm (vllm/v1/attention/backends/mla/rocm_aiter_mla_sparse.py). Goal: [ROCm][Perf] Enable `sparse_mla`'s cudagraph on ROCm platform Target hardware: ROCM Target models: unspecified Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright c...
<!-- markdownlint-disable --> ## Purpose This PR re-enabled cudagraph for models that adopt sparse_mla backend on ROCm platform since the fixed PR in aiter have updated in newest nightly docker. ## Test Plan gsm8k ## Test Result gsm8k with 20shot ``` |Tasks|Version| Filter |n-shot| Metric | |Value | |...
[]
null
null
vllm
82f3f30e266e24b26c46916a8c9daaea7d5e32bd
2026-03-11T00:14:35+08:00
35,719
https://github.com/vllm-project/vllm/pull/35719
[ROCm][Perf] Enable `sparse_mla`'s cudagraph on ROCm platform (#35719)
[ROCm][Perf] Enable `sparse_mla`'s cudagraph on ROCm platform (#35719) Signed-off-by: ganyi <ygan@amd.com>
vllm/v1/attention/ops/rocm_aiter_mla_sparse.py
triton
Apache-2.0
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import functools import importlib import torch from vllm.forward_context import get_forward_context from vllm.platforms import current_platform from vllm.triton_utils import tl, triton from vllm.v1.attention.bac...
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import functools import importlib import torch from vllm.forward_context import get_forward_context from vllm.platforms import current_platform from vllm.triton_utils import tl, triton from vllm.v1.attention.bac...
--- vllm/v1/attention/ops/rocm_aiter_mla_sparse.py +++ vllm/v1/attention/ops/rocm_aiter_mla_sparse.py @@ -327,9 +327,6 @@ aiter_paged_mqa_logits_module = None if rocm_aiter_ops.is_enabled(): aiter_paged_mqa_logits_module = paged_mqa_logits_module() - # FIXME(ganyi): Temporarily disable the aiter p...
0
3
2
[]
[ "ROCM" ]
[]
Optimize this triton kernel file from vllm (vllm/v1/attention/ops/rocm_aiter_mla_sparse.py). Goal: [ROCm][Perf] Enable `sparse_mla`'s cudagraph on ROCm platform Target hardware: ROCM Target models: unspecified Current file: ```python # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributo...
<!-- markdownlint-disable --> ## Purpose This PR re-enabled cudagraph for models that adopt sparse_mla backend on ROCm platform since the fixed PR in aiter have updated in newest nightly docker. ## Test Plan gsm8k ## Test Result gsm8k with 20shot ``` |Tasks|Version| Filter |n-shot| Metric | |Value | |...
[]
null
null