Repository navigation
UCT/ROCM: adjust rocm/ipc performance parameters - #9568
Conversation
360b138 to
8e1f267
Compare
|
setting the DoNotMerge flag since I might have a better solution than the min_zcopy (which did most of the heavy lifting in this fix) |
8e1f267 to
e1e7493
Compare
|
Lets stay for now with this solution here to deal with the intra-node collectives performance issue that I'm looking into. An alternative approach that I explored was to set the pre_send_overhead to a non-zero value in rocm_ipc, that gave me similar performance improvements as the solution in this pr. However, I started to hit issue #9372 with the pre_send_overhead in a number of tests. Until we find a solution to the problem in that issues, this solution here (which mostly relies on setting a minimum message length for the rocm/ipc/zcopy operations) seems to be more stable. This pr will also have to go to the 1.16 branch. |
e1e7493 to
6ef3cfa
Compare
introduce two new parameters for rocm/ipc that allow to fine tune the protocol selection. Specifically, they help to resolve the issue seen with v2 protocols for short message intra-node collective operations.
6ef3cfa to
1e91ddb
Compare
|
@yosefe thank you, I think I fixed the issues |
## What? Set `ROCM_IPC_MIN_ZCOPY=0` in the UCX context NIXL creates. ## Why? `rocm_ipc` defaults to a 128 byte minimum zero-copy size (openucx/ucx#9568, for small-message MPI collectives). UCP put/get zero-copy protocols reject any lane with a non-zero minimum, so NIXL VRAM to VRAM transfers on AMD never use `rocm_ipc` (XGMI) and are staged through host memory instead. `cuda_ipc` already uses 0. Setting it only in NIXL's UCX context leaves MPI and other UCX users unchanged. A user-set `UCX_ROCM_IPC_MIN_ZCOPY` still wins. On UCX builds without ROCm support the setting is unknown and is ignored with a debug log. With NIXL's default peer error handling, `rocm_ipc` is selected only once it advertises peer-failure support (openucx/ucx#11977, open). This PR does not depend on it, but the full benefit needs both. ## Results MI355X, NIXL WRITE GPU0 to GPU4, UCX master + openucx/ucx#11977: | size | without this PR | with this PR | |---|---|---| | 64 KiB | 1.68 GB/s | 4.54 GB/s | | 512 KiB | 11.89 GB/s | 23.74 GB/s | | 2 MiB | 30.05 GB/s | 43.69 GB/s | | 128 MiB | 60.22 GB/s | 60.85 GB/s | UCX protocol selection (`UCX_PROTO_INFO=y`) changes from a rendezvous read to direct `rocm_ipc` zero-copy for all sizes. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Improvements** * Updated ROCm IPC zero-copy settings during UCX initialization. * Added a warning when AMD GPUs are detected but UCX lacks ROCm memory-type support, helping identify a configuration that may affect GPU communication. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Colin Hirsch <chirsch@nvidia.com>
What
introduce two new parameters in rocm/ipc that allow to fine tune the protocol selection.
Why ?
Help to resolve the issue seen with v2 protocols for short message intra-node collective operations.