Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
066ab45
UCP: SGL datatype implementation
michal-shalev Apr 15, 2026
c5afa20
UCT: Remove 2x uct_ep_put_sgl_zcopy
michal-shalev Apr 15, 2026
31339b6
UCP/UCT: Update copyrights
michal-shalev Apr 15, 2026
2a98569
UCP: Fix copyrights for new files
michal-shalev Apr 15, 2026
731a918
UCP: Check return status of uct_iface_query_v2
michal-shalev Apr 15, 2026
3455df1
UCT: Fix uct_iface_attr_v2_t layout and align v2 iface cap docs
michal-shalev Apr 15, 2026
772f2b1
GTEST/UCP: Drop v2 lane caps query + add negative test put_zero_count
michal-shalev Apr 15, 2026
57ddf98
UCP/RMA: initialize next_iter before iface query to fix -Wmaybe-unini…
michal-shalev Apr 15, 2026
4c3114a
GTEST/UCP: Remove copyrights fix in files that didn't change
michal-shalev Apr 15, 2026
24b9d43
GTEST/UCP: Add mixed mem types test
michal-shalev Apr 15, 2026
7598a51
UCP: Add UCP_REQUEST_CHECK_PARAM_UNSUPPORTED_REMOTE
michal-shalev Apr 16, 2026
6b762c2
UCP: Remove copyrights years fix for non-NVIDIA
michal-shalev Apr 16, 2026
d19b8fb
UCP/DT: Remove ucp_datatype_iter_sgl_allocate_memh
michal-shalev Apr 16, 2026
6ce20ad
UCP/PROTO: cache max_put_sgl_zcopy_count
michal-shalev Apr 17, 2026
979021d
UCP/RMA/PUT: simplify put_sgl_offload_send_func
michal-shalev Apr 17, 2026
ef2a72e
UCP/DT: Rename ucp_datatype_sgl_iter_init to ucp_datatype_iter_sgl_init
michal-shalev Apr 17, 2026
fd3c63f
UCP/CORE: Unite UCP_REQUEST_CHECK_PARAM with UCP_REQUEST_CHECK_PARAM_…
michal-shalev Apr 17, 2026
16d0a04
UCP: Remove copyrights fix in files that didn't change
michal-shalev Apr 17, 2026
beef5cb
UCP/API: document SGL same-memtype requirement for ucp_dt_local_sgl_t
michal-shalev Apr 17, 2026
ac516f1
UCP/DT: Extract shared ucp_dt_mem_type_check_elem helper for IOV/SGL …
michal-shalev Apr 17, 2026
3f3af4a
UCP/DT: rename mem_type check helpers to mem_info for accuracy
michal-shalev Apr 17, 2026
d149ff3
UCP/DT: validate per-element memhs in SGL user-memh path
michal-shalev Apr 17, 2026
f1c4377
UCP/DT: handle count == 0 in SGL iterator init
michal-shalev Apr 17, 2026
43721dc
UCP/RMA: Reject SGL put when proto path is disabled
michal-shalev Apr 17, 2026
23a1dcb
Merge branch 'master' into HEAD
michal-shalev Apr 18, 2026
e9b8c4e
UCP/REQUEST: Reject SGL datatype on non-put APIs
michal-shalev Apr 18, 2026
24e72d5
UCP: Asserts for Coverity
michal-shalev Apr 18, 2026
2606812
UCP/TAG: Suppress Coverity false positive on legacy recv_nb user_data
michal-shalev Apr 18, 2026
7f3fa91
UCP/DT: Drop sgl.memhs_owned, infer ownership from memhs[0]
michal-shalev Apr 18, 2026
ee638da
TEST/UCP: Update ucp_request_t expected size to 280
michal-shalev Apr 18, 2026
628ff88
UCP/PROTO/RECONFIG: Abort request when no wireup proxy lane is left
michal-shalev Apr 19, 2026
e358808
UCP/DT: Validate that all SGL rkeys share the same rkey configuration
michal-shalev Apr 19, 2026
daf743c
UCP/PROTO: Declare per-protocol supported datatype-class mask
michal-shalev Apr 19, 2026
7e4ccd0
UCP: Fix copyrights
michal-shalev Apr 19, 2026
6934aa2
UCP/PROTO: Fix Coverity overrun warning in proto select loop
michal-shalev Apr 19, 2026
f01b9d6
UCP/REQUEST: Split UCP_REQUEST_CHECK_PARAM into _COMMON and _NO_REMOT…
michal-shalev Apr 24, 2026
880cdc0
UCP/CORE: Skip param validation for ops with no datatype/remote seman…
michal-shalev Apr 24, 2026
684a494
UCP/DT: Pass buffers/lengths directly to ucp_dt_sgl_check_same_mem_info
michal-shalev Apr 24, 2026
d870e0a
Merge branch 'master' into ucp-sgl-put-impl
michal-shalev Apr 26, 2026
3b1da4d
GTEST/UCP: Skip SGL put tests when v2 put_sgl_zcopy cap is missing
michal-shalev Apr 26, 2026
ef6950a
Merge branch 'master' into ucp-sgl-put-impl
michal-shalev May 25, 2026
12eefc5
UCP/RKEY: Remove extra spaces
michal-shalev May 25, 2026
4916e62
UCP/RMA: Convert SGL put param validation to macro and check remote l…
michal-shalev May 31, 2026
a360442
UCP/GTEST: Add negative test for missing remote SGL lengths in put
michal-shalev May 31, 2026
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
4 changes: 3 additions & 1 deletion src/ucp/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) NVIDIA CORPORATION & AFFILIATES, 2001-2021. ALL RIGHTS RESERVED.
# Copyright (c) NVIDIA CORPORATION & AFFILIATES, 2001-2026. ALL RIGHTS RESERVED.
# Copyright (c) UT-Battelle, LLC. 2017. ALL RIGHTS RESERVED.
# Copyright (C) Los Alamos National Security, LLC. 2019. ALL RIGHTS RESERVED.
# See file LICENSE for terms.
Expand Down Expand Up @@ -50,6 +50,7 @@ noinst_HEADERS = \
dt/dt.inl \
dt/dt_contig.h \
dt/dt_iov.h \
dt/dt_sgl.h \
dt/dt_generic.h \
proto/lane_type.h \
proto/proto_am.h \
Expand Down Expand Up @@ -120,6 +121,7 @@ libucp_la_SOURCES = \
core/ucp_device.c \
dt/datatype_iter.c \
dt/dt_iov.c \
dt/dt_sgl.c \
dt/dt_generic.c \
dt/dt.c \
proto/lane_type.c \
Expand Down
5 changes: 4 additions & 1 deletion src/ucp/am/eager_multi.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2022, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
* Copyright (C) 2022-2026, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
* See file LICENSE for terms.
*/

Expand Down Expand Up @@ -175,6 +175,7 @@ ucp_proto_t ucp_am_eager_multi_bcopy_proto = {
.name = "am/egr/multi/bcopy",
.desc = UCP_PROTO_MULTI_FRAG_DESC " " UCP_PROTO_COPY_IN_DESC,
.flags = 0,
.dt_mask = UCP_PROTO_DT_MASK_DEFAULT,
.probe = ucp_am_eager_multi_bcopy_proto_probe,
.query = ucp_proto_multi_query,
.progress = {ucp_am_eager_multi_bcopy_proto_progress},
Expand Down Expand Up @@ -349,6 +350,7 @@ ucp_proto_t ucp_am_eager_multi_zcopy_proto = {
.name = "am/egr/multi/zcopy",
.desc = UCP_PROTO_MULTI_FRAG_DESC " " UCP_PROTO_ZCOPY_DESC,
.flags = 0,
.dt_mask = UCP_DT_MASK_CONTIG_IOV,
.probe = ucp_am_eager_multi_zcopy_proto_probe,
.query = ucp_proto_multi_query,
.progress = {ucp_am_eager_multi_zcopy_proto_progress},
Expand Down Expand Up @@ -449,6 +451,7 @@ ucp_proto_t ucp_am_eager_multi_zcopy_psn_proto = {
.name = "am/egr/multi/zcopy/psn",
.desc = UCP_PROTO_MULTI_FRAG_DESC " " UCP_PROTO_ZCOPY_DESC " psn",
.flags = 0,
.dt_mask = UCP_DT_MASK_CONTIG_IOV,
.probe = ucp_am_eager_multi_zcopy_psn_proto_probe,
.query = ucp_proto_multi_query,
.progress = {ucp_am_eager_multi_zcopy_psn_proto_progress},
Expand Down
11 changes: 8 additions & 3 deletions src/ucp/am/eager_single.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2021, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
* Copyright (C) 2021-2026, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
* See file LICENSE for terms.
*/

Expand Down Expand Up @@ -139,6 +139,7 @@ ucp_proto_t ucp_am_eager_short_proto = {
.name = "am/egr/short",
.desc = UCP_PROTO_SHORT_DESC,
.flags = UCP_PROTO_FLAG_AM_SHORT,
.dt_mask = UCS_BIT(UCP_DATATYPE_CONTIG),
.probe = ucp_am_eager_short_probe,
.query = ucp_proto_single_query,
.progress = {ucp_am_eager_short_proto_progress},
Expand All @@ -162,6 +163,7 @@ ucp_proto_t ucp_am_eager_short_reply_proto = {
.name = "am/egr/short/reply",
.desc = UCP_PROTO_SHORT_DESC,
.flags = UCP_PROTO_FLAG_AM_SHORT,
.dt_mask = UCS_BIT(UCP_DATATYPE_CONTIG),
.probe = ucp_am_eager_short_reply_probe,
.query = ucp_proto_single_query,
.progress = {ucp_am_eager_short_reply_proto_progress},
Expand Down Expand Up @@ -264,6 +266,7 @@ ucp_proto_t ucp_am_eager_single_bcopy_proto = {
.name = "am/egr/single/bcopy",
.desc = UCP_PROTO_COPY_IN_DESC,
.flags = 0,
.dt_mask = UCP_PROTO_DT_MASK_DEFAULT,
.probe = ucp_am_eager_single_bcopy_probe,
.query = ucp_proto_single_query,
.progress = {ucp_am_eager_single_bcopy_proto_progress},
Expand Down Expand Up @@ -301,6 +304,7 @@ ucp_proto_t ucp_am_eager_single_bcopy_reply_proto = {
.name = "am/egr/single/bcopy/reply",
.desc = UCP_PROTO_COPY_IN_DESC,
.flags = 0,
.dt_mask = UCP_PROTO_DT_MASK_DEFAULT,
.probe = ucp_am_eager_single_bcopy_reply_probe,
.query = ucp_proto_single_query,
.progress = {ucp_am_eager_single_bcopy_reply_proto_progress},
Expand Down Expand Up @@ -339,8 +343,7 @@ static void ucp_am_eager_single_zcopy_probe_common(
};

if (!ucp_am_check_init_params(init_params, UCS_BIT(op_id),
UCP_PROTO_SELECT_OP_FLAG_AM_RNDV) ||
(init_params->select_param->dt_class != UCP_DATATYPE_CONTIG)) {
UCP_PROTO_SELECT_OP_FLAG_AM_RNDV)) {
return;
}

Expand Down Expand Up @@ -402,6 +405,7 @@ ucp_proto_t ucp_am_eager_single_zcopy_proto = {
.name = "am/egr/single/zcopy",
.desc = UCP_PROTO_ZCOPY_DESC,
.flags = 0,
.dt_mask = UCS_BIT(UCP_DATATYPE_CONTIG),
.probe = ucp_am_eager_single_zcopy_probe,
.query = ucp_proto_single_query,
.progress = {ucp_am_eager_single_zcopy_proto_progress},
Expand Down Expand Up @@ -458,6 +462,7 @@ ucp_proto_t ucp_am_eager_single_zcopy_reply_proto = {
.name = "am/egr/single/zcopy/reply",
.desc = UCP_PROTO_ZCOPY_DESC,
.flags = 0,
.dt_mask = UCS_BIT(UCP_DATATYPE_CONTIG),
.probe = ucp_am_eager_single_zcopy_reply_probe,
.query = ucp_proto_single_query,
.progress = {ucp_am_eager_single_zcopy_reply_proto_progress},
Expand Down
3 changes: 2 additions & 1 deletion src/ucp/am/rndv.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2022, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
* Copyright (C) 2022-2026, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
* See file LICENSE for terms.
*/

Expand Down Expand Up @@ -73,6 +73,7 @@ ucp_proto_t ucp_am_rndv_proto = {
.name = "am/rndv",
.desc = NULL,
.flags = 0,
.dt_mask = UCP_PROTO_DT_MASK_DEFAULT,
.probe = ucp_am_rndv_rts_probe,
.query = ucp_proto_rndv_rts_query,
.progress = {ucp_am_rndv_proto_progress},
Expand Down
6 changes: 5 additions & 1 deletion src/ucp/api/ucp.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) NVIDIA CORPORATION & AFFILIATES, 2001-2020. ALL RIGHTS RESERVED.
* Copyright (c) NVIDIA CORPORATION & AFFILIATES, 2001-2026. ALL RIGHTS RESERVED.
* Copyright (C) UT-Battelle, LLC. 2014-2017. ALL RIGHTS RESERVED.
* Copyright (C) ARM Ltd. 2016-2017. ALL RIGHTS RESERVED.
* Copyright (C) Los Alamos National Security, LLC. 2018 ALL RIGHTS RESERVED.
Expand Down Expand Up @@ -941,6 +941,10 @@ enum ucp_dt_remote_sgl_field {
*
* @note Currently only N->N mapping is supported: both sides must use
* the SGL datatype with equal counts and matching lengths.
*
* @note All buffers in the descriptor must share the same memory type
* (see @ref ucs_memory_type_t), otherwise @ref UCS_ERR_INVALID_PARAM

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would UCS_ERR_INVALID_PARAM be always returned with mixed memory types, or only when ENABLE_PARAMS_CHECK is on?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only when ENABLE_PARAMS_CHECK is on, matching IOV datatype path.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what is the standards for the docs, but is it okay that it doesn't mention the dependence on ENABLE_PARAMS_CHECK? (The text implies it will always happen)

* is returned.
*/
typedef struct {
uint64_t field_mask; /**< Valid fields, using bits from
Expand Down
3 changes: 2 additions & 1 deletion src/ucp/core/ucp_am.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Copyright (C) Los Alamos National Security, LLC. 2019 ALL RIGHTS RESERVED.
* Copyright (c) NVIDIA CORPORATION & AFFILIATES, 2019. ALL RIGHTS RESERVED.
* Copyright (c) NVIDIA CORPORATION & AFFILIATES, 2019-2026. ALL RIGHTS RESERVED.
* Copyright (C) Advanced Micro Devices, Inc. 2024. ALL RIGHTS RESERVED.
*
* See file LICENSE for terms.
Expand Down Expand Up @@ -1132,6 +1132,7 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_am_recv_data_nbx,

UCP_CONTEXT_CHECK_FEATURE_FLAGS(context, UCP_FEATURE_AM,
return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM));
UCP_REQUEST_CHECK_PARAM(param);
UCP_WORKER_THREAD_CS_ENTER_CONDITIONAL(worker);


Expand Down
12 changes: 11 additions & 1 deletion src/ucp/core/ucp_mm.inl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*
* See file LICENSE for terms.
*/
Expand Down Expand Up @@ -113,6 +113,16 @@ static UCS_F_ALWAYS_INLINE int ucp_memh_is_user_memh(ucp_mem_h memh)
return (memh->parent != NULL) && !ucp_memh_is_zero_length(memh);
}

static UCS_F_ALWAYS_INLINE ucp_memory_info_t
ucp_memory_info_from_memh(ucp_mem_h memh)
{
ucp_memory_info_t mem_info;

mem_info.type = memh->mem_type;
mem_info.sys_dev = memh->sys_dev;
return mem_info;
}

static UCS_F_ALWAYS_INLINE int ucp_memh_is_buffer_in_range(const ucp_mem_h memh,
const void *buffer,
size_t length)
Expand Down
56 changes: 41 additions & 15 deletions src/ucp/core/ucp_request.inl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) NVIDIA CORPORATION & AFFILIATES, 2001-2019. ALL RIGHTS RESERVED.
* Copyright (c) NVIDIA CORPORATION & AFFILIATES, 2001-2026. ALL RIGHTS RESERVED.
*
* See file LICENSE for terms.
*/
Expand Down Expand Up @@ -186,23 +186,49 @@ UCS_PTR_MAP_IMPL(request, 0);
}


#define UCP_REQUEST_CHECK_PARAM(_param) \
if (ENABLE_PARAMS_CHECK) { \
if (((_param)->op_attr_mask & UCP_OP_ATTR_FIELD_MEMORY_TYPE) && \
((_param)->memory_type > UCS_MEMORY_TYPE_LAST)) { \
ucs_error("invalid memory type parameter: %d", \
(_param)->memory_type); \
return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM); \
#define UCP_REQUEST_CHECK_PARAM_COMMON(_param) \
do { \
if (ENABLE_PARAMS_CHECK) { \
if (((_param)->op_attr_mask & UCP_OP_ATTR_FIELD_MEMORY_TYPE) && \
((_param)->memory_type > UCS_MEMORY_TYPE_LAST)) { \
ucs_error("invalid memory type parameter: %d", \
(_param)->memory_type); \
return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM); \
} \
\
if (ucs_test_all_flags((_param)->op_attr_mask, \
(UCP_OP_ATTR_FLAG_FAST_CMPL | \
UCP_OP_ATTR_FLAG_MULTI_SEND))) { \
ucs_error("UCP_OP_ATTR_FLAG_FAST_CMPL and " \
"UCP_OP_ATTR_FLAG_MULTI_SEND are mutually exclusive"); \
return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM); \
} \
} \
\
if (ucs_test_all_flags((_param)->op_attr_mask, \
(UCP_OP_ATTR_FLAG_FAST_CMPL | \
UCP_OP_ATTR_FLAG_MULTI_SEND))) { \
ucs_error("UCP_OP_ATTR_FLAG_FAST_CMPL and " \
"UCP_OP_ATTR_FLAG_MULTI_SEND are mutually exclusive"); \
} while (0)


#define UCP_REQUEST_CHECK_PARAM_NO_REMOTE(_param) \
do { \
if (ENABLE_PARAMS_CHECK && \
(((_param)->op_attr_mask & \
(UCP_OP_ATTR_FIELD_REMOTE | \
UCP_OP_ATTR_FIELD_REMOTE_DATATYPE | \
UCP_OP_ATTR_FIELD_REMOTE_COUNT)) || \
(((_param)->op_attr_mask & UCP_OP_ATTR_FIELD_DATATYPE) && \
(((_param)->datatype & UCP_DATATYPE_CLASS_MASK) == \
UCP_DATATYPE_SGL)))) { \
ucs_error("SGL datatype and remote descriptor parameters are " \
"only supported for ucp_put_nbx"); \
return UCS_STATUS_PTR(UCS_ERR_INVALID_PARAM); \
} \
}
} while (0)


#define UCP_REQUEST_CHECK_PARAM(_param) \
do { \
UCP_REQUEST_CHECK_PARAM_COMMON(_param); \
UCP_REQUEST_CHECK_PARAM_NO_REMOTE(_param); \
} while (0)


#if UCS_ENABLE_ASSERT
Expand Down
7 changes: 3 additions & 4 deletions src/ucp/core/ucp_rkey.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) NVIDIA CORPORATION & AFFILIATES, 2001-2015. ALL RIGHTS RESERVED.
* Copyright (c) NVIDIA CORPORATION & AFFILIATES, 2001-2026. ALL RIGHTS RESERVED.
*
* See file LICENSE for terms.
*/
Expand Down Expand Up @@ -674,9 +674,8 @@ static ssize_t ucp_memh_do_pack(ucp_mem_h memh, uint64_t flags, int rkey_compat,
ucs_fatal("packing rkey using ucp_memh_pack() is unsupported");
}

mem_info.type = memh->mem_type;
mem_info.sys_dev = memh->sys_dev;
sys_distance = sys_dev_distances;
mem_info = ucp_memory_info_from_memh(memh);
sys_distance = sys_dev_distances;

ucs_for_each_bit(ep_sys_dev, sys_dev_map) {
status = ucs_topo_get_distance(memh->sys_dev, ep_sys_dev, sys_distance);
Expand Down
Loading