MCPcopy Create free account
hub / github.com/RenderKit/oidn / get_default_device

Function get_default_device

training/config.py:44–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42# Parses the config from the command line arguments
43def parse_args(cmd=None, description=None):
44 def get_default_device():
45 if torch.cuda.is_available():
46 return 'cuda'
47 elif torch.backends.mps.is_available():
48 return 'mps'
49 else:
50 return 'cpu'
51
52 if cmd is None:
53 cmd, _ = os.path.splitext(os.path.basename(sys.argv[0]))

Callers 1

parse_argsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected