Skip to content

Commit 8fd6975

Browse files
[ROCm][CI] Disable skinny GEMMs in multimodal tests to fix non-deterministic results (vllm-project#35049)
Signed-off-by: Andreas Karatzas <akaratza@amd.com>
1 parent 5d18bf8 commit 8fd6975

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/models/multimodal/conftest.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,31 @@
22
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
33
"""Pytest configuration for vLLM multimodal tests."""
44

5+
import os
56
import warnings
67

78
import torch
89

910
from vllm.platforms import current_platform
1011

1112

13+
def pytest_configure(config):
14+
"""Early ROCm configuration that must happen before test collection."""
15+
if not current_platform.is_rocm():
16+
return
17+
18+
# Disable skinny GEMM on ROCm to avoid non-deterministic results
19+
# from atomic reductions in wvSplitKrc kernel.
20+
# See: https://github.com/vllm-project/vllm/pull/33493#issuecomment-3906083975
21+
os.environ["VLLM_ROCM_USE_SKINNY_GEMM"] = "0"
22+
warnings.warn(
23+
"ROCm: Set VLLM_ROCM_USE_SKINNY_GEMM=0 to avoid non-deterministic "
24+
"results from skinny GEMM atomic reductions",
25+
UserWarning,
26+
stacklevel=1,
27+
)
28+
29+
1230
def pytest_collection_modifyitems(config, items):
1331
"""Configure ROCm-specific settings based on collected tests."""
1432
if not current_platform.is_rocm():

0 commit comments

Comments
 (0)