Shortcuts

Source code for ride.utils.gpus

from typing import List, Optional, Union

from pytorch_lightning.utilities import device_parser


[docs]def parse_gpus(args_gpus: Optional[Union[int, str, List[int]]]) -> List[int]: return device_parser.parse_gpu_ids(args_gpus) or []
[docs]def parse_num_gpus(args_gpus: Optional[Union[int, str, List[int]]]) -> int: return len(parse_gpus(args_gpus))

© Copyright Copyright (c) 2020-2023, Lukas Hedegaard. Revision cce91b78.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: stable
Versions
latest
stable
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.