[Bugfix] test_batch_inference_correctness now uses batch invariance (#48040)
Co-authored-by: Tyler Michael Smith <tlrmchlsmth@gmail.com>
Morrison Turnansky committed
Aug 21, 2026 at 12:06 UTC
1183f04b74b1a0b6db91ae992ebbc1ea89050cac
1 file changed
+3
-3
tests/v1/e2e/spec_decode/draft_model/test_lora.py
+3
-3
@@ -8,6 +8,7 @@ This script contains:
8
import pytest
9
import torch
10
11
+import vllm.envs as envs
12
from vllm import SamplingParams
13
from vllm.config import CompilationConfig
14
from vllm.lora.request import LoRARequest
@@ -64,9 +65,8 @@ def test_batch_inference_correctness(
65
model_setup: (method, model_name, spec_model_name, lora_path, tp_size)
66
"""
67
with monkeypatch.context() as m:
67
- # Disable randomness
68
- if current_platform.is_cuda():
69
- m.setenv("CUBLAS_WORKSPACE_CONFIG", ":4096:8")
68
+ m.setenv("VLLM_BATCH_INVARIANT", "1")
69
+ m.setattr(envs, "VLLM_BATCH_INVARIANT", True)
70
set_random_seed(SEED)
71
m.setattr(torch.backends.cudnn, "benchmark", False)
72
m.setattr(torch.backends.cudnn, "deterministic", True)