@@ -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