Auto3D.model_factory.get_device

Auto3D.model_factory.get_device(gpu_idx: int | None = None, use_gpu: bool = True) device

Get the appropriate torch device.

Parameters:
  • gpu_idx – GPU index to use. None for automatic selection.

  • use_gpu – Whether to use GPU if available.

Returns:

torch.device for the selected device.