@@ -40,6 +40,12 @@ def test_engine_core(monkeypatch):
40
40
41
41
with monkeypatch .context () as m :
42
42
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' )
43
49
"""Setup the EngineCore."""
44
50
engine_args = EngineArgs (model = MODEL_NAME )
45
51
vllm_config = engine_args .create_engine_config ()
@@ -146,6 +152,12 @@ def test_engine_core_advanced_sampling(monkeypatch):
146
152
"""
147
153
with monkeypatch .context () as m :
148
154
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' )
149
161
"""Setup the EngineCore."""
150
162
engine_args = EngineArgs (model = MODEL_NAME )
151
163
vllm_config = engine_args .create_engine_config ()
0 commit comments