Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions tests/v1/kv_connector/unit/test_moriio_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@
)


def is_ibverbs_available():
from shutil import which

if which("ibv_devices") is None:
return False
from subprocess import check_output

output = check_output(["ibv_devices"]).decode("UTF-8")
return len(output.split("\n")) > 3


if not is_ibverbs_available():
pytest.skip("This test requires IB Verbs to run", allow_module_level=True)


@pytest.fixture
def mock_parallel_groups():
"""Mock tensor/data parallel group functions for single-rank tests."""
Expand Down