Minor cpu performance fix and typo fix.

This commit is contained in:
Jason Antic
2021-05-27 16:48:07 -07:00
parent bcb80ca6f5
commit 17fbe6b950
+1 -2
View File
@@ -13,7 +13,7 @@ class _Device:
def is_gpu(self):
''' Returns `True` if the current device is GPU, `False` otherwise. '''
return self.current() is not DeviceID.CPU
return self.current() is not DeviceId.CPU
def current(self):
return self._current_device
@@ -26,6 +26,5 @@ class _Device:
import torch
torch.backends.cudnn.benchmark=False
os.environ['OMP_NUM_THREADS']='1'
self._current_device = device
return device