Skip to content

UCP/RMA: Add software emulation protocol for SGL put - #11577

Merged
michal-shalev merged 9 commits into
openucx:masterfrom
michal-shalev:sgl-put-offload-sw
Jul 1, 2026
Merged

michal-shalev merged 9 commits into
openucx:masterfrom
michal-shalev:sgl-put-offload-sw

Conversation

@michal-shalev

Copy link
Copy Markdown
Contributor

What?

Add a software-emulation PUT protocol for the SGL datatype (put/sgl/offload_sw), gated by UCX_PROTO_EMULATION_ENABLE.

Why?

The hardware SGL offload (put/sgl/offload) requires UCT_IFACE_FLAG_V2_PUT_SGL_ZCOPY, which is not always available. A fallback is needed so SGL puts still work when that capability is absent.

How?

Lower-priority proto that sends one SGL element per uct_ep_put_zcopy via the multi framework, so it's selected only when the HW offload cap is absent.

@michal-shalev

Copy link
Copy Markdown
Contributor Author

Pending #11578

iyastreb
iyastreb previously approved these changes Jun 29, 2026
Comment thread src/ucp/rma/put_offload.c Resolved

@tvegas1 tvegas1 left a comment

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 just noticed that I forget to push this review made few days ago.

Comment thread src/ucp/rma/put_offload.c Resolved
tomerg-nvidia
tomerg-nvidia previously approved these changes Jun 29, 2026
tvegas1
tvegas1 previously approved these changes Jun 29, 2026
Comment thread src/ucp/rma/put_offload.c
}

ucp_proto_t ucp_put_sgl_offload_sw_proto = {
.name = "put/sgl/offload_sw",

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.

maybe put/sgl/sw, offload_sw seems a bit in between.

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.

Can we do the renaming in a follow-up PR to not block this one from merging?

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.

ok for me

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.

offload_sw matches tag/rndv/offload_sw, it's still HW RMA offload (put_zcopy), only the SGL gather is emulated in SW.
WDYT? @tvegas1 @brminich

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.

ok for me

Comment thread src/ucp/rma/put_offload.c Resolved
iyastreb
iyastreb previously approved these changes Jun 30, 2026
Comment thread test/gtest/ucp/test_ucp_rma.cc Resolved
Comment thread src/ucp/rma/put_offload.c Resolved
Comment thread src/ucp/rma/put_offload.c Resolved
@michal-shalev
michal-shalev requested a review from brminich June 30, 2026 11:39
Comment thread src/ucp/rma/put_offload.c Outdated
static void
ucp_proto_put_sgl_offload_sw_probe(const ucp_proto_init_params_t *init_params)
{
if (!init_params->worker->context->config.ext.proto_emulation_enable) {

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 think we do not need to respect this flag, because it manages ineficcient emulations without RDMA (am based tcp), but put_sgl still provides good perf.
the reason is that we want to use this env var in NIXL to disable tcp based emulations, but we do not want to disable this protocol
@tvegas1

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.

Done

Comment thread src/ucp/rma/put_offload.c
}

ucp_proto_t ucp_put_sgl_offload_sw_proto = {
.name = "put/sgl/offload_sw",

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.

ok for me

@michal-shalev
michal-shalev enabled auto-merge (squash) June 30, 2026 14:30
@michal-shalev
michal-shalev merged commit df65ebd into openucx:master Jul 1, 2026
160 checks passed
@michal-shalev
michal-shalev deleted the sgl-put-offload-sw branch July 2, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants