File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -532,7 +532,7 @@ def __new__(cls):
532
532
else :
533
533
_logger .warning ("No GPU device" )
534
534
535
- cls ._curr_device = None
535
+ cls ._curr_device = DeviceEnv ( cls . _runtime [ 0 ][ 0 ]. curr_env )
536
536
537
537
return obj
538
538
@@ -555,10 +555,6 @@ def has_gpu_device(self):
555
555
556
556
return Runtime ._gpu_device is not None
557
557
558
- def has_current_device (self ):
559
- ''' Returns True if GPU or CPU context manager is being used.'''
560
-
561
- return Runtime ._curr_device is not None
562
558
563
559
def get_cpu_device (self ):
564
560
''' Returns a cdata wrapper for the first available OpenCL
@@ -611,7 +607,6 @@ def dump(self):
611
607
runtime = Runtime ()
612
608
has_cpu_device = runtime .has_cpu_device ()
613
609
has_gpu_device = runtime .has_gpu_device ()
614
- has_current_device = runtime .has_current_device ()
615
610
616
611
#------- Global Functions
617
612
You can’t perform that action at this time.
0 commit comments