def test_nvml_nvlink_error_counters(ngpus, handles, error_type): for i in range(ngpus): for j in range(pynvml.NVML_NVLINK_MAX_LINKS): assert pynvml.nvmlDeviceResetNvLinkErrorCounters( handles[i], j) == pynvml.NVML_SUCCESS error_count = pynvml.nvmlDeviceGetNvLinkErrorCounter( handles[i], j, error_type) assert error_count >= 0
def test_nvml_nvlink_error_counters(ngpus, handles, error_type, driver): if driver > 450.0: pytest.xfail(XFAIL_LEGACY_NVLINK_MSG) for i in range(ngpus): for j in range(pynvml.NVML_NVLINK_MAX_LINKS): assert ( pynvml.nvmlDeviceResetNvLinkErrorCounters(handles[i], j) == pynvml.NVML_SUCCESS ) error_count = pynvml.nvmlDeviceGetNvLinkErrorCounter( handles[i], j, error_type ) assert error_count >= 0