Unverified Commit c34963f1 authored by Andreas Karatzas's avatar Andreas Karatzas Committed by GitHub
Browse files

[ROCm][CI] Disable skinny GEMMs in language model standard tests to fix non-determinism (#35152)


Signed-off-by: default avatarAndreas Karatzas <akaratza@amd.com>
parent f26650d6
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""Pytest configuration for vLLM language generation tests.""" """Pytest configuration for vLLM language generation tests."""
import os
import warnings import warnings
import torch import torch
...@@ -9,6 +10,23 @@ import torch ...@@ -9,6 +10,23 @@ import torch
from vllm.platforms import current_platform from vllm.platforms import current_platform
def pytest_configure(config):
"""Early ROCm configuration that must happen before test collection."""
if not current_platform.is_rocm():
return
# Disable skinny GEMM on ROCm to avoid non-deterministic results
# from atomic reductions in wvSplitKrc kernel.
# See: https://github.com/vllm-project/vllm/pull/33493#issuecomment-3906083975
os.environ["VLLM_ROCM_USE_SKINNY_GEMM"] = "0"
warnings.warn(
"ROCm: Set VLLM_ROCM_USE_SKINNY_GEMM=0 to avoid non-deterministic "
"results from skinny GEMM atomic reductions",
UserWarning,
stacklevel=1,
)
def pytest_sessionstart(session): def pytest_sessionstart(session):
"""Configure ROCm-specific settings before test session starts.""" """Configure ROCm-specific settings before test session starts."""
if not current_platform.is_rocm(): if not current_platform.is_rocm():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment