From ca3618bc698ed029c971a359f9b2b5bc1d041bb8 Mon Sep 17 00:00:00 2001 From: Daoyuan Li <94409450+DaoyuanLi2816@users.noreply.github.com> Date: Tue, 14 Jul 2026 10:10:13 -0700 Subject: [PATCH] [Doc] Sync four function docstrings with their signatures (#45437) Signed-off-by: Daoyuan Li <94409450+DaoyuanLi2816@users.noreply.github.com> Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- vllm/_aiter_ops.py | 4 ++-- vllm/_custom_ops.py | 6 +++++- vllm/model_executor/layers/quantization/utils/fp8_utils.py | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/vllm/_aiter_ops.py b/vllm/_aiter_ops.py index bed4d8254a..3c018313d0 100644 --- a/vllm/_aiter_ops.py +++ b/vllm/_aiter_ops.py @@ -2637,7 +2637,8 @@ class rocm_aiter_ops: Args: tensor: The input weight tensor to be shuffled. - layout: The block layout to use, defaults to (16, 4). + nLane: Number of lanes in the shuffle layout. + gate_up: Whether the weight is for w13 (True) or w2 (False). Returns: torch.Tensor: The shuffled tensor. @@ -2875,7 +2876,6 @@ class rocm_aiter_ops: hc_sinkhorn_eps: sinkhorn epsilon hc_post_mult_value: post-mix multiplier value sinkhorn_repeat: number of sinkhorn iterations - n_splits: split-k factor; Returns: post_mix: shape (..., hc_mult), dtype torch.float32 diff --git a/vllm/_custom_ops.py b/vllm/_custom_ops.py index bd75671ba2..0d24c1fb4e 100644 --- a/vllm/_custom_ops.py +++ b/vllm/_custom_ops.py @@ -1539,7 +1539,11 @@ def scaled_fp4_quant( Args: input: The input tensor to be quantized to FP4 input_global_scale: A scalar scaling factor for the entire tensor. - use_8x4_sf_layout: Whether to use the 8x4 or 128x4 layout for the scaling + is_sf_swizzled_layout: Whether to store the scaling factors in the + swizzled layout (default `True`). + backend: Quantization kernel backend to dispatch to. For `"trtllm"` + backends the 8x4 scale-factor layout is selected for small + batches (m <= 32) instead of the 128x4 layout. padded_n: Optional padded K dimension. When provided, the quantized output and scale tensors are allocated for ``padded_n`` diff --git a/vllm/model_executor/layers/quantization/utils/fp8_utils.py b/vllm/model_executor/layers/quantization/utils/fp8_utils.py index 49eadc5a15..83e56a4567 100644 --- a/vllm/model_executor/layers/quantization/utils/fp8_utils.py +++ b/vllm/model_executor/layers/quantization/utils/fp8_utils.py @@ -909,7 +909,7 @@ def w8a8_triton_block_scaled_mm( Bs: The per-block quantization scale for `B`. block_size: The block size for per-block quantization. It should be 2-dim, e.g., [128, 128]. - output_dytpe: The dtype of the returned tensor. + output_dtype: The dtype of the returned tensor. Returns: torch.Tensor: The result of matmul. """