[Docs] Add missing return annotations flagged by griffe (#54980)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Harry Mellor
2026-09-02 09:56:07 -07:00
committed by GitHub
co-authored by Claude Opus 5
parent 3b45d053b4
commit d539de1c5d
4 changed files with 18 additions and 7 deletions
+4 -4
View File
@@ -1508,7 +1508,7 @@ def cutlass_w4a8_moe_mm(
c_strides: torch.Tensor,
group_scale_strides: torch.Tensor,
maybe_schedule: str | None = None,
):
) -> None:
"""
Executes the CUTLASS-based fused-MoE grouped matrix multiplication for the
W4A8 quantization scheme. Uses group-wise quantization (INT4 -> FP8)
@@ -2065,7 +2065,7 @@ def scaled_int8_quant(
symmetric: Whether to use symmetric quantization (scale only, azp ignored).
Returns:
tuple[torch.Tensor, torch.Tensor, torch.Tensor | None] : Output int8 tensor, scales, and optionally azp.
Output int8 tensor, scales, and optionally azp.
"""
if current_platform.is_xpu():
# XPU has no _C int8 quant op; use the torch.compile reference.
@@ -3860,7 +3860,7 @@ def onednn_scaled_int8_quant(
scale: torch.Tensor | None = None,
azp: torch.Tensor | None = None,
symmetric: bool = True,
):
) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor | None]:
"""
Quantize the input tensor to int8 and return the quantized tensor and scale, and maybe azp.
@@ -3873,7 +3873,7 @@ def onednn_scaled_int8_quant(
symmetric: Whether to use symmetric quantization (scale only, azp ignored).
Returns:
tuple[torch.Tensor, torch.Tensor, torch.Tensor | None] : Output int8 tensor, scales, and optionally azp.
Output int8 tensor, scales, and optionally azp.
"""
output = torch.empty_like(input, dtype=torch.int8)
token_num = input.numel() // input.shape[-1]