mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-27 02:41:19 +08:00
[Logging] Remove TORCH_NCCL_AVOID_RECORD_STREAMS to squash a warning (#25532)
Signed-off-by: Tyler Michael Smith <tyler@neuralmagic.com>
This commit is contained in:
parent
0754ac4c49
commit
2e5df88c92
@ -155,14 +155,6 @@ class Worker(WorkerBase):
|
|||||||
|
|
||||||
def init_device(self):
|
def init_device(self):
|
||||||
if self.device_config.device.type == "cuda":
|
if self.device_config.device.type == "cuda":
|
||||||
# torch.distributed.all_reduce does not free the input tensor until
|
|
||||||
# the synchronization point. This causes the memory usage to grow
|
|
||||||
# as the number of all_reduce calls increases. This env var disables
|
|
||||||
# this behavior.
|
|
||||||
# Related issue:
|
|
||||||
# https://discuss.pytorch.org/t/cuda-allocation-lifetime-for-inputs-to-distributed-all-reduce/191573
|
|
||||||
os.environ["TORCH_NCCL_AVOID_RECORD_STREAMS"] = "1"
|
|
||||||
|
|
||||||
# This env var set by Ray causes exceptions with graph building.
|
# This env var set by Ray causes exceptions with graph building.
|
||||||
os.environ.pop("NCCL_ASYNC_ERROR_HANDLING", None)
|
os.environ.pop("NCCL_ASYNC_ERROR_HANDLING", None)
|
||||||
self.device = torch.device(f"cuda:{self.local_rank}")
|
self.device = torch.device(f"cuda:{self.local_rank}")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user