gpu命令cuda命令

# device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
os.environ["CUDA_VISIBLE_DEVICES"]="0,1"
# test=torch.cuda.is_available()
print(torch.cuda.device_count())
print(torch.cuda.get_device_name(1))
print(torch.cuda.current_device())
torch.cuda.set_device(0)

 
 

转载于:https://www.cnblogs.com/jfdwd/p/11468141.html

最新回复(0)
/jishuh5p_2Fbz1GqPs0soIhnmXlsTmLsTd_2BP2B03mqKrQ_3D_3D4794779
8 简首页