1071 Commits

Author SHA1 Message Date
Wenkai Du 94b53a03ac Treat PIX and PXB as same GDR distance (#1894)
[ROCm/rccl commit: de9ebd8a8b]
2025-09-11 10:44:10 -05:00
isaki001 9fa7a738da add reduce/broadcast algo/proto selection table for multi-node gfx940 (#1889)
[ROCm/rccl commit: 9c36439354]
2025-09-10 14:25:23 -05:00
Wenkai Du 2577b33de8 Enable LL128 and use same tuning table for gfx942 4 NICs (#1898)
[ROCm/rccl commit: c2bccf9156]
2025-09-10 11:11:15 -04:00
Mustafa Abduljabbar 1a7ab8dfc8 Force enable proto and/or algo after model selection (#1799)
* Force enable proto or algo

* Remove inc nccl_common.h

* Move logic and add error checks

* Fix topo_expl compatibility

* Allow algo/proto overrides

* Remove extra function decl

* Clarify warning message

* Move algo/proto overrides into separate functions

* Update CHANGELOG.md

[ROCm/rccl commit: 7ccc6f268f]
2025-09-03 08:54:13 -04:00
Mark Santesson 9bc0e13ef0 NCCL 2.28.3-1
Device API (Experimental)
 * Introduces device-side APIs to integrate NCCL communication directly into application kernels.
 * Supports LSA (Load/Store Access) for CUDA P2P communication over NVLink and some PCIe platforms.
 * Supports Multimem for hardware multicast using NVLink SHARP.
 * Adds initial framework for GIN (GPU-Initiated Networking), currently under development.
 * Introduces device communicators created using ncclDevCommCreate.
 * Enables device-side communication operations with synchronization (ncclLsaBarrierSession) and memory accessors (ncclGetLsaPointer, ncclGetLsaMultimemPointer).
 * Experimental APIs - signatures and functionality may evolve in future releases.
 * No ABI compatibility is guaranteed — applications must be recompiled with each new NCCL release.

Symmetric memory improvements
 * Support for aggregating symmetric operations using ncclGroupStart/End APIs.
 * Reimplement symmetric kernels using device API.

New Host APIs
 * Introduce new host collective APIs: ncclAlltoAll, ncclScatter, ncclGather.

CE (Copy Engine) Collectives
 * Reduce SM utilization for alltoall, scatter, gather, and allgather within a single (MN)NVL domain.
 * Free up SM capacity for the application to do computation at the same time.
 * To enable the feature for ncclAllGather, ncclAlltoAll, ncclGather, ncclScatter, register buffers into symmetric windows and use the NCCL_CTA_POLICY_ZERO flag in the communicator config_t.

NCCL Inspector Plugin
 * Introduces an Inspector plugin for always-on performance monitoring.
 * Produces structured JSON output with metadata, execution time, bandwidth, and optional event traces for each NCCL operation.
 * Enables integration with analysis tools such as Performance Exporter to visualize NCCL performance bottlenecks.
 * Lightweight to enable via environment variables NCCL_PROFILER_PLUGIN and NCCL_INSPECTOR_ENABLE.

CMake support (Experiemental)
 * Adds a CMake build system as an alternative to existing Makefiles.
 * Known issues: pkg.build and Device API currently do not work with CMake.
 * The known issues will be addressed in a future release.

Decreased max CTA count from 32 to 16 on Blackwell
 * SM overhead is decreased by 50% with this improvement.
 * This may cause some perf drop on Blackwell because of the reduced SM usage.
 * If the extra SM capacity is not desired, two options are available to restore to previous behavior: 1) Setting NCCL_MIN_CTAS=32 NCCL_MAX_CTAS=32 environment variables; 2) setting communicator config to over-write max CTA count to 32.
 * Based on community feedback, future versions may consider different trade-offs between performance and SM overhead.

Plugins
 * Network
   * App-aware Network plugin. NCCL passes information about communication operations to be executed on the network end point. This allows for better tuning of network end points and their use in the plugins.
   * Improve handling of physical and virtual network devices and load/unload.
   * Network plugin version 11 - add explicit context and communication ID support for per communicator init/finalize.
   * Add Multi-Request Net API. Using this will help NCCL to anticipate multiple send/recv requests and optimize for it. See maxMultiRequestSize field in ncclNetProperties_v11_t.
 * Profiler
   * Add support for API events (group, collective, and p2p) and for tracking kernel launches in the profiler plugin.
   * Add Inspector Profiler Plugin (see section above).
   * Add a hook to Google’s CoMMA profiler on github.
 * Tuner
   * Expose NCCL tuning constants at tuner initialization via ncclTunerConstants_v5_t.
   * Add NVL Domain Information API.
 * Support multiple plugin types from a single shared object.

New Parameterization and ncclConfig changes:
 * Add new option NCCL_MNNVL_CLIQUE_ID=-2 which will use rack serial number to partition the MNNVL clique. This will limit NVLink domains to GPUs within a single rack.
 * Add NCCL_NETDEVS_POLICY to control how NET devices are assigned to GPUs. The default (AUTO) is the policy used in previous versions.
 * Add NCCL_SINGLE_PROC_MEM_REG_ENABLE control variable to enable NVLS UB registration in the “one process, multiple ranks” case as opt in.
 * Move nChannelsPerNetPeer into ncclConfig. NCCL_NCHANNELS_PER_NET_PEER can override the value in ncclConfig.
 * Enable PxN over C2C by default
   * PxN over C2C will improve performance for Grace-Blackwell platforms by allowing NCCL to leverage the NIC attached to a peer GPU over NVLINK, C2C, and PCIe.
   * This behavior can be overridden by setting NCCL_PXN_C2C=0.

Other Improvements:
 * Allow FP8 support for non-reductive operations on pre sm90 devices. (See https://github.com/pytorch/pytorch/pull/151594#discussion_r2135777776)
 * Fix NVLS+CollNet and temporarily disables COLLNET_CHAIN for >8 GPUs.
 * Only consider running interfaces for socket traffic. NCCL will not attempt to use interfaces that do not have the IFF_RUNNING bit. (https://github.com/NVIDIA/nccl/issues/1798)
 * Modernize mutex management. Convert to std::mutex and std::lock_guard.
 * Remove sm35 and sm50 GENCODE targets which have long been deprecated and were causing issues with the latest NCCL release builds.
 * Improved NVLS/NVLSTree tuning prediction to improve algorithm and protocol selection.
 * NVLSTree Tuning Fixes. Update tuning data for H100, GB200-NV72.
 * Respond better to RoCE link flaps. Instead of reporting an “unknown event” it will now report “GID table changed”.
 * Move libvirt bridge interface to the end of possible interfaces so that they are considered last. These interfaces are usually virtual bridges to relay traffic to containers running on the host and cannot be used for traffic to a remote node and are therefore unsuitable.


[ROCm/rccl commit: f1308997d0]
2025-09-02 13:53:34 -07:00
ycui1984 1999f2eba8 [rocm_regression] Return errors when HSA_NO_SCRATCH_RECLAIM=1 even for rocm>=6.4.0 (#1867)
* [rocm_regression] Return errors when HSA_NO_SCRATCH_RECLAIM=1 even for rocm >= 6.4.0
* [rocm_regression] Check firmware version
* [rocm_regression] Resolve review comments
* [rocm_regression] Move hsa env checking into init once func
* [rocm_regression] Prevent hot fix version in firmware
* [rocm_regression] Improve unit tests

[ROCm/rccl commit: 361d596229]
2025-08-29 11:18:23 -05:00
BertanDogancay 881327184e Merge remote-tracking branch 'nccl/master' into develop
[ROCm/rccl commit: 08a7be231b]
2025-08-28 15:46:28 -05:00
Nusrat Islam fde5d7a8be Device allocation tracker (#1878)
* alloc: add memory allocation tracker

* alloc: add tracker for ncclCuMemAlloc() APIs

* alloc: add null pointer check during free

[ROCm/rccl commit: df448862c3]
2025-08-27 09:30:51 -05:00
Mustafa Abduljabbar f37f290134 [Device] Add dynamic fetch/reduce pipelining for reduction collectives - Simple protocol (#1861)
* Support pipelining codegen and template specialization

* Support ReduceCopy pipelining for AllReduce, ReduceScatter, and Reduce (currently enabled for bfloat16)

* Remove need for FUNC_INDEX_TOTAL

* Add pipeline field to device function key construction logic

* Avoid unneeded codegen for LL/LL64 kernels

* Modify conditions and add pipeline dtypes env

* Optimize selection for both gfx942 and gfx950

* Increase pipeline bitfield width

* Use __forceinline__ for all device functions

* Realign reduceCopy with original form

* Add opt-out option to enable perf debugs

* Remove force-reduce-pipelining option from README

* Update CHANGELOG.md

---------

Co-authored-by: Jeffrey Novotny <jnovotny@amd.com>

[ROCm/rccl commit: 277747c199]
2025-08-26 15:03:54 -04:00
Nusrat Islam c7fce9b0eb fixup: remove extra semicolon (#1881)
[ROCm/rccl commit: b882af9ffd]
2025-08-26 10:57:25 -05:00
Nusrat Islam 1af94eee8d Add direct allgather algorithm (#1868)
* add direct allgather algorithm

* minor fix

* add debug print for memory allocation tracker

* add message size threshold for direct allgather

* scatter transfers across ranks

* update changelog

* minor fix

* Update CHANGELOG.md

Co-authored-by: Jeffrey Novotny <jnovotny@amd.com>

* enable direct AG when pxn is ON on MI300X or MI350

---------

Co-authored-by: Jeffrey Novotny <jnovotny@amd.com>

[ROCm/rccl commit: 5e7937effb]
2025-08-25 07:55:10 -05:00
Nilesh M Negi fbe014c870 [BUILD] Populate host_table entries only for 1 unroll (#1871)
[ROCm/rccl commit: bf6660ee4e]
2025-08-23 00:15:38 -05:00
Arm Patinyasakdikul 3a544ed5f4 Removing "Could not find any local path from gpu X to net." warning (#1866)
* Removing "Could not find any local path from gpu X to net." warning to avoid confusion.

[ROCm/rccl commit: 28a83c3ea6]
2025-08-20 16:52:35 -05:00
Arm Patinyasakdikul d4fecfb0be Remove noinline attribute from reduceCopyPacks and (#1864)
reduceCopyPacksWithBias.

[ROCm/rccl commit: fb882e80f6]
2025-08-19 20:24:31 -05:00
Mustafa Abduljabbar 5025a9aab9 Have ncclDevFuncId use 64-Bit keyed map with field packing (#1857)
- Updated ncclDevFuncId to use a hash-based lookup with std::unordered_map.
- Keys are now 64-bit integers, which pack coll, algo, proto, devRedOp, and type fields.
- Improved flexibility and maintainability by moving away from row-based indexing.
- Added error handling for missing keys in the hash map.
- Aligned key generation logic with generate.py and updated generate.py.

[ROCm/rccl commit: c1b3cd8911]
2025-08-19 16:41:19 -04:00
Nusrat Islam e4c025e5cd device: optimize threadfence for ll64 protocol (#1858)
* device: optimize threadfence for ll64 protocol

* device: use __atomic_signal_fence()

---------

Co-authored-by: Nusrat Islam <nusislam@useocpslog-003.amd.com>

[ROCm/rccl commit: 6ade5065b4]
2025-08-18 09:16:41 -05:00
Nilesh M Negi ed4abedf7b [DEVICE] Use noinline for LLGenericOp only on gfx950 (#1849)
[ROCm/rccl commit: c3b8de4ec8]
2025-08-15 15:15:02 -05:00
isaki001 2e9a2d1762 [TUNING] gfx950 16N tuning (#1835)
* change gfx950 algo/proto selection for multinode allreduce, allgather, reduceScatter
* gfx950 tuning: enable tuning for broadcast, allreduce starts LL128 earlier and switches to ring earlier, change LL128 start for allgather and reduceScatter
* lower LL128 threshold
* update reduceScatter LL128 min to match LL max for consistency
* enable multinode PXN and increase chunksize for gfx950
* change LL128 start to 128KB, adjust ring-start according to node-count
* disable code-path for fused-AR on LL128 for gfx950
* use LL128 starting from 1KB for multinode allgather on gfx950
* start LL128 earlier for multinode reduceScatter on gfx950
* start LL128 earlier for multinode broadcast on gfx950
* set multinode allreduce to start simple on 64MB for gfx950
* start LL128 from 1KB for multinode broadcast on gfx950
* setting multinode AR to use tree instead of ring at 16MB, 64MB, 128MB
* set multinode broadcast to use LL for up to 256KB depending on node-count for gfx950
* adjust algo for 32MB  multinode allreduce on gfx950
* make 32MB tree LL128 for multinode AR on gfx950
* make sure ring is not picked on 2N allreduce on small sizes

[ROCm/rccl commit: 44121db890]
2025-08-15 15:12:45 -05:00
alex-breslow-amd dc3a0c5242 Disable the __threadfence on the sender side of the simple protocol when possible. (#1830)
Leverages the traits of extended-scope fine-grain memory to get rid of a device-scope acquire-release fence.  This improves throughput for single node workloads on gfx942 and gfx950 for some input sizes (e.g., ~32 MiB to about 256 MiB) when using the simple protocol.  Multinode workloads on MI300X see a smaller but statistically significant uplift for some message sizes.  Runtime disablement is supported via setting the environment variable RCCL_GFX942_CHEAP_FENCE_ON to 0.

[ROCm/rccl commit: 1aa2570b48]
2025-08-15 07:54:54 -07:00
mberenjk c76a4492f1 Added useAcc as a template parameter to address the performance regression (#1856)
* Added useAcc as a template parameter to address the 2% performance regression in allreduceWithBias
---------

Co-authored-by: Marzieh Berenjkoub <mberenjk@amd.com>


[ROCm/rccl commit: c61152baa4]
2025-08-14 15:58:54 -05:00
Karthikeyan Arumugam 16d0871985 Add cstring header explictly as it is removed from HIP (#1859)
[ROCm/rccl commit: 6d41e5ba99]
2025-08-13 15:14:22 -07:00
isaki001 52d33058bb enable more events for LL128 NPKIT trace collection (#1827)
[ROCm/rccl commit: 74d82a8145]
2025-08-07 11:19:36 -05:00
Avinash f34d760613 Compiler warnings fix 2 (#1801)
* Changes to device code

* Changes to src/misc

* Changes to graph

* src/include changes

* src/transport changes

* changes in init, enqueue, proxy

* Changes to CMakeLists.txt

* Additional changes to device code

* Additional changes to net.cc

* adding 'compiler warning' tag to ease upstream merge'

* typo correction

* Addessing comments

* Additional changes for new commits

[ROCm/rccl commit: 3f8cac388e]
2025-08-05 17:36:23 -05:00
Arm Patinyasakdikul df3b7e477f Disable context tracking for the current version. (#1839)
[ROCm/rccl commit: 6fc228e247]
2025-08-04 10:48:00 -05:00
Nilesh M Negi be810f10f3 [DEVICE] Add unroll=2 for gfx950 multi-node (#1824)
[ROCm/rccl commit: bd55f876e9]
2025-07-31 02:35:26 -05:00
ycui1984 39c508b80d Add collective latency profiler (#1785)
* [LatencyProfiler] Initial commit

* [LatencyProfiler] Add unit tests

* [LatencyProfiler] add more

* [LatencyProfiler] Pass unit tests

* [LatencyProfiler] Add hooks to integrate with meta internal tools

* [LatencyProfiler] Restore install.sh

* [LatencyProfiler] Resolved comments 1. add proper license 2. use proper namespace

* [LatencyProfiler] Add header

[ROCm/rccl commit: 874cd657ef]
2025-07-30 14:59:28 -07:00
Mustafa Abduljabbar cafd7a5126 Optimize alltoall for 64 GPUs and above for gfx942 (#1828)
Add pxn and p2p net chunksize mi300x tuning

[ROCm/rccl commit: 4ce3df8d3a]
2025-07-30 15:14:43 -04:00
mberenjk cca5172260 Upcast FP8 to Half (FP16) for Sum Operation (#1775)
* adding hadd and hadd2 support using builtin functions.

---------

Co-authored-by: Marzieh Berenjkoub <mberenjk@amd.com>

[ROCm/rccl commit: c84ee3d298]
2025-07-29 11:33:06 -05:00
Sarat Kamisetty 1719aa67be passing down NET_OPTIONAL_RECV_COMPLETION hint to n/w plugin to enable optimizations (#1752)
Co-authored-by: Sarat Kamisetty <sakamiset@amd.com>

[ROCm/rccl commit: 783c073a03]
2025-07-25 10:26:58 -05:00
Mustafa Abduljabbar b3a0cc5e96 Add optional bf16 software-triggered pipelining for reduceCopyPacks (#1758)
- Introduced double-buffering to reduce copy overhead and overlap BF16 arithmetic with data prefetching.
- Aimed to improve performance of reduction-based collectives by up to 10%.
- Implemented based on recommendations from Guennadi Riguer (AMD)
- Added --force-reduce-pipeline option to install.sh to activate this optimization for BF16 reductions.
- Feature is disabled by default to prevent regressions with large messages until auto-tuning logic is upstreamed.
---------

Co-authored-by: Jeffrey Novotny <jnovotny@amd.com>
Co-authored-by: Pedram Alizadeh <pmohamma@amd.com>

[ROCm/rccl commit: 0ce20e7e07]
2025-07-25 10:57:05 -04:00
Atul Kulkarni bd53bdf447 Added new unit tests for src/transport/shm.cc (#1689)
[ROCm/rccl commit: 1c3d1b3842]
2025-07-25 05:54:42 -05:00
Kamil Iskra 44d92cf9df NCCL 2.27.7-1
Prevent initialization failures in certain configurations when attempting
to load fp8-specific symmetric multicast kernels on GPUs older than
Blackwell.


[ROCm/rccl commit: 593de54e52]
2025-07-24 10:39:53 -07:00
Arm Patinyasakdikul 866058c6d9 Fix segfault when libibverbs returns 0 device. (#1820)
Fix: SWDEV-543816

[ROCm/rccl commit: 3c9c22bb52]
2025-07-23 15:18:52 -05:00
Wenkai Du caff9764d3 Support fused all reduce and elementwise operations (#1729)
* Support fused all reduce and elementwise operations

Add additional "acc" parameter to RCCL Replayer logs

Add flag which indicates availability of new API

* Fix Recorder json parsing

* Remove unreachable code

* Remove extra acc pointer check

* .

* Revert "[DEVICE] Adding ability to choose unroll factor at runtime (#1734)"

This reverts commit 4cadf3597c.

* Use noinline to reduce kernels linking time

* Don't use noinline for gfx942 and gfx950 to avoid perf regression

---------

Co-authored-by: AtlantaPepsi <timhu102@amd.com>
Co-authored-by: BertanDogancay <bertan.dogancay@gmail.com>

[ROCm/rccl commit: 9a4213356d]
2025-07-23 09:04:17 -07:00
alex-breslow-amd cbb648505a Cheaper threadfence for gfx942 in postPeer [1/N]: enable for single node allreduce (#1766)
Boosts single node bfloat16 allreduce performance by up to 20% for some data sizes and provides gating with the RCCL_GFX942_CHEAP_FENCE_OFF environment variable

[ROCm/rccl commit: 11fabf1de1]
2025-07-22 07:15:15 -07:00
Rahul Vaidya bd63518944 Add datatype validation for MSCCLPP AllGather (#1816)
Signed-off-by: rahulvaidya20 <ravaidya@amd.com>

[ROCm/rccl commit: c28d3d26a3]
2025-07-21 11:50:45 -05:00
Atul Kulkarni c94fb7c58e Code coverage improvements (#1665)
* Increased max stack size to 640

* Added new binary for executing unit tests

Added new unit tests for argcheck.cc and alt_rsmi.cc files

Modified the method to execute unit tests to cover static methods
by using a bash script to convert static to non-static functions
and variables on the fly restricted to debug build type.

[ROCm/rccl commit: 275fdd43c1]
2025-07-17 11:20:49 -05:00
Nilesh M Negi 2c0c02b211 [GRAPH] Match maxChannels for gfx942 CUs (#1302)
[ROCm/rccl commit: 6632183efe]
2025-07-16 09:07:02 -05:00
Wenkai Du 670966f86b Fix inline compilation issue with LL (#1806)
[ROCm/rccl commit: 106024b0db]
2025-07-15 08:39:18 -07:00
isaki001 a20e65cfc0 gfx950 updated on LL thresholds for allreduce/allgather, update treeCorrection (#1803)
* change LL thresholds for allreduce/allgather and update treeCorrectionFactor

* update allGather LL cutoff

* adjust allgather LL/LL128 thresholds

[ROCm/rccl commit: 8d0f1a1cef]
2025-07-15 09:10:19 -05:00
Wenkai Du e2ad96bb96 Disable P2P net option by default (#1793)
[ROCm/rccl commit: 708ad75f7a]
2025-07-14 08:55:39 -07:00
Kamil Iskra 81dbe74fca NCCL 2.27.6-1
Improve support for DirectNIC (CX8)
* Add support for XDR speed detection.
* When DirectNIC is enabled, report only the RDMA interfaces.

Extend the P2C (PXN over C2C) support to send/receive operations.

Support compilation with GCC 14 (Issues #1743, #1751).

Fix the unloading of network plugins that also provide tuner capability.

Fix the change of the current device across the calls to ncclCommDestroy()
and ncclCommAbort().

A note for users on MNNVL systems: please ensure an adequate stack size for
NCCL threads.  While the default Linux stack size limit of 8192 KB is known
to be sufficient, we've seen crashes if the limit is changed to
"unlimited", as it causes the glibc library to unexpectedly *decrease* the
stack size of NCCL's background threads to just 2048 KB.  Use "ulimit -s"
in bash to print the current limit; if needed, reset it to 8192 KB using
"ulimit -s 8192" (one also needs to ensure that the new setting is
propagated to other nodes when launching a multi-node NCCL job).


[ROCm/rccl commit: 7c12c627c6]
2025-07-11 07:32:13 -07:00
Bertan Dogancay d4aafe31fa [GEN] Fix typo in IFC code gen (#1796)
[ROCm/rccl commit: 7158adb57f]
2025-07-11 09:19:39 -04:00
Nilesh M Negi 41c985462c [BUILD] Use fmt-header instead of libfmt (#1791)
[ROCm/rccl commit: 6b4ad0fd74]
2025-07-10 17:19:53 -05:00
Nilesh M Negi ba31e4e846 [INIT] Fix fallback for unsupported user-specified runtime unroll factor (#1780)
* [INIT] Fix fallback for unsupported user-specified runtime unroll factor
* Add CollTrace guard
* Move `commSetUnrollFactor()` to rccl_wrap.cc
* Modify comments in the device-code generator script

[ROCm/rccl commit: 2c099fe29a]
2025-07-10 10:56:18 -05:00
Nilesh M Negi 1050eb13ac [DEVICE] Fix validation errors for multi-node LL with gfx950 non-coherent system memory (#1795)
[ROCm/rccl commit: 68d6f99e0f]
2025-07-10 09:05:46 -05:00
Mustafa Abduljabbar caeaaa284c Fix AllReduce regression due to previous max range increase for LL64/LL128 (#1787)
* Adjust tuning factor impacting more than 2 nodes
* Scale max LL128 size for > 2 nodes
* Retune max LL128 range for N > 2

[ROCm/rccl commit: 058264b3f3]
2025-07-09 19:17:10 -05:00
mberenjk 1623fcc7a1 Improving build time by removing the gfx11xx and host code from rccl_float8.h (#1789)
* removing extra build time by removing the gfx11xx arch from using hip_fp8

---------

Co-authored-by: Marzieh Berenjkoub <mberenjk@amd.com>

[ROCm/rccl commit: 697bee4ee8]
2025-07-09 14:03:47 -05:00
Bertan Dogancay b1470b4e50 [GRAPH] Pass rank instead of busId due to a change in an internal function signature (#1792)
[ROCm/rccl commit: 9c89573580]
2025-07-08 08:45:54 -04:00
Bertan Dogancay 471fc6bff2 [DEVICE] Enable PAT algo for RCCL 1ppn (#1756)
* Enable PAT algo for RCCL 1ppn


[ROCm/rccl commit: e96c8473a1]
2025-07-04 13:45:18 -04:00