File size: 100 Bytes
a16b6d3
 
 
 
 
 
 
1
2
3
4
5
6
7
import torch

def get_device_id():
    if torch.cuda.is_available():
        return 0

    return -1