3825e99ee36bd237d11f702af93a2acba4496c9b,utils/torch_utils.py,,select_device,#Any#,10
Before Change
cuda = torch.cuda.is_available()
device = torch.device("cuda:0" if cuda else "cpu")
if torch.cuda.device_count() > 1:
device = torch.device("cuda" if cuda else "cpu")
print("Found %g GPUs" % torch.cuda.device_count())
// print("Multi-GPU Issue: https://github.com/ultralytics/yolov3/issues/21")
// torch.cuda.set_device(0) // OPTIONAL: Set your GPU if multiple available
// print("Using ", torch.cuda.device_count(), " GPUs")
print("Using %s %s\n" % (device.type, torch.cuda.get_device_properties(0) if cuda else ""))
return device
After Change
cuda = False if force_cpu else torch.cuda.is_available()
device = torch.device("cuda:0" if cuda else "cpu")
if not cuda:
print("Using CPU")
if cuda:
c = 1024 ** 2 // bytes to MB
ng = torch.cuda.device_count()
x = [torch.cuda.get_device_properties(i) for i in range(ng)]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: ultralytics/yolov3
Commit Name: 3825e99ee36bd237d11f702af93a2acba4496c9b
Time: 2019-04-08
Author: glenn.jocher@ultralytics.com
File Name: utils/torch_utils.py
Class Name:
Method Name: select_device
Project Name: open-mmlab/mmcv
Commit Name: b85136772d4a78a3cdc7779301f984ad0dd21235
Time: 2019-04-14
Author: yhcao6@gmail.com
File Name: mmcv/runner/hooks/logger/text.py
Class Name: TextLoggerHook
Method Name: log
Project Name: SeanNaren/deepspeech.pytorch
Commit Name: 213d55dbdaa82a8d5edeede2a821fe2163881eb7
Time: 2020-07-14
Author: sean.narenthiran@digitalreasoning.com
File Name: transcribe.py
Class Name:
Method Name: