Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
oahzxl committed Dec 11, 2023
1 parent 1b28d5c commit 64b214f
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions colossalai/accelerator/cuda_accelerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,6 @@ def device_count(self):
"""
return torch.cuda.device_count()

def set_to_device(self, models: Any) -> Any:
"""
Send model to gpu.
:param models: nn.module or a list of module
"""
if isinstance(models, list) and len(models) > 1:
ret = []
for model in models:
ret.append(model.to(self.get_current_device()))
return ret
elif isinstance(models, list):
return models[0].to(self.get_current_device())
else:
return models.to(self.get_current_device())

def get_device_capability(self, device=None) -> Tuple[int, int]:
"""
Gets the cuda capability of a device.
Expand Down

0 comments on commit 64b214f

Please sign in to comment.