File tree Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -633,23 +633,17 @@ def test_asarray_to_device_with_unsupported_dtype(dt):
633633 except dpctl .SyclDeviceCreationError :
634634 pytest .skip ("No device with aspect for test" )
635635 d1 = None
636- try :
637- d1 = dpctl .select_device_with_aspects ("cpu" , excluded_aspects = [aspect ])
638- except dpctl .SyclDeviceCreationError :
639- pass
640- try :
641- d1 = dpctl .select_device_with_aspects ("gpu" , excluded_aspects = [aspect ])
642- except dpctl .SyclDeviceCreationError :
643- pass
644- try :
645- d1 = dpctl .select_device_with_aspects (
646- "accelerator" , excluded_aspects = [aspect ]
647- )
648- except dpctl .SyclDeviceCreationError :
649- pass
636+ for d in dpctl .get_devices ():
637+ if d .default_selector_score < 0 :
638+ pass
639+ try :
640+ d1 = dpctl .select_device_with_aspects (
641+ d .device_type .name , excluded_aspects = [aspect ]
642+ )
643+ except dpctl .SyclDeviceCreationError :
644+ pass
650645 if d1 is None :
651646 pytest .skip ("No device with missing aspect for test" )
652-
653647 x = dpt .ones (10 , dtype = dt , device = d0 )
654648 y = dpt .asarray (x , device = d1 )
655649 assert y .sycl_device == d1
You can’t perform that action at this time.
0 commit comments