diff --git a/dpctl/ocldrv.py b/dpctl/ocldrv.py index 904a933568..1156565466 100644 --- a/dpctl/ocldrv.py +++ b/dpctl/ocldrv.py @@ -532,7 +532,7 @@ def __new__(cls): else: _logger.warning("No GPU device") - cls._curr_device = None + cls._curr_device = DeviceEnv(cls._runtime[0][0].curr_env) return obj @@ -555,10 +555,6 @@ def has_gpu_device(self): return Runtime._gpu_device is not None - def has_current_device(self): - ''' Returns True if GPU or CPU context manager is being used.''' - - return Runtime._curr_device is not None def get_cpu_device(self): ''' Returns a cdata wrapper for the first available OpenCL @@ -611,7 +607,6 @@ def dump(self): runtime = Runtime() has_cpu_device = runtime.has_cpu_device() has_gpu_device = runtime.has_gpu_device() -has_current_device = runtime.has_current_device() #------- Global Functions