[MyPy][2/N] Fix mypy errors in small tests/ dirs (#51043)

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Martin Hickey
2026-09-29 21:27:45 +01:00
committed by GitHub
co-authored by Harry Mellor Claude Opus 5.5
parent a96ee5935d
commit 5dd693122c
71 changed files with 491 additions and 301 deletions
@@ -11,6 +11,7 @@ import pytest
import torch
from vllm import _custom_ops as ops
from vllm.model_executor.layers.linear import LinearBase
from vllm.model_executor.layers.quantization.utils.marlin_utils import (
GPTQ_MARLIN_TILE,
apply_gptq_marlin_linear,
@@ -524,13 +525,15 @@ def test_check_marlin_supports_layer_allow_tile_padding():
)
# Tile-misaligned but group-aligned: rejected strictly, allowed w/ padding
layer = _FakeLinear(4640, 512, input_size=2048)
layer: LinearBase = _FakeLinear( # type: ignore[assignment]
4640, 512, input_size=2048
)
assert not check_marlin_supports_layer(layer, 128)
assert check_marlin_supports_layer(layer, 128, allow_tile_padding=True)
assert check_marlin_supports_layer(layer, -1, allow_tile_padding=True)
# A group straddling the TP shard cannot be fixed by padding
layer = _FakeLinear(4608, 4672, input_size=18688)
layer = _FakeLinear(4608, 4672, input_size=18688) # type: ignore[assignment]
assert not check_marlin_supports_layer(layer, 128, allow_tile_padding=True)