[Misc] Consolidate csrc shared headers and prune dead code (#60721)

Signed-off-by: mgoin <mgoin64@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Misha Goin
2026-10-12 09:46:22 -07:00
committed by GitHub
co-authored by Claude
parent e0317b28ce
commit d79b52b182
242 changed files with 2783 additions and 3638 deletions
@@ -28,7 +28,7 @@ from vllm.distributed.utils import is_weak_contiguous # noqa: E402, F401
class QuickReduceRegime(Enum):
# Keep integer ids aligned with csrc/quickreduce/quick_reduce.h
# Keep integer ids aligned with csrc/rocm/quickreduce/quick_reduce.h
FP = 0
INT8 = 1
INT6 = 2
@@ -104,7 +104,8 @@ class CutlassInt8ScaledMMLinearKernel(Int8ScaledMMLinearKernel):
# azp_adj is the AZP adjustment term, used to account for weights.
# It does not depend on scales or azp, so it is the same for
# static and dynamic quantization.
# For more details, see csrc/quantization/w8a8/cutlass/Epilogues.md
# For more details, see
# csrc/quantization/w8a8/cutlass/Epilogues.md
# https://github.com/vllm-project/vllm/blob/main/csrc/quantization/w8a8/cutlass/Epilogues.md
if not config.input_symmetric:
weight = getattr(layer, w_q_name)
+2 -1
View File
@@ -68,7 +68,8 @@ class FusedQKVRMSNormKernel(VllmTritonJitKernel["FusedQKVRMSNormKernel.CompileKe
weight_ptr = kv_weight_ptr
row_out = kv_out_ptr + token_idx * kv_out_stride
# RMSNorm in fp32 throughout — matches csrc/layernorm_kernels.cu's
# RMSNorm in fp32 throughout — matches
# csrc/layernorm_kernels.cu's
# `(scalar_t)(x * s_variance * w)` and DeepseekV4's compressor kernel, which
# keep x, rrms, and w all in fp32 and perform a single cast at store.
block = tl.arange(0, BLOCK_SIZE)
+1 -1
View File
@@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""ROCm entry point for the fused Kimi-K3 KDA chunk kernel.
The kernel in ``csrc/libtorch_stable/kimi_k3/fused_kda_chunk_kernel_rocm.cu``
The kernel in ``csrc/kimi_k3/fused_kda_chunk_kernel_rocm.cu``
replaces the chunk-state recurrence and the output GEMM of the Triton chunk
path with a single launch that keeps the per-chunk state in registers, so the
``[chunks, H, V, K]`` state tensor and the recomputed values never reach HBM.
+1 -1
View File
@@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""ROCm entry points for the fused Kimi-K3 KDA decode kernel.
The kernel in ``csrc/libtorch_stable/kimi_k3/fused_kda_decode_kernel_rocm.cu``
The kernel in ``csrc/kimi_k3/fused_kda_decode_kernel_rocm.cu``
replaces, for a pure non-speculative decode batch, the three Triton launches
and two copies the AMD KDA layer otherwise runs per layer: the packed causal
conv1d update, the recurrent delta-rule step, and the gated output RMSNorm.
@@ -3,7 +3,7 @@
"""Fused MLA prefill and decode epilogues for Kimi-K3.
Thin wrappers over the CUDA ops in
``csrc/libtorch_stable/fused_kimi_k3_mla_key_concat_kv_cache_kernel.cu``, which
``csrc/fused_kimi_k3_mla_key_concat_kv_cache_kernel.cu``, which
mirror ``fused_deepseek_v4_qnorm_rope_kv_rope_full_cache_{bf16,fp8}_insert``.
- ``fused_mla_key_concat_kv_cache_insert`` (bf16): optionally apply RoPE,
@@ -118,7 +118,7 @@ token's KV cache is 352 Bytes, structured as:
elements, stored permuted (an 8x4 -> 4x8 transpose: the scale for element
block `s` lives at byte `8 * (s & 3) + (s >> 2)`) so that the 8 scales one
FlashMLA dequant thread needs are contiguous. See the layout comment in
`csrc/libtorch_stable/cache_kernels.cu`.
`csrc/cache_kernels.cu`.
"""
+1 -1
View File
@@ -712,7 +712,7 @@ class HiSparseRuntime:
"HiSparse requires its compiled _C_cache_ops CUDA kernels "
"(host-resident decode has no Python fallback). Rebuild vLLM "
"from source so "
"csrc/libtorch_stable/hisparse_kernels.cu is included."
"csrc/hisparse_kernels.cu is included."
)
self.max_num_reqs = max_num_reqs
self.row_width = row_width