Skip to content

UCP/RNDV: Use four read paths on ConnectX-9 XDR#11625

Open
roiedanino wants to merge 1 commit into
openucx:masterfrom
roiedanino:codex/ucp-vera-rndv-lanes
Open

UCP/RNDV: Use four read paths on ConnectX-9 XDR#11625
roiedanino wants to merge 1 commit into
openucx:masterfrom
roiedanino:codex/ucp-vera-rndv-lanes

Conversation

@roiedanino

@roiedanino roiedanino commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Detect ConnectX-9 XDR interfaces and expose four transport paths for RDMA READ operations.

Rendezvous GET ZCOPY registers both the existing two-path protocol and a four-path protocol, allowing protocol selection to choose by message size. Rendezvous PUT and AM preserve their existing automatic two-path behavior, and explicit lane settings remain authoritative.

Design

Hardware detection uses the ConnectX-9 PCI identifier and XDR link speed rather than the CPU model. UCX_MAX_RNDV_RAILS=auto keeps a two-device baseline while allowing transports to expose additional read paths on a single device.

@roiedanino roiedanino marked this pull request as ready for review July 6, 2026 13:39
@roiedanino roiedanino changed the title [codex] Use four rendezvous lanes on NVIDIA Vera Use four rendezvous lanes on NVIDIA Vera Jul 6, 2026
@roiedanino roiedanino changed the title Use four rendezvous lanes on NVIDIA Vera UCP/CORE: Use four rendezvous lanes on NVIDIA Vera Jul 6, 2026
@roiedanino

Copy link
Copy Markdown
Contributor Author

@svc-nvidia-pr-review

@svc-nvidia-pr-review

Copy link
Copy Markdown

🤖 Starting review — findings will be posted here when done.

Comment thread src/ucp/core/ucp_context.h Outdated
int adaptive_progress;
/** Eager-am multi-lane support */
unsigned max_eager_lanes;
/** Raw configured rendezvous multi-lane limit before auto-resolution;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

minor: the field can also hold UCS_ULUNITS_INF (rejected in resolve); pls mention it so the comment matches the handled cases.

if (config->max_rndv_lanes_config == UCS_ULUNITS_AUTO) {
config->max_rndv_lanes =
ucp_context_default_max_rndv_lanes(cpu_model);
} else if ((config->max_rndv_lanes_config == UCS_ULUNITS_INF) ||

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

minor: On ILP32 platforms unsigned long is 32-bit, so max_rndv_lanes_config > UINT_MAX can never be true, and a user value equal to 0xFFFFFFFE would alias UCS_ULUNITS_AUTO. This is inherent to ULUNITS semantics and matches other config fields, so it is only worth noting; no change required unless you want to guard the 32-bit case.

@roiedanino roiedanino self-assigned this Jul 7, 2026

@evgeny-leksikov evgeny-leksikov 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.

According to description "Vera Rubin systems expose four local XDR devices" I would expect to query NICs and their number but not CPU model. IMO something wrong here.

Comment thread docs/source/faq.md Outdated

The devices to use are selected according to best network speed, PCI bandwidth,
By default UCX picks the best network devices and splits large messages across
them. On NVIDIA Vera platforms the default is 4 rails; on all other platforms

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 would not mention Vera explicitly but rather that the default can be platform specific

Comment thread docs/source/faq.md Outdated

Yes, by setting `UCX_MAX_RNDV_RAILS=<num-rails>`. Currently up to 4 are supported.
Yes, by setting `UCX_MAX_RNDV_RAILS=<num-rails>`. Up to 4 rails are supported.
The default is 4 on NVIDIA Vera platforms and 2 on all other platforms.

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.

same here

Comment thread src/ucp/core/ucp_context.c Outdated
{"MAX_RNDV_RAILS", "auto",
"Maximal number of devices on which a rendezvous operation may be executed\n"
"in parallel.\n"
"The default is 4 on NVIDIA Vera platforms and 2 otherwise.",

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 am not sure that all Vera CPU platforms will always have 4 HCAs?

Comment thread src/ucp/core/ucp_context.c Outdated

if (config->max_rndv_lanes_config == UCS_ULUNITS_AUTO) {
config->max_rndv_lanes =
ucp_context_default_max_rndv_lanes(cpu_model);

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.

can we instead add that config in ucx.conf? ideally we would take that information from HCA/GPU topologies rather that from CPU itself?

Comment thread src/ucp/core/ucp_context.c Outdated

if (config->min_rndv_chunk_size == UCS_MEMUNITS_AUTO) {
config->min_rndv_chunk_size =
ucp_context_default_min_rndv_chunk_size(cpu_model);

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.

same here maybe add min rndv chunk size in ucx.conf under Vera section, this would allow to remove most of the changes here?

config->max_rndv_lanes =
ucp_context_default_max_rndv_lanes(cpu_model);
} else if ((config->max_rndv_lanes_config == UCS_ULUNITS_INF) ||
(config->max_rndv_lanes_config > UINT_MAX)) {

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.

The new resolver only rejects values above UINT_MAX, but max_rndv_lanes is subsequently assigned to ucp_proto_multi_init_params_t::max_lanes, whose type is ucp_lane_index_t (uint8_t), and ucp_proto_multi_init asserts it is <= UCP_PROTO_MAX_LANES (64). Consequently 65–255 can abort assertion-enabled builds, while 256 truncates to zero before the assertion and disables the protocol. Please reject values above the actual supported limit during ucp_init and add finite boundary tests.

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.

(see also svc comment above)

Comment thread test/gtest/ucp/test_ucp_context.cc Outdated
EXPECT_EQ(2u, ucp_reg_devices_count(e->ucph()->config.ext.max_hca_per_gpu));
}

UCS_TEST_P(test_ucp_context, rndv_platform_defaults)

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.

So the Vera auto-resolution is not actually tested in CI?

@roiedanino roiedanino closed this Jul 9, 2026
@roiedanino roiedanino deleted the codex/ucp-vera-rndv-lanes branch July 9, 2026 14:09
@roiedanino roiedanino reopened this Jul 9, 2026
@roiedanino roiedanino force-pushed the codex/ucp-vera-rndv-lanes branch from fbbe131 to c71cab0 Compare July 9, 2026 14:32
@roiedanino roiedanino changed the title UCP/CORE: Use four rendezvous lanes on NVIDIA Vera UCP/RNDV: Use four read paths on ConnectX-9 XDR Jul 9, 2026
@roiedanino roiedanino force-pushed the codex/ucp-vera-rndv-lanes branch from c71cab0 to 9953434 Compare July 9, 2026 15:03
@roiedanino roiedanino force-pushed the codex/ucp-vera-rndv-lanes branch from 9953434 to 0365062 Compare July 9, 2026 15:25
UCT_IB_DEVICE_FLAG_DC_V2, 80},
{"ConnectX-9", {0x15b3, 4133},
UCT_IB_DEVICE_FLAG_MELLANOX | UCT_IB_DEVICE_FLAG_MLX5_PRM |
UCT_IB_DEVICE_FLAG_DC_V2, 90},

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.

can we extend https://github.com/openucx/ucx/blob/master/config/ucx.conf with hints per NICs in addition to CPU , models?


dev_spec = uct_ib_device_spec(uct_ib_iface_device(iface));
if (uct_ib_iface_port_is_xdr(iface) &&
(dev_spec->flags & UCT_IB_DEVICE_FLAG_XDR_READ_4_PATHS)) {

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.

are we sure 4 paths are needed and two are no enough? ideally we would do it on READ side, not sure if it is easy to do..

if (uct_ib_iface_port_is_xdr(iface) &&
(dev_spec->flags & UCT_IB_DEVICE_FLAG_XDR_READ_4_PATHS)) {
iface->num_paths = ucs_max(iface->num_paths,
UCT_IB_XDR_READ_NUM_PATHS);

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.

do we need to bounce also the MAX_RMA_RAILS?

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.

5 participants