@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 506ed87e87
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 12, 03:30 UTC

[ROCm][CI][Bugfix] Disable Flash/MemEfficient SDP on ROCm to avoid HF Transformers accuracy issues (#29909)

Signed-off-by: Andreas Karatzas <akaratza@amd.com>

Andreas Karatzas committed Dec 2, 2025 at 20:36 UTC 506ed87e876e9dca3c64ac83e21051c02e9cb2e3
3 files changed +22 -7
docker/Dockerfile.rocm
+1 -5
@@ -65,7 +65,6 @@ COPY --from=build_vllm ${COMMON_WORKDIR}/vllm/tests /tests
65 COPY --from=build_vllm ${COMMON_WORKDIR}/vllm/examples /examples
66 COPY --from=build_vllm ${COMMON_WORKDIR}/vllm/docker/Dockerfile.rocm /docker/
67 COPY --from=build_vllm ${COMMON_WORKDIR}/vllm/.buildkite /.buildkite
68 -# Centralized v1 package - copied to both test and final stages
68 COPY --from=build_vllm ${COMMON_WORKDIR}/vllm/vllm/v1 /vllm_v1
69
70 # -----------------------
@@ -98,7 +97,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
97 uv pip install --system hf_transfer
98 ENV HF_HUB_ENABLE_HF_TRANSFER=1
99
101 -# Copy in the v1 package
100 +# Copy in the v1 package (for python-only install test group)
101 COPY --from=export_vllm /vllm_v1 /usr/local/lib/python${PYTHON_VERSION}/dist-packages/vllm/v1
102
103 # Source code is used in the `python_only_compile.sh` test
@@ -130,9 +129,6 @@ RUN --mount=type=bind,from=export_vllm,src=/,target=/install \
129 && pip uninstall -y vllm \
130 && uv pip install --system *.whl
131
133 -# Copy in the v1 package
134 -COPY --from=export_vllm /vllm_v1 /usr/local/lib/python${PYTHON_VERSION}/dist-packages/vllm/v1
135 -
132 ARG COMMON_WORKDIR
133
134 # Copy over the benchmark scripts as well
requirements/rocm-test.txt
+2 -2
@@ -70,8 +70,8 @@ torchgeo==0.7.0
70 mteb==2.1.2
71
72 # Data processing
73 -xgrammar @ git+https://github.com/mlc-ai/xgrammar.git@eafd4db51b78acc64b3f0764ef27dfd206c28628
74 - # Test async scheduling
73 +xgrammar==0.1.27
74 +# Test async scheduling
75
76 # Utilities
77 num2words==0.5.14
tests/models/multimodal/generation/conftest.py new
+19
@@ -0,0 +1,19 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3 +"""Pytest configuration for vLLM tests."""
4 +
5 +import torch
6 +
7 +from vllm.platforms import current_platform
8 +
9 +
10 +def pytest_configure(config):
11 + """Disable Flash/MemEfficient SDP on ROCm to avoid HF
12 + Transformers accuracy issues.
13 + """
14 + if not current_platform.is_rocm():
15 + return
16 +
17 + torch.backends.cuda.enable_flash_sdp(False)
18 + torch.backends.cuda.enable_mem_efficient_sdp(False)
19 + torch.backends.cuda.enable_math_sdp(True)