Skip to content

Commit 546e75f

Browse files
committed
oom
Signed-off-by: Chen Zhang <[email protected]>
1 parent 2cb84f2 commit 546e75f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/v1/engine/test_engine_core.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ def test_engine_core(monkeypatch):
4040

4141
with monkeypatch.context() as m:
4242
m.setenv("VLLM_USE_V1", "1")
43+
import torch
44+
total_allocated_bytes = torch.cuda.mem_get_info(
45+
)[1] - torch.cuda.mem_get_info()[0]
46+
print("allocated", total_allocated_bytes / (2**30), 'GB', "free",
47+
torch.cuda.mem_get_info()[0] / (2**30), 'GB', "total",
48+
torch.cuda.mem_get_info()[1] / (2**30), 'GB')
4349
"""Setup the EngineCore."""
4450
engine_args = EngineArgs(model=MODEL_NAME)
4551
vllm_config = engine_args.create_engine_config()
@@ -146,6 +152,12 @@ def test_engine_core_advanced_sampling(monkeypatch):
146152
"""
147153
with monkeypatch.context() as m:
148154
m.setenv("VLLM_USE_V1", "1")
155+
import torch
156+
total_allocated_bytes = torch.cuda.mem_get_info(
157+
)[1] - torch.cuda.mem_get_info()[0]
158+
print("allocated", total_allocated_bytes / (2**30), 'GB', "free",
159+
torch.cuda.mem_get_info()[0] / (2**30), 'GB', "total",
160+
torch.cuda.mem_get_info()[1] / (2**30), 'GB')
149161
"""Setup the EngineCore."""
150162
engine_args = EngineArgs(model=MODEL_NAME)
151163
vllm_config = engine_args.create_engine_config()

0 commit comments

Comments
 (0)