File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ def create_gpu_device():
48
48
d2 = dpctl .select_gpu_device ()
49
49
assert d1 == d2
50
50
d1 .print_device_info ()
51
- except ValueError :
51
+ except dpctl . SyclDeviceCreationError :
52
52
print ("A GPU device is not available on the system" )
53
53
54
54
Original file line number Diff line number Diff line change @@ -28,13 +28,13 @@ def select_using_filter():
28
28
try :
29
29
d1 = dpctl .SyclDevice ("cpu" )
30
30
d1 .print_device_info ()
31
- except ValueError :
31
+ except dpctl . SyclDeviceCreationError :
32
32
print ("A CPU type device is not available on the system" )
33
33
34
34
try :
35
35
d1 = dpctl .SyclDevice ("opencl:cpu:0" )
36
36
d1 .print_device_info ()
37
- except ValueError :
37
+ except dpctl . SyclDeviceCreationError :
38
38
print ("An OpenCL CPU driver needs to be installed on the system" )
39
39
40
40
d1 = dpctl .SyclDevice ("0" )
@@ -43,7 +43,7 @@ def select_using_filter():
43
43
try :
44
44
d1 = dpctl .SyclDevice ("gpu" )
45
45
d1 .print_device_info ()
46
- except ValueError :
46
+ except dpctl . SyclDeviceCreationError :
47
47
print ("A GPU type device is not available on the system" )
48
48
49
49
You can’t perform that action at this time.
0 commit comments