Skip to content

vllm.model_executor.kernels.linear.cute_dsl.gemm_rs_ar

SM100 BF16/MXFP8 GEMM with fused tensor-parallel reduce-scatter/all-reduce.

Model-neutral: any row-parallel projection whose output is reduced across TP (Kimi-K3 o_proj/down_proj, DeepSeek-V4.1 wo_b) can bind to the process-wide workspace through maybe_init_gemm_rs_ar + GemmRsAr.apply.

Classes:

  • GemmRsAr –

    Own the symmetric workspace for GEMM-RS/AR launches.

Functions:

  • init_gemm_rs_ar –

    Collectively initialize the process-wide, mode-bound GEMM-RS/AR state.

  • maybe_init_gemm_rs_ar –

    Collectively initialize the mode-bound GEMM-RS/AR state if supported.

  • warmup_gemm_rs_ar –

    Compile every reachable dispatch for the initialized GEMM-RS/AR mode.

GemmRsAr

Own the symmetric workspace for GEMM-RS/AR launches.

All TP ranks must belong to one NVLink domain for multimem instructions.

Each instance is bound to either RS or AR. A vLLM worker has one static sequence-parallel topology, so the process-wide singleton only needs one mode. Two independent mode-specific singletons would lift that restriction but duplicate the large symmetric workspace. A future mixed-mode design should instead use lightweight RS/AR frontends over one shared multicast workspace; that is outside this integration's current scope.

init_gemm_rs_ar(max_M, N, *, all_reduce=False)

Collectively initialize the process-wide, mode-bound GEMM-RS/AR state.

maybe_init_gemm_rs_ar(vllm_config, *, N, all_reduce)

Collectively initialize the mode-bound GEMM-RS/AR state if supported.

Callers gate on their own feature flag first; this checks the worker topology (SM100-family CUDA, BF16 model dtype, no ubatching, a TP size in 2-16 that divides 128) and the NVLink multicast rendezvous. Returns whether projections may bind to the kernel through get_gemm_rs_ar().can_run.

warmup_gemm_rs_ar()

Compile every reachable dispatch for the initialized GEMM-RS/AR mode.