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():
4848 d2 = dpctl .select_gpu_device ()
4949 assert d1 == d2
5050 d1 .print_device_info ()
51- except ValueError :
51+ except dpctl . SyclDeviceCreationError :
5252 print ("A GPU device is not available on the system" )
5353
5454
Original file line number Diff line number Diff line change @@ -28,13 +28,13 @@ def select_using_filter():
2828 try :
2929 d1 = dpctl .SyclDevice ("cpu" )
3030 d1 .print_device_info ()
31- except ValueError :
31+ except dpctl . SyclDeviceCreationError :
3232 print ("A CPU type device is not available on the system" )
3333
3434 try :
3535 d1 = dpctl .SyclDevice ("opencl:cpu:0" )
3636 d1 .print_device_info ()
37- except ValueError :
37+ except dpctl . SyclDeviceCreationError :
3838 print ("An OpenCL CPU driver needs to be installed on the system" )
3939
4040 d1 = dpctl .SyclDevice ("0" )
@@ -43,7 +43,7 @@ def select_using_filter():
4343 try :
4444 d1 = dpctl .SyclDevice ("gpu" )
4545 d1 .print_device_info ()
46- except ValueError :
46+ except dpctl . SyclDeviceCreationError :
4747 print ("A GPU type device is not available on the system" )
4848
4949
You can’t perform that action at this time.
0 commit comments