Skip to content

vllm.models.deepseek_v32.nvidia.glm52_low_latency_gemm

GLM-5.2 decode GEMM selection for unquantized BF16 on SM103.

Functions:

  • build_glm52_plan

    Plan for a weight the walk below cannot reach (a plain nn.Linear).

build_glm52_plan(weight, dtype)

Plan for a weight the walk below cannot reach (a plain nn.Linear).

Source code in vllm/models/deepseek_v32/nvidia/glm52_low_latency_gemm.py
def build_glm52_plan(
    weight: torch.Tensor | None, dtype: torch.dtype
) -> dict[int, ResolvedCall] | None:
    """Plan for a weight the walk below cannot reach (a plain ``nn.Linear``)."""
    if dtype != torch.bfloat16 or not _is_sm103():
        return None
    if weight is None or weight.dim() != 2 or weight.dtype != torch.bfloat16:
        return None
    spec = GLM52_PROJECTIONS.get(tuple(weight.shape))
    if spec is None:
        return None
    _request_warmup(dtype, {config for _, config in spec.cute_configs})
    return spec.build_plan()