MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / barrier

Method barrier

lightx2v/server/services/distributed_utils.py:85–90  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

83 logger.info(f"Rank {self.rank} distributed environment cleaned up")
84
85 def barrier(self):
86 if self.is_initialized and dist.is_initialized():
87 if torch.cuda.is_available() and dist.get_backend() == "nccl":
88 dist.barrier(device_ids=[torch.cuda.current_device()])
89 else:
90 dist.barrier()
91
92 def is_rank_zero(self) -> bool:
93 return self.rank == 0

Callers 15

load_weightsFunction · 0.80
startMethod · 0.80
startMethod · 0.80
startMethod · 0.80
process_requestMethod · 0.80
worker_loopMethod · 0.80
run_main_liveMethod · 0.80
init_kv_cache_managerMethod · 0.80
init_kv_cache_managerMethod · 0.80
init_kv_cache_managerMethod · 0.80
run_pipelineMethod · 0.80

Calls 3

is_initializedMethod · 0.80
current_deviceMethod · 0.80
is_availableMethod · 0.45

Tested by

no test coverage detected