MCPcopy Create free account
hub / github.com/DeepLabCut/DeepLabCut / _gpu_to_use_to_device

Function _gpu_to_use_to_device

deeplabcut/compat.py:1988–1995  ·  view source on GitHub ↗
(gpu_to_use: int | None, device: str | None)

Source from the content-addressed store, hash-verified

1986
1987
1988def _gpu_to_use_to_device(gpu_to_use: int | None, device: str | None) -> str | None:
1989 if device is None and gpu_to_use is not None:
1990 if isinstance(gpu_to_use, int):
1991 device = f"cuda:{gpu_to_use}"
1992 else:
1993 device = gpu_to_use
1994
1995 return device
1996
1997
1998def _load_config(config: str) -> dict:

Callers 4

extract_mapsFunction · 0.85
extract_save_all_mapsFunction · 0.85
_update_deviceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected