mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-15 06:04:57 +08:00
remove duplicate code within cleanup_dist_env_and_memory (#22147)
Signed-off-by: Andy Xie <andy.xning@gmail.com>
This commit is contained in:
parent
0d7db16a92
commit
c2e75b3c11
@ -1238,8 +1238,6 @@ def destroy_distributed_environment():
|
|||||||
def cleanup_dist_env_and_memory(shutdown_ray: bool = False):
|
def cleanup_dist_env_and_memory(shutdown_ray: bool = False):
|
||||||
destroy_model_parallel()
|
destroy_model_parallel()
|
||||||
destroy_distributed_environment()
|
destroy_distributed_environment()
|
||||||
with contextlib.suppress(AssertionError):
|
|
||||||
torch.distributed.destroy_process_group()
|
|
||||||
if shutdown_ray:
|
if shutdown_ray:
|
||||||
import ray # Lazy import Ray
|
import ray # Lazy import Ray
|
||||||
ray.shutdown()
|
ray.shutdown()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user