Skip to content

vllm.models.minimax_m3.amd.akr_config

Which MiniMax-M3.1 routes run amd_kernels (kernel_config.amd_kernels): all by default on ROCm gfx950 with the package installed.

Functions:

  • on –

    Whether route (one of ROUTES) runs amd_kernels.

  • routes –

    The routes on in this process, read from the current vLLM config at the first

on(route)

Whether route (one of ROUTES) runs amd_kernels.

Source code in vllm/models/minimax_m3/amd/akr_config.py
def on(route: str) -> bool:
    """Whether `route` (one of `ROUTES`) runs amd_kernels."""
    return route in routes()

routes()

The routes on in this process, read from the current vLLM config at the first call under one (model build) and kept.

Source code in vllm/models/minimax_m3/amd/akr_config.py
def routes() -> frozenset[str]:
    """The routes on in this process, read from the current vLLM config at the first
    call under one (model build) and kept."""
    global _routes
    if _routes is not None:
        return _routes
    from vllm.config import get_current_vllm_config_or_none

    cfg = get_current_vllm_config_or_none()
    akr = None if cfg is None else cfg.kernel_config.amd_kernels
    on: set[str] = set()
    if (akr is None or akr.enabled) and _available():
        on = set(ROUTES) - set(() if akr is None else akr.disabled_routes)
        for r in ROUTES:
            if r in on and not set(_NEEDS.get(r, ())) <= on:
                on.discard(r)
    result = frozenset(on)
    if cfg is not None:
        _routes = result
        logger.info(
            "amd_kernels routes: %s", ", ".join(r for r in ROUTES if r in on) or "none"
        )
    return result