@@ -167,7 +167,8 @@ def test_device_name():
167167
168168
169169def test_device_pci_info (subtests ):
170- for device in system .Device .get_all_devices ():
170+ for cuda_device in CudaDevice .get_all_devices ():
171+ device = cuda_device .to_system_device ()
171172 with subtests .test (device_index = device .index ):
172173 pci_info = device .pci_info
173174 assert isinstance (pci_info , _device .PciInfo )
@@ -684,7 +685,8 @@ def test_clock_event_reasons(subtests):
684685
685686
686687def test_fan (subtests ):
687- for device in system .Device .get_all_devices ():
688+ for cuda_device in CudaDevice .get_all_devices ():
689+ device = cuda_device .to_system_device ()
688690 device_index = device .index
689691 num_fans = None
690692 # The fan APIs are only supported on discrete devices with fans,
@@ -734,7 +736,8 @@ def test_fan(subtests):
734736
735737
736738def test_cooler (subtests ):
737- for device in system .Device .get_all_devices ():
739+ for cuda_device in CudaDevice .get_all_devices ():
740+ device = cuda_device .to_system_device ()
738741 with subtests .test (device_index = device .index ):
739742 # The cooler APIs are only supported on discrete devices with fans,
740743 # but when they are not available `device.num_fans` returns 0.
0 commit comments