SIGN IN SIGN UP

PLUGINS/UCX: Add scatter-gather list (SGL) put path (#1835)

## What?
Add a UCX scatter-gather (SGL) put path.

## Why?
Posting one UCX request per descriptor is wasteful for multi-element
writes. An SGL put hands UCX the whole descriptor list in one call,
reducing per-element overhead.

## How?
Off by default, gated at two layers:
- **Build-time**: `meson.build` probes for `ucp_dt_local_sgl_t` and
defines `HAVE_UCX_SGL_API` only when UCX exposes the SGL API. All SGL
code is `#ifdef`-guarded.
- **Run-time**: `NIXL_UCX_SGL_ENABLE` (default `false`) toggles it; if
set on a build without SGL support, it warns and falls back to the
per-descriptor path.

For `NIXL_WRITE`, a new `sglXfer` gathers the descriptor range into
parallel arrays (addrs, lengths, memhs, rkeys) kept on the request
handle. `sendXferRange` short-circuits to `sendXferSgl`, issuing one
`postSgl` (`ucp_put_nbx` + `ucp_dt_make_sgl()`) and a single `flushEp`
per batch.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added optional UCX scatter-gather list (SGL) offload for write
transfers.
* When supported and enabled, write operations are submitted using SGL
for more efficient handling across multiple segments.
* **Compatibility**
* UCX SGL support is auto-detected at build time; builds without it
won’t include the feature.
* Runtime enablement is controlled by `NIXL_UCX_SGL_ENABLE`; if SGL
isn’t compiled in, it is forced off with a warning.
* When SGL can’t be used, the system falls back to the existing transfer
behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
M
Michal Shalev committed
32794e9e9a9e895b407b0e61a4f9ef80f06b8ba7
Parent: 1949141
Committed by GitHub <noreply@github.com> on 8/4/2026, 9:05:34 AM