Skip to content

Commit ecc2fc5

Browse files
rwgkcursoragent
andcommitted
Skip bogus NVLink link counts on Orin
Handle invalid link count values returned as SUCCESS by skipping the check. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent efdd46d commit ecc2fc5

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

cuda_bindings/tests/nvml/test_nvlink.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,10 @@ def test_nvlink_get_link_count(all_devices):
2525
# The feature_nvlink_supported detection is not robust, so we
2626
# can't be more specific about how many links we should find.
2727
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}"
28+
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

Comments
 (0)