From 349998bcc4116b590198ddc7503abb3e154a4cad Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 29 May 2026 09:30:19 -0700 Subject: [PATCH] Avoid querying inactive NVLink versions --- cuda_core/tests/system/test_system_device.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cuda_core/tests/system/test_system_device.py b/cuda_core/tests/system/test_system_device.py index 8bd272c5391..45ec6570fab 100644 --- a/cuda_core/tests/system/test_system_device.py +++ b/cuda_core/tests/system/test_system_device.py @@ -770,16 +770,19 @@ def test_nvlink(): nvlink_info = device.get_nvlink(link) assert isinstance(nvlink_info, _device.NvlinkInfo) + with unsupported_before(device, None): + state = nvlink_info.state + assert isinstance(state, bool) + + if not state: + continue + with unsupported_before(device, None): version = nvlink_info.version assert isinstance(version, tuple) assert len(version) == 2 assert all(isinstance(i, int) for i in version) - with unsupported_before(device, None): - state = nvlink_info.state - assert isinstance(state, bool) - def test_utilization(): for device in system.Device.get_all_devices():