Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
fca1511
[sync] [Bugfix][Multimodal] Fix video temporal padding estimates (#49…
AlpinDale Jul 29, 2026
c43a4b5
[sync] [ROCm][Bugfix] Sanitize AITER paged-MQA logits before sparse t…
AlpinDale Jul 29, 2026
8fd92b1
[sync] [BugFix] Fix clang spinloop mwaitx include (#45532)
AlpinDale Jul 29, 2026
6c3fd72
[sync] [Rust Frontend] Extract shared tracing setup logic into `vllm-…
AlpinDale Jul 29, 2026
907ea78
[sync] [Bugfix][Spec Decode] Size DFlash query buffers for cudagraph-…
AlpinDale Jul 29, 2026
d10f05a
[sync] [Model] Add Kimi K3 support: Rust frontend [1/2] (#50104)
AlpinDale Jul 29, 2026
0c91ec2
[sync] perf: dispatch non-grouped bias-less topk routing methods to f…
AlpinDale Jul 29, 2026
8c70aef
[sync] [Perf] Zero-copy torch.Tensor pickling in shm_broadcast Messag…
AlpinDale Jul 29, 2026
f7ce99f
[sync] [Test] Make EPD correctness tests configurable for XPU (#50110)
AlpinDale Jul 29, 2026
4878509
[sync] [MXFP8][ROCm] Fix MXFP8 MoE backend selection (#49747)
AlpinDale Jul 29, 2026
5a81c92
[sync] [ROCm][CI] Stabilize ROCm audio streaming test (#50163)
AlpinDale Jul 29, 2026
a28ddfb
[sync] [CI][NIXL] Fix flaky DP+EP test port conflict (#50171)
AlpinDale Jul 29, 2026
874dc32
[sync] [Bugfix] Fix /wake_up crash on hybrid models (Mamba/DeltaNet) …
AlpinDale Jul 29, 2026
ebb8534
[sync] [BugFix] Stop dummy runs from writing mamba state through stal…
AlpinDale Jul 29, 2026
820c72d
[sync] [Model] Add Inkling compressed-tensors dynamic FP8 support (#4…
AlpinDale Jul 29, 2026
0663b5a
[sync] [ROCm][CI] Stabilize ngram and suffix correctness test (#50190)
AlpinDale Jul 29, 2026
a4aa34b
[sync] [CompressedTensors] FP4 Qutlass Integration (#43229)
AlpinDale Jul 29, 2026
7036fc3
[sync] Integrate CuTeDSL MoE for ReLU2 NVFP4 (#49580)
AlpinDale Jul 29, 2026
64ced63
[sync] [KV Connector] Support NIXL P/D for hybrid MLA+SSM models (#49…
AlpinDale Jul 29, 2026
7674166
[sync] [Frontend][Core] Standardize request error handling with VLLME…
AlpinDale Jul 29, 2026
c430ed0
[sync] [CI][ROCm] Stabilize Qwen2-VL LoRA test (#50161)
AlpinDale Jul 29, 2026
4c18769
[sync] Add CachePolicyFactory for pluggable/external eviction policie…
AlpinDale Jul 29, 2026
8dabf89
[sync] [CPU] Fix s390x builds and update torch version in dockerfile …
AlpinDale Jul 29, 2026
1d6f627
[sync] [Test] dynamic_shapes_compilation (#49974)
AlpinDale Jul 29, 2026
0c136e3
[sync] fused_moe: add VLLM_TRITON_USE_TD tensor-descriptor path (#42436)
AlpinDale Jul 29, 2026
02dbc45
[sync] [Model] Add Kimi K3 support: model files and kernels [1/N] (#5…
AlpinDale Jul 29, 2026
eba75e5
[sync] [XPU][UT][CI] add xpu config to run gpt-oss accuracy in ut and…
AlpinDale Jul 29, 2026
2c8b48d
[sync] [CPU] Fix FP8 attention scratchpad sizing (#50194)
AlpinDale Jul 29, 2026
a288cf0
[sync] [Frontend] Reuse prefill token ids on the decode chat path for…
AlpinDale Jul 29, 2026
cb4fdc9
[sync] [Model] Add Kimi K3 support: Python frontend [2/2] (#50093)
AlpinDale Jul 29, 2026
98a66d7
[sync] [Model] Support Qwen3.5 text-only dense and MoE models (#50210)
AlpinDale Jul 29, 2026
094a384
[sync] [BugFix] eagle draft max position embeddings (#49343)
AlpinDale Jul 29, 2026
768c7a4
[sync] [Misc][Minimax-M3]add default video_processor (#50092)
AlpinDale Jul 29, 2026
f7a6d9d
[sync] [XPU] upgrade to torch 2.13 (#48677)
AlpinDale Jul 29, 2026
247b272
[sync] [EC Connector] Add has_pending_push_work (#49582)
AlpinDale Jul 29, 2026
c2f2700
[sync] [CI] Fix MXFP8 MOE backend selection tests on gfx942 (#50222)
AlpinDale Jul 29, 2026
5caeac2
[sync] [Rust Frontend] Add --limit-mm-per-prompt support (#49604)
AlpinDale Jul 29, 2026
eda6079
[sync] advance vllm-sha to 9a4e5f953
AlpinDale Jul 29, 2026
4990d52
Merge remote-tracking branch 'origin/main' into sync/vllm-2026-07-29-…
AlpinDale Jul 29, 2026
857b30b
fix(sync): reject patch backup artifacts
AlpinDale Jul 29, 2026
865826e
fix(config): type video pruning init variable
AlpinDale Jul 29, 2026
8d234a9
fix(sync): complete Kimi K3 namespace port
AlpinDale Jul 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .buildkite/check-torch-abi.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# Shrink and remove over time.
ALLOWED_UNSTABLE_LIBRARIES: tuple[str, ...] = (
"_C_fork.abi3.so",
"_flashkda_C.abi3.so",
"vllm_flash_attn/_vllm_fa2_C.abi3.so",
"vllm_flash_attn/_vllm_fa3_C.abi3.so",
"third_party/deep_gemm/_C*.so",
Expand Down
17 changes: 16 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ default_install_hook_types:
default_stages:
- pre-commit # Run locally
- manual # Run in CI
exclude: '^(reference/|shellcheck-stable/|aphrodite/third_party/.*)'
exclude: '^(reference/|shellcheck-stable/|aphrodite/third_party/.*|aphrodite/models/kimi_k3/nvidia/ops/third_party/.*|aphrodite/models/kimi_k3/amd/ops/third_party/.*)'
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.0
Expand Down Expand Up @@ -126,6 +126,21 @@ repos:
language: system
always_run: true
pass_filenames: false
- id: check-patch-artifacts
name: Reject patch backup files
entry: bash
args:
- -c
- |
artifacts="$(git ls-files | grep -E '(\.orig|\.rej|\.bak|~)$' || true)"
if [[ -n "$artifacts" ]]; then
echo "Patch backup files must not be committed:"
echo "$artifacts"
exit 1
fi
language: system
always_run: true
pass_filenames: false
- id: enforce-import-regex-instead-of-re
name: Enforce import regex as re
entry: python tools/pre_commit/enforce_regex_import.py
Expand Down
2 changes: 1 addition & 1 deletion .sync/vllm-sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8a7b3c299053efbca2669081ddf50a46b6a9d149
9a4e5f95390fc759ada001444637fe2e96a29ad9
27 changes: 26 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,11 @@ if(APHRODITE_GPU_LANG STREQUAL "CUDA" OR APHRODITE_GPU_LANG STREQUAL "HIP")
"csrc/libtorch_stable/mamba/selective_scan_fwd.cu"
"csrc/libtorch_stable/cache_kernels.cu"
"csrc/libtorch_stable/cache_kernels_fused.cu"
"csrc/libtorch_stable/custom_all_gather_reduce_scatter.cu"
"csrc/libtorch_stable/custom_all_gather_reduce_scatter_ops.cpp"
"csrc/libtorch_stable/custom_all_reduce.cu"
"csrc/libtorch_stable/fused_deepseek_v4_qnorm_rope_kv_insert_kernel.cu")
"csrc/libtorch_stable/fused_deepseek_v4_qnorm_rope_kv_insert_kernel.cu"
"csrc/libtorch_stable/fused_kimi_k3_mla_key_concat_kv_cache_kernel.cu")

if(APHRODITE_GPU_LANG STREQUAL "CUDA" AND
DEFINED CMAKE_CUDA_COMPILER_VERSION AND
Expand Down Expand Up @@ -1139,6 +1142,23 @@ if(APHRODITE_GPU_LANG STREQUAL "CUDA" OR APHRODITE_GPU_LANG STREQUAL "HIP")
set(MLA_ARCHS)
endif()

if(${CMAKE_CUDA_COMPILER_VERSION} VERSION_GREATER_EQUAL 13.0)
cuda_archs_loose_intersection(FUSED_KDA_DECODE_ARCHS
"9.0a;10.0f;12.0f" "${CUDA_ARCHS}")
endif()
if(FUSED_KDA_DECODE_ARCHS)
set(FUSED_KDA_DECODE_SRC
"csrc/libtorch_stable/kimi_k3/fused_kda_decode_kernel.cu")
set_gencode_flags_for_srcs(
SRCS "${FUSED_KDA_DECODE_SRC}"
CUDA_ARCHS "${FUSED_KDA_DECODE_ARCHS}")
set_property(SOURCE ${FUSED_KDA_DECODE_SRC} APPEND PROPERTY
COMPILE_OPTIONS "$<$<COMPILE_LANGUAGE:CUDA>:--use_fast_math>")
list(APPEND APHRODITE_STABLE_EXT_SRC "${FUSED_KDA_DECODE_SRC}")
message(STATUS
"Building fused KDA decode for archs: ${FUSED_KDA_DECODE_ARCHS}")
endif()

if(${CMAKE_CUDA_COMPILER_VERSION} VERSION_GREATER_EQUAL 13.0)
cuda_archs_loose_intersection(KIMI_K3_ATTN_RES_ARCHS
"10.0f" "${CUDA_ARCHS}")
Expand Down Expand Up @@ -1240,6 +1260,10 @@ if(APHRODITE_GPU_LANG STREQUAL "CUDA" OR APHRODITE_GPU_LANG STREQUAL "HIP")
target_compile_definitions(_C_stable_libtorch PRIVATE
APHRODITE_ENABLE_SM89_DSA=1)
endif()
if(FUSED_KDA_DECODE_ARCHS)
target_compile_definitions(_C_stable_libtorch PRIVATE
APHRODITE_ENABLE_FUSED_KDA_DECODE=1)
endif()
if(KIMI_K3_ATTN_RES_ARCHS)
target_compile_definitions(_C_stable_libtorch PRIVATE
APHRODITE_ENABLE_KIMI_K3_ATTN_RES=1)
Expand Down Expand Up @@ -1543,6 +1567,7 @@ if (APHRODITE_GPU_LANG STREQUAL "CUDA")
include(cmake/external_projects/deepgemm.cmake)
include(cmake/external_projects/fmha_sm100.cmake)
include(cmake/external_projects/flashmla.cmake)
include(cmake/external_projects/flashkda.cmake)
include(cmake/external_projects/qutlass.cmake)
include(cmake/external_projects/tml_fa4.cmake)

Expand Down
201 changes: 154 additions & 47 deletions aphrodite/_custom_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -2895,17 +2895,6 @@ def topk_softmax(
e_score_correction_bias: torch.Tensor | None = None,
is_padding: torch.Tensor | None = None,
) -> None:
if current_platform.is_xpu():
# TODO: Remove after vllm-xpu-kernels supports is_padding.
torch.ops._moe_C.topk_softmax(
topk_weights,
topk_ids,
token_expert_indices,
gating_output,
renormalize,
e_score_correction_bias,
)
return
torch.ops._moe_C.topk_softmax(
topk_weights,
topk_ids,
Expand Down Expand Up @@ -2951,20 +2940,6 @@ def topk_hash_softplus_sqrt(
hash_indices_table: torch.Tensor | None = None,
is_padding: torch.Tensor | None = None,
) -> None:
if current_platform.is_xpu():
# TODO: Remove after vllm-xpu-kernels supports is_padding.
torch.ops._moe_C.topk_softplus_sqrt(
topk_weights,
topk_indices,
token_expert_indices,
gating_output,
renormalize,
routed_scaling_factor,
e_score_correction_bias,
input_tokens,
hash_indices_table,
)
return
torch.ops._moe_C.topk_softplus_sqrt(
topk_weights,
topk_indices,
Expand Down Expand Up @@ -3232,6 +3207,52 @@ def fused_minimax_m3_qknorm_rope_kv_insert(
)


def fused_kda_decode(
x: torch.Tensor,
weight: torch.Tensor,
bias: torch.Tensor | None,
conv_state: torch.Tensor,
raw_g: torch.Tensor,
raw_beta: torch.Tensor,
A_log: torch.Tensor,
dt_bias: torch.Tensor,
state_indices: torch.Tensor,
state: torch.Tensor,
out: torch.Tensor | None = None,
lower_bound: float | None = None,
output_gate: torch.Tensor | None = None,
norm_weight: torch.Tensor | None = None,
norm_eps: float = 1e-5,
) -> torch.Tensor:
if out is None:
out = torch.empty(
1,
x.shape[0],
raw_g.shape[2],
raw_g.shape[3],
dtype=x.dtype,
device=x.device,
)
torch.ops._C.fused_kda_decode(
x,
weight,
bias,
conv_state,
raw_g,
raw_beta,
A_log,
dt_bias,
state_indices,
state,
out,
lower_bound,
output_gate,
norm_weight,
norm_eps,
)
return out


def concat_and_cache_mla(
kv_c: torch.Tensor,
k_pe: torch.Tensor,
Expand All @@ -3243,6 +3264,26 @@ def concat_and_cache_mla(
torch.ops._C_cache_ops.concat_and_cache_mla(kv_c, k_pe, kv_cache, slot_mapping, kv_cache_dtype, scale)


def concat_and_cache_mla_grouped(
kv_c: torch.Tensor,
k_pe: torch.Tensor,
kv_cache_ptrs: torch.Tensor,
slot_mapping: torch.Tensor,
block_size: int,
block_stride: int,
entry_stride: int,
) -> None:
torch.ops._C_cache_ops.concat_and_cache_mla_grouped(
kv_c,
k_pe,
kv_cache_ptrs,
slot_mapping,
block_size,
block_stride,
entry_stride,
)


def kimi_k3_attn_res(
prefix: torch.Tensor,
delta: torch.Tensor,
Expand Down Expand Up @@ -3600,6 +3641,57 @@ def all_reduce(
torch.ops._C_custom_ar.all_reduce(fa, inp, out, reg_buffer, reg_buffer_sz_bytes)


def custom_all_gather(
fa: int,
inp: torch.Tensor,
out: torch.Tensor,
reg_buffer: int,
reg_buffer_sz_bytes: int,
) -> None:
torch.ops._C_custom_ar.custom_all_gather(fa, inp, out, reg_buffer, reg_buffer_sz_bytes)


def mnnvl_lamport_all_gather(
fa: int,
inp: torch.Tensor,
out: torch.Tensor,
local_buffer: int,
multicast_buffer: int,
epoch_buffer: int,
stage_sz_bytes: int,
) -> None:
torch.ops._C_custom_ar.mnnvl_lamport_all_gather(
fa,
inp,
out,
local_buffer,
multicast_buffer,
epoch_buffer,
stage_sz_bytes,
)


def custom_reduce_scatter(
fa: int,
inp: torch.Tensor,
out: torch.Tensor,
reg_buffer: int,
reg_buffer_sz_bytes: int,
) -> None:
torch.ops._C_custom_ar.custom_reduce_scatter(fa, inp, out, reg_buffer, reg_buffer_sz_bytes)


def mnnvl_lamport_reduce_scatter(
fa: int,
inp: torch.Tensor,
out: torch.Tensor,
local_buffer: int,
epoch_buffer: int,
stage_sz_bytes: int,
) -> None:
torch.ops._C_custom_ar.mnnvl_lamport_reduce_scatter(fa, inp, out, local_buffer, epoch_buffer, stage_sz_bytes)


def dispose(fa: int) -> None:
torch.ops._C_custom_ar.dispose(fa)

Expand Down Expand Up @@ -3698,18 +3790,18 @@ def dsv3_fused_a_gemm(
output: torch.Tensor,
mat_a: torch.Tensor,
mat_b: torch.Tensor,
enable_pdl: bool = False,
) -> None:
"""DeepSeek V3 fused A GEMM (SM 9.0+, bf16 only, 1-16 tokens).
"""Low-latency fused-A-style GEMM (SM 9.0+, BF16, 1-16 tokens).

Computes output = mat_a @ mat_b.T where:
mat_a: [num_tokens, 7168] row-major bf16 (hidden states)
mat_b: [7168, 2112] column-major bf16 (weight transposed)
output: [num_tokens, 2112] row-major bf16
Computes ``output = mat_a @ mat_b`` for the compiled Kimi K3 and
DeepSeek V3 projection shapes. ``mat_a`` and ``output`` are row-major;
``mat_b`` is the column-major transposed weight. ``enable_pdl`` permits
programmatic dependent launch for callers that have validated it.

Optimized for the DeepSeek V2/V3 QKV A-projection at small batch sizes.
Requires SM 9.0+ (Hopper).
Requires SM 9.0+.
"""
torch.ops._C.dsv3_fused_a_gemm(output, mat_a, mat_b)
torch.ops._C.dsv3_fused_a_gemm(output, mat_a, mat_b, enable_pdl)


if hasattr(torch.ops._C, "weight_packed_linear"):
Expand Down Expand Up @@ -4237,6 +4329,7 @@ def cpu_attn_get_scheduler_metadata(
isa: str,
enable_kv_split: bool,
dynamic_causal: torch.Tensor | None = None,
kv_cache_dtype: str = "auto",
) -> torch.Tensor:
scheduler_metadata = torch.ops._C.get_scheduler_metadata(
num_reqs,
Expand All @@ -4251,6 +4344,7 @@ def cpu_attn_get_scheduler_metadata(
isa,
enable_kv_split,
dynamic_causal,
kv_cache_dtype,
)
return scheduler_metadata

Expand Down Expand Up @@ -4503,19 +4597,6 @@ def fusedQuantizeMx(
raise ValueError(f"invalid method {method!r}, must be 'quest' or 'abs_max'")


if hasattr(torch.ops._qutlass_C, "fusedQuantizeNvAbsMax"):

@register_fake("_qutlass_C::fusedQuantizeNvAbsMax")
def _fake_fused_quantize_nv_absmax(
a: torch.Tensor,
b: torch.Tensor,
xh_e2m1: torch.Tensor,
xh_e4m3: torch.Tensor,
global_scale: torch.Tensor,
):
return xh_e2m1, xh_e4m3


def fusedQuantizeNv(a: torch.Tensor, b: torch.Tensor, global_scale: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor]:
xh_e2m1 = torch.empty(*a.shape[:-1], a.size(-1) // 2, dtype=torch.uint8, device=a.device)

Expand All @@ -4526,7 +4607,33 @@ def fusedQuantizeNv(a: torch.Tensor, b: torch.Tensor, global_scale: torch.Tensor
padded_cols = n_col_blocks * 4
xh_e4m3 = torch.empty(padded_rows, padded_cols, dtype=torch.float8_e4m3fn, device=a.device)

return torch.ops._qutlass_C.fusedQuantizeNvAbsMax(a, b, xh_e2m1, xh_e4m3, global_scale)
safeFusedQuantizeNv(a, b, xh_e2m1, xh_e4m3, global_scale)
return xh_e2m1, xh_e4m3


@torch.library.custom_op("aphrodite::safeFusedQuantizeNv", mutates_args=("xh_e2m1", "xh_e4m3"))
def safeFusedQuantizeNv(
a: torch.Tensor,
b: torch.Tensor,
xh_e2m1: torch.Tensor,
xh_e4m3: torch.Tensor,
global_scale: torch.Tensor,
) -> None:
"""Call QUTLASS fused quantization with explicitly mutated output tensors."""
torch.ops._qutlass_C.fusedQuantizeNvAbsMax(a, b, xh_e2m1, xh_e4m3, global_scale)


if hasattr(torch.ops._qutlass_C, "fusedQuantizeNv"):

@register_fake("aphrodite::safeFusedQuantizeNv")
def _fake_fused_quantize_nv(
a: torch.Tensor,
b: torch.Tensor,
xh_e2m1: torch.Tensor,
xh_e4m3: torch.Tensor,
global_scale: torch.Tensor,
) -> None:
return


def hadacore_transform(x: torch.Tensor, inplace: bool = True) -> torch.Tensor:
Expand Down
Loading
Loading