File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -391,6 +391,28 @@ def test_hashing_of_queue():
391391 assert queue_dict
392392
393393
394+ def test_channeling_device_properties ():
395+ try :
396+ q = dpctl .SyclQueue ()
397+ dev = q .sycl_device
398+ except dpctl .SyclQueueCreationError :
399+ pytest .fail ("Failed to create device from default selector" )
400+ import io
401+ from contextlib import redirect_stdout
402+
403+ f1 = io .StringIO ()
404+ with redirect_stdout (f1 ):
405+ q .print_device_info () # should execute without raising
406+ f2 = io .StringIO ()
407+ with redirect_stdout (f2 ):
408+ dev .print_device_info ()
409+ assert f1 .getvalue () == f2 .getvalue (), "Mismatch in print_device_info"
410+ for pr in ["backend" , "name" , "driver_version" ]:
411+ assert getattr (q , pr ) == getattr (
412+ dev , pr
413+ ), "Mismatch found for property {}" .format (pr )
414+
415+
394416def test_queue_submit_barrier (valid_filter ):
395417 try :
396418 q = dpctl .SyclQueue (valid_filter )
You can’t perform that action at this time.
0 commit comments