예제 #1
0
def test_nvml_nvlink_properties(ngpus, handles):
    for i in range(ngpus):
        for j in range(pynvml.NVML_NVLINK_MAX_LINKS):
            version = pynvml.nvmlDeviceGetNvLinkVersion(handles[i], j)
            assert version >= 1
            state = pynvml.nvmlDeviceGetNvLinkState(handles[i], j)
            assert state >= 0
            pci_info = pynvml.nvmlDeviceGetNvLinkRemotePciInfo(handles[i], j)
            assert isinstance(pci_info, pynvml.c_nvmlPciInfo_t)
예제 #2
0
def test_nvml_nvlink_properties(ngpus, handles, 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):
            version = pynvml.nvmlDeviceGetNvLinkVersion(handles[i], j)
            assert version >= 1
            state = pynvml.nvmlDeviceGetNvLinkState(handles[i], j)
            assert state >= 0
            pci_info = pynvml.nvmlDeviceGetNvLinkRemotePciInfo(handles[i], j)
            assert isinstance(pci_info, pynvml.c_nvmlPciInfo_t)