Skip to content

Commit 4b7a6ca

Browse files
authored
UCP/WIREUP: Make device lanes lookup best effort - port to 1.20 (#11031)
UCP/WIREUP: Make device lanes lookup best effort.
1 parent 543c323 commit 4b7a6ca

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

src/ucp/core/ucp_device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ static ucs_status_t ucp_device_mem_list_create_handle(
289289
if (i == 0) {
290290
ucs_error("failed to select lane for local device %s",
291291
ucs_topo_sys_device_get_name(local_sys_dev));
292-
return UCS_ERR_NO_RESOURCE;
292+
return UCS_ERR_NO_DEVICE;
293293
}
294294

295295
/* Populate handle header */

src/ucp/wireup/select.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2496,8 +2496,7 @@ ucp_wireup_add_device_lanes(const ucp_wireup_select_params_t *select_params,
24962496
mem_type_tl_bitmap, UCP_NULL_LANE,
24972497
select_ctx, 0);
24982498
if (!found_lane) {
2499-
ucs_error("could not find device lanes");
2500-
return UCS_ERR_UNREACHABLE;
2499+
ucs_debug("ep %p: could not find device lanes", select_params->ep);
25012500
}
25022501

25032502
return UCS_OK;

test/gtest/ucp/test_ucp_device.cc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ test_ucp_device::mem_list::mem_list(entity &sender, entity &receiver,
8989
ucs_memory_type_t mem_type) :
9090
m_receiver(receiver)
9191
{
92+
ucs_status_t status;
93+
9294
// Prepare src and dst buffers
9395
for (auto i = 0; i < count; ++i) {
9496
m_src.emplace_back(new mapped_buffer(size, sender, 0, mem_type));
@@ -124,8 +126,16 @@ test_ucp_device::mem_list::mem_list(entity &sender, entity &receiver,
124126
params.elements = elems.data();
125127

126128
// Create memory list
127-
ASSERT_UCS_OK(
128-
ucp_device_mem_list_create(sender.ep(), &params, &m_mem_list_h));
129+
{
130+
scoped_log_handler wrap_err(wrap_errors_logger);
131+
status = ucp_device_mem_list_create(sender.ep(), &params, &m_mem_list_h);
132+
}
133+
134+
if (status == UCS_ERR_NO_DEVICE) {
135+
UCS_TEST_SKIP_R("Skipping test if no device lanes exists.");
136+
} else {
137+
ASSERT_UCS_OK(status);
138+
}
129139
}
130140

131141
test_ucp_device::mem_list::~mem_list()

0 commit comments

Comments
 (0)