MCPcopy Create free account
hub / github.com/togethercomputer/OpenChatKit / add_device_arguments

Function add_device_arguments

training/utils/dist_args_utils.py:1–9  ·  view source on GitHub ↗
(parser)

Source from the content-addressed store, hash-verified

1def add_device_arguments(parser):
2 parser.add_argument('--use-cuda', default=True, type=lambda x: (str(x).lower() == 'true'),
3 help='if this is set to True, will use cuda to train')
4 parser.add_argument('--cuda-id', type=int, default=0, metavar='N',
5 help='cuda index, if the instance has multiple GPUs.')
6 parser.add_argument('--cuda-num', type=int, default=1, metavar='N',
7 help='number of GPUs, if the instance has multiple GPUs.')
8 parser.add_argument('--debug-mem', default=True, type=lambda x: (str(x).lower() == 'true'),
9 help='if this is set to True, we will print some memory stats.')
10
11
12def add_torch_distributed_arguments(parser):

Callers 2

mainFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected