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, 06:00 UTC
[CI][ROCm] Fix test_correctness_sliding_window (#29243)
Signed-off-by: Divakar Verma <divakar.verma@amd.com> Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
Divakar Verma committed
Dec 1, 2025 at 22:53 UTC
a690fb5bd6773128fc82bf03f612156b387d5b61
1 file changed
+9
-1
tests/v1/e2e/test_correctness_sliding_window.py
+9
-1
@@ -5,6 +5,7 @@ from dataclasses import dataclass
5
import pytest
6
7
from vllm import LLM, SamplingParams
8
+from vllm.platforms import current_platform
9
10
from ...utils import check_answers, prep_prompts
11
@@ -40,10 +41,17 @@ def test_sliding_window_retrieval(
41
If we tell it upfront which we are going to be looking for, then
42
it answers correctly (mostly).
43
"""
44
+ # NOTE: For ROCm, we have to enforce eager mode to use custom kernel
45
+ # implementation of GELU with tanh approximation, as PyTorch's native
46
+ # implementation is currently unstable with torch.compile and produces garbage.
47
+ enforce_eager = current_platform.is_rocm()
48
+
49
test_config = model_config[model]
50
51
llm = LLM(
46
- model=model, disable_hybrid_kv_cache_manager=disable_hybrid_kv_cache_manager
52
+ model=model,
53
+ disable_hybrid_kv_cache_manager=disable_hybrid_kv_cache_manager,
54
+ enforce_eager=enforce_eager,
55
)
56
sampling_params = SamplingParams(temperature=0.0, max_tokens=100)
57