dut-recipe-generator1 / device /get_device_id.py
Shaylin Chetty
Intial commit
021e7cc
raw
history blame contribute delete
100 Bytes
import torch
def get_device_id():
if torch.cuda.is_available():
return 0
return -1