[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
@@ -2,6 +2,7 @@
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
from enum import IntEnum
from functools import lru_cache
from typing import TYPE_CHECKING
import torch
@@ -29,6 +30,9 @@ from vllm.model_executor.layers.quantization.utils.quant_utils import (
kMxfp4Static,
)
if TYPE_CHECKING:
from aiter import ActivationType
class QuantMethod(IntEnum):
# This allows interfacing with AITER QuantType Enum
@@ -253,6 +257,7 @@ def rocm_aiter_fused_experts(
# Gate/up interleave hint; only the SWIGLUOAI activations override it.
activation_interleave = None
activation_method: ActivationMethod | ActivationType
if activation == MoEActivation.SILU:
activation_method = ActivationMethod.SILU
elif activation == MoEActivation.GELU:
@@ -266,6 +271,8 @@ def rocm_aiter_fused_experts(
activation_method = rocm_aiter_ops.get_aiter_activation_type("situ")
else:
raise ValueError(f"Unsupported activation: {activation}")
if activation_method is None:
raise ValueError(f"AITER does not support activation: {activation}")
# All AITER Fused MoE kernels are expecting the following datatypes
topk_weights = topk_weights.to(torch.float32)