Skip to content

Commit c87a701

Browse files
authored
Merge pull request #10646 from tvegas1/srd_gtest_ucp
GTEST/UCP: Enable EFA SRD support
2 parents fb4cb46 + a0ecb01 commit c87a701

File tree

13 files changed

+52
-18
lines changed

13 files changed

+52
-18
lines changed

buildlib/pr/efa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
demands: ${{ parameters.demands }}
1010
displayName: ${{ parameters.name }} on ${{ parameters.container }}
1111
container: ${{ parameters.container }}
12-
timeoutInMinutes: 120
12+
timeoutInMinutes: 140
1313
workspace:
1414
clean: outputs
1515
steps:

contrib/test_efa.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,17 @@ run_gtests() {
103103
./install/bin/ucx_perftest -l -t tag_bw
104104
./install/bin/ucx_info -d
105105
106-
IBMOCK_FILTER='srd/uct_p2p_am_misc.no_rx_buffs*:srd/test_uct_peer_failure.purge_failed_peer*'
106+
# TODO: Add when ibmock supports missing pre-posted RX buffers
107+
IBMOCK_FILTER="srd/uct_p2p_am_misc.no_rx_buffs*:srd/test_uct_peer_failure.purge_failed_peer*"
108+
IBMOCK_FILTER="$IBMOCK_FILTER:srd/test_ucp_stream_many2one.send_worker_poll*"
109+
IBMOCK_FILTER="$IBMOCK_FILTER:srd/test_ucp_peer_failure.*"
110+
IBMOCK_FILTER="$IBMOCK_FILTER:srd/test_ucp_perf.envelope/*"
111+
107112
# Try the faster approach before valgrind
108113
make -C contrib/test/gtest test \
109114
GTEST_FILTER=*ud*:srd/*-$IBMOCK_FILTER
110115
make -C contrib/test/gtest test_valgrind \
111-
GTEST_FILTER=*ud*:srd/*:-*test_uct_perf.envelope*:$IBMOCK_FILTER
116+
GTEST_FILTER=*ud*:srd/*:-*test_uct_perf.envelope*:*test_ucp*:$IBMOCK_FILTER
112117
}
113118
114119
test_ucx_rpm() {

test/gtest/ucp/test_ucp_am.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -934,8 +934,8 @@ UCS_TEST_P(test_ucp_am_nbx, rx_am_mpools,
934934
set_am_data_handler(receiver(), TEST_AM_NBX_ID, am_data_hold_cb, &rx_data,
935935
UCP_AM_FLAG_PERSISTENT_DATA);
936936

937-
static const std::string ib_tls[] = { "dc_x", "rc_v", "rc_x", "ud_v",
938-
"ud_x", "ib" };
937+
static const std::string ib_tls[] = {"dc_x", "rc_v", "rc_x", "ud_v",
938+
"ud_x", "srd", "ib"};
939939

940940
// UCP takes desc from mpool only for data arrived as inlined from UCT.
941941
// Typically, with IB, data is inlined up to 32 bytes, so use smaller range

test/gtest/ucp/test_ucp_atomic.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ class test_ucp_atomic : public test_ucp_memheap {
250250
continue;
251251
}
252252

253-
static const std::string tls[] = { "ud_v", "ud_x", "rc_v", "tcp" };
253+
static const std::string tls[] = {"ud_v", "ud_x", "rc_v", "tcp",
254+
"srd"};
254255
/* Target memory type atomics emulation not supported yet */
255256
if (((atomic_mode == UCP_ATOMIC_MODE_CPU) ||
256257
has_any_transport(tls, ucs_static_array_size(tls))) &&

test/gtest/ucp/test_ucp_context.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ UCS_TEST_P(test_ucp_aliases, aliases) {
6868
UCP_INSTANTIATE_TEST_CASE_TLS(test_ucp_aliases, rcv, "rc_v")
6969
UCP_INSTANTIATE_TEST_CASE_TLS(test_ucp_aliases, rcx, "rc_x")
7070
UCP_INSTANTIATE_TEST_CASE_TLS(test_ucp_aliases, ud, "ud")
71+
UCP_INSTANTIATE_TEST_CASE_TLS(test_ucp_aliases, srd, "srd")
7172
UCP_INSTANTIATE_TEST_CASE_TLS(test_ucp_aliases, ud_mlx5, "ud_mlx5")
7273
UCP_INSTANTIATE_TEST_CASE_TLS(test_ucp_aliases, ugni, "ugni")
7374
UCP_INSTANTIATE_TEST_CASE_TLS(test_ucp_aliases, shm, "shm")

test/gtest/ucp/test_ucp_perf.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,9 @@ UCS_TEST_SKIP_COND_P(test_ucp_perf, envelope, has_transport("self"))
334334
test_spec test = tests[get_variant_value(VARIANT_TEST_TYPE)];
335335

336336
if (ucs::is_aws() && (test.wait_mode == UCX_PERF_WAIT_MODE_SLEEP) &&
337-
has_transport("ud_v")) {
337+
(has_transport("ud_v") || has_transport("srd"))) {
338338
// TODO support wakeup in UD transport without requiring IBV_SEND_SOLICITED
339-
UCS_TEST_SKIP_R("wait mode sleep on EFA not available on UD");
339+
UCS_TEST_SKIP_R("wait mode sleep on EFA not available");
340340
}
341341

342342
if (has_transport("tcp")) {

test/gtest/ucp/test_ucp_request.cc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,8 +741,18 @@ class test_proto_reset_atp : public test_proto_reset {
741741
UCP_PROTO_RNDV_PUT_STAGE_FENCED_ATP);
742742
});
743743

744-
restart(sender().ep());
744+
745+
/*
746+
* Restore the pending_add callbacks, as some transport need to be able
747+
* to add ep flush request to the pending queue. For instance RDNV put
748+
* and fence scheme will block ep_flush on SRD transport.
749+
*
750+
* Purge must be done with test callbacks first.
751+
*/
752+
ucp_ep_purge_lanes(sender().ep(), purge_enqueue_cb, this);
745753
restore_uct_cbs();
754+
755+
restart(sender().ep());
746756
}
747757

748758
static unsigned m_atp_count;

test/gtest/ucp/test_ucp_rma.cc

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,14 @@ class test_ucp_ep_based_fence : public test_ucp_rma {
585585
ucs::handle<ucp_rkey_h> rkey;
586586
rbuf.rkey(sender(), rkey);
587587

588+
/*
589+
* Some transports might need some bidirectional progress to be able
590+
* to transmit without using their pending queue.
591+
*/
592+
do_rma_op(op, sbuf.ptr(), sizeof(uint32_t), rbuf.ptr(), rkey);
593+
flush_workers();
594+
flush_sender_cleanup();
595+
588596
if (op == OP_ATOMIC) {
589597
(this->*fence_func)(op, sbuf.ptr(), sizeof(uint32_t), rbuf.ptr(),
590598
rkey);
@@ -599,12 +607,7 @@ class test_ucp_ep_based_fence : public test_ucp_rma {
599607
flush_workers();
600608
}
601609

602-
void do_rma_op_with_fence_before(op_type_t op, void *sbuf, size_t size,
603-
void *target, ucp_rkey_h rkey) {
604-
do_fence();
605-
do_rma_op(op, sbuf, size, target, rkey);
606-
607-
flush_worker(sender());
610+
void flush_sender_cleanup() {
608611
/*
609612
* flush_worker() doesn't reset unflushed_lanes yet (planned).
610613
* Manually clear unflushed_lanes to simulate a fence-before-op scenario
@@ -615,6 +618,15 @@ class test_ucp_ep_based_fence : public test_ucp_rma {
615618
*/
616619
sender().ep()->ext->unflushed_lanes = 0;
617620
}
621+
622+
void do_rma_op_with_fence_before(op_type_t op, void *sbuf, size_t size,
623+
void *target, ucp_rkey_h rkey) {
624+
do_fence();
625+
do_rma_op(op, sbuf, size, target, rkey);
626+
627+
flush_worker(sender());
628+
flush_sender_cleanup();
629+
}
618630
private:
619631
static constexpr size_t TEST_BUF_SIZE = 1000000;
620632
};

test/gtest/ucp/test_ucp_sockaddr.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2837,6 +2837,7 @@ UCS_TEST_SKIP_COND_P(test_ucp_sockaddr_protocols, am_rndv_reset,
28372837
UCP_INSTANTIATE_TEST_CASE_TLS_GPU_AWARE(_test_case, udx, "ud_x") \
28382838
UCP_INSTANTIATE_TEST_CASE_TLS_GPU_AWARE(_test_case, rc, "rc_v") \
28392839
UCP_INSTANTIATE_TEST_CASE_TLS_GPU_AWARE(_test_case, rcx, "rc_x") \
2840+
UCP_INSTANTIATE_TEST_CASE_TLS_GPU_AWARE(_test_case, srd, "srd") \
28402841
UCP_INSTANTIATE_TEST_CASE_TLS_GPU_AWARE(_test_case, ib, "ib") \
28412842
UCP_INSTANTIATE_TEST_CASE_TLS_GPU_AWARE(_test_case, tcp, "tcp") \
28422843
UCP_INSTANTIATE_TEST_CASE_TLS(_test_case, all, "all")

test/gtest/ucp/test_ucp_tag_mem_type.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ class test_ucp_tag_mem_type: public test_ucp_tag {
3333
int variant_flags = get_variant_value() / m_mem_type_pairs.size();
3434

3535
if (variant_flags & VARIANT_GDR_OFF) {
36-
if (!has_any_transport(
37-
{"dc_x", "ud_v", "ud_x", "rc_v", "rc_x", "ib"})) {
36+
if (!has_any_transport({"dc_x", "ud_v", "ud_x", "rc_v", "rc_x",
37+
"srd", "ib"})) {
3838
UCS_TEST_SKIP_R("No GPU direct RDMA");
3939
}
4040

0 commit comments

Comments
 (0)