[Misc]Minor Changes about Worker (#11555)
Signed-off-by: Chenguang Li <757486878@qq.com>
This commit is contained in:
@@ -132,7 +132,6 @@ class Worker:
|
|||||||
# Execute a forward pass with dummy inputs to profile the memory usage
|
# Execute a forward pass with dummy inputs to profile the memory usage
|
||||||
# of the model.
|
# of the model.
|
||||||
self.model_runner.profile_run()
|
self.model_runner.profile_run()
|
||||||
torch.cuda.synchronize()
|
|
||||||
|
|
||||||
free_gpu_memory, _ = torch.cuda.mem_get_info()
|
free_gpu_memory, _ = torch.cuda.mem_get_info()
|
||||||
# NOTE(woosuk): Here we assume that the other processes using the same
|
# NOTE(woosuk): Here we assume that the other processes using the same
|
||||||
|
|||||||
@@ -200,7 +200,6 @@ class Worker(LocalOrDistributedWorkerBase):
|
|||||||
weights_memory_in_bytes=self.model_runner.
|
weights_memory_in_bytes=self.model_runner.
|
||||||
model_memory_usage) as result:
|
model_memory_usage) as result:
|
||||||
self.model_runner.profile_run()
|
self.model_runner.profile_run()
|
||||||
torch.cuda.synchronize()
|
|
||||||
|
|
||||||
self._assert_memory_footprint_increased_during_profiling()
|
self._assert_memory_footprint_increased_during_profiling()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user