Improve weight loading and code style (#3174)
This commit is contained in:
@@ -218,7 +218,7 @@ class ModelRunner:
|
||||
|
||||
def init_torch_distributed(self):
|
||||
logger.info("Init torch distributed begin.")
|
||||
# Init torch distributed
|
||||
|
||||
torch.get_device_module(self.device).set_device(self.gpu_id)
|
||||
if self.device == "cuda":
|
||||
backend = "nccl"
|
||||
|
||||
Reference in New Issue
Block a user