[Perf] Move gc.freeze logic from EngineCoreProc to EngineCore for better coverage (#27896)
Signed-off-by: Jialin Ouyang <Jialin.Ouyang@gmail.com>
This commit is contained in:
@@ -1483,6 +1483,9 @@ def destroy_distributed_environment():
|
||||
|
||||
|
||||
def cleanup_dist_env_and_memory(shutdown_ray: bool = False):
|
||||
# Ensure all objects are not freezed before cleanup
|
||||
gc.unfreeze()
|
||||
|
||||
destroy_model_parallel()
|
||||
destroy_distributed_environment()
|
||||
if shutdown_ray:
|
||||
|
||||
Reference in New Issue
Block a user