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 4, 20:00 UTC
[Bugfix][CI] Fix `v1/kv_connector/unit/test_nixl_connector_hma.py::test_fewer_blocks_with_hma` (#40597)
Signed-off-by: NickLucche <nlucches@redhat.com>
Nicolò Lucchesi committed
Apr 22, 2026 at 15:21 UTC
33ef1941e217a2126d745caec6c6130d6aec3b31
1 file changed
+7
-2
tests/v1/kv_connector/unit/test_nixl_connector_hma.py
+7
-2
@@ -2,9 +2,11 @@
2
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
"""Unit tests for NixlConnectorScheduler with HMA and Mamba N-1 prefill."""
4
5
+import gc
6
from unittest.mock import patch
7
8
import pytest
9
+import torch
10
11
from vllm import LLM, SamplingParams
12
from vllm.config import KVTransferConfig
@@ -196,12 +198,13 @@ def test_fewer_blocks_with_hma(monkeypatch, model_name, sw_size):
198
llm_kwargs = {
199
"model": model_name,
200
"enforce_eager": True,
199
- "gpu_memory_utilization": 0.47,
201
+ "gpu_memory_utilization": 0.3,
202
"kv_transfer_config": kv_transfer_config,
203
"max_model_len": 2048,
204
+ "max_num_seqs": 1,
205
# NOTE: Make sure HMA is enabled
206
"disable_hybrid_kv_cache_manager": False,
204
- "max_num_batched_tokens": 1024,
207
+ "max_num_batched_tokens": 2048,
208
"enable_prefix_caching": False,
209
"block_size": block_size,
210
}
@@ -248,6 +251,8 @@ def test_fewer_blocks_with_hma(monkeypatch, model_name, sw_size):
251
assert len(group_block_ids) == expected_num_remote_blocks
252
253
def run_test_and_cleanup():
254
+ gc.collect()
255
+ torch.accelerator.empty_cache()
256
llm = LLM(**llm_kwargs)
257
try:
258
run_hma_test(llm)