Skip to content
Draft
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .gitlab/test_nixlbench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ for op_type in READ WRITE; do
for initiator in $seg_types; do
for target in $seg_types; do
run_nixlbench_two_workers --backend UCX --op_type $op_type --initiator_seg_type $initiator --target_seg_type $target
run_nixlbench_two_workers --backend LIBFABRIC --op_type $op_type --initiator_seg_type $initiator --target_seg_type $target
done
done
done
Expand Down
10 changes: 7 additions & 3 deletions .gitlab/test_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,23 @@ ARCH=$(uname -m)
[ "$ARCH" = "arm64" ] && ARCH="aarch64"

export LD_LIBRARY_PATH=${INSTALL_DIR}/lib:${INSTALL_DIR}/lib/$ARCH-linux-gnu:${INSTALL_DIR}/lib/$ARCH-linux-gnu/plugins:/usr/local/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/opt/amazon/efa/lib:$LD_LIBRARY_PATH
export CPATH=${INSTALL_DIR}/include:/opt/amazon/efa/include:$CPATH
export CPATH=${INSTALL_DIR}/include::$CPATH
export PATH=${INSTALL_DIR}/bin:$PATH
export PKG_CONFIG_PATH=${INSTALL_DIR}/lib/pkgconfig:/opt/amazon/efa/lib/pkgconfig:$PKG_CONFIG_PATH
export PKG_CONFIG_PATH=${INSTALL_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH
export NIXL_PLUGIN_DIR=${INSTALL_DIR}/lib/$ARCH-linux-gnu/plugins
export NIXL_PREFIX=${INSTALL_DIR}
# Raise exceptions for logging errors
export NIXL_DEBUG_LOGGING=yes
export FI_LOG_LEVEL=debug
export FI_LOG_PROV=efa

pip3 install --break-system-packages .
pip3 install --break-system-packages pytest
pip3 install --break-system-packages pytest-timeout
pip3 install --break-system-packages zmq

cat /sys/devices/virtual/dmi/id/product_name

echo "==== Running ETCD server ===="
etcd_port=$(get_next_tcp_port)
etcd_peer_port=$(get_next_tcp_port)
Expand All @@ -57,6 +60,7 @@ etcd --listen-client-urls ${NIXL_ETCD_ENDPOINTS} --advertise-client-urls ${NIXL_
sleep 5

echo "==== Running python tests ===="
export NIXL_LOG_LEVEL=DEBUG
pytest -s test/python
python3 test/python/prep_xfer_perf.py list
python3 test/python/prep_xfer_perf.py array
Expand Down
8 changes: 4 additions & 4 deletions test/nixl/agent_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,8 +573,8 @@ int main()
for (nixl_backend_t b: plugins)
std::cout << b << "\n";

ret1 = A1.getPluginParams("UCX", mems1, init1);
ret2 = A2.getPluginParams("UCX", mems2, init2);
ret1 = A1.getPluginParams("LIBFABRIC", mems1, init1);
ret2 = A2.getPluginParams("LIBFABRIC", mems2, init2);

assert (ret1 == NIXL_SUCCESS);
assert (ret2 == NIXL_SUCCESS);
Expand All @@ -584,8 +584,8 @@ int main()
printParams(init2, mems2);

nixlBackendH* ucx1, *ucx2;
ret1 = A1.createBackend("UCX", init1, ucx1);
ret2 = A2.createBackend("UCX", init2, ucx2);
ret1 = A1.createBackend("LIBFABRIC", init1, ucx1);
ret2 = A2.createBackend("LIBFABRIC", init2, ucx2);

nixl_opt_args_t extra_params1, extra_params2;
extra_params1.backends.push_back(ucx1);
Expand Down
19 changes: 12 additions & 7 deletions test/python/test_nixl_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,20 @@ def one_empty_agent():

@pytest.fixture
def one_ucx_agent():
return nixl_agent(str(uuid.uuid4()))
config = nixl_agent_config(backends=['LIBFABRIC'])
return nixl_agent(str(uuid.uuid4()), config)


@pytest.fixture
def two_ucx_agents():
return (nixl_agent(str(uuid.uuid4())), nixl_agent(str(uuid.uuid4())))
config = nixl_agent_config(backends=['LIBFABRIC'])
return (nixl_agent(str(uuid.uuid4()), config), nixl_agent(str(uuid.uuid4()), config))


@pytest.fixture
def two_connected_ucx_agents():
agent1, agent2 = (nixl_agent(str(uuid.uuid4())), nixl_agent(str(uuid.uuid4())))
config = nixl_agent_config(backends=['LIBFABRIC'])
agent1, agent2 = (nixl_agent(str(uuid.uuid4(), config)), nixl_agent(str(uuid.uuid4()), config))
agent1.add_remote_agent(agent2.get_agent_metadata())
agent2.add_remote_agent(agent1.get_agent_metadata())
yield (agent1, agent2)
Expand Down Expand Up @@ -207,8 +210,9 @@ def test_incorrect_plugin_env(monkeypatch):
def test_get_xfer_telemetry():
os.environ["NIXL_TELEMETRY_ENABLE"] = "y"

agent1 = nixl_agent(str(uuid.uuid4()))
agent2 = nixl_agent(str(uuid.uuid4()))
config = nixl_agent_config(backends=['LIBFABRIC'])
agent1 = nixl_agent(str(uuid.uuid4()), config)
agent2 = nixl_agent(str(uuid.uuid4()), config)

mem_size = 128
addr1 = utils.malloc_passthru(mem_size)
Expand Down Expand Up @@ -259,10 +263,11 @@ def test_get_xfer_telemetry_cfg():
os.environ["NIXL_TELEMETRY_ENABLE"] = "m" # invalid value not to enable
os.environ["NIXL_TELEMETRY_DIR"] = "/tmp/dummy" # to be ignored


agent1 = nixl_agent(
str(uuid.uuid4()), nixl_conf=nixl_agent_config(capture_telemetry=True)
str(uuid.uuid4()), nixl_conf=nixl_agent_config(backends=['LIBFABRIC'], capture_telemetry=True)
)
agent2 = nixl_agent(str(uuid.uuid4()))
agent2 = nixl_agent(str(uuid.uuid4()), nixl_agent_config(backends=['LIBFABRIC']))

mem_size = 128
addr1 = utils.malloc_passthru(mem_size)
Expand Down
Loading