1071 Commits

Author SHA1 Message Date
Bertan Dogancay 974c13cd62 [BUILD] Move code generation to python from CMake (#1360)
* Use generate.py for func generation

* Convert AddUnroll.cmake to bash

[ROCm/rccl commit: 2dd10c8f17]
2024-10-03 10:21:19 -04:00
BertanDogancay 9059445acb Merge remote-tracking branch 'nccl/master' into develop
[ROCm/rccl commit: 84081064a0]
2024-10-02 09:31:25 -05:00
Wenkai Du 74aa13afbe Add another Rome model (#1354)
[ROCm/rccl commit: e453f1ced9]
2024-10-01 17:41:27 -05:00
Ziyue Yang cf980e9b9c Fix size matching in MSCCL (#1318)
[ROCm/rccl commit: 7830af5844]
2024-10-01 13:32:41 -07:00
Mustafa Abduljabbar ef6d75b3ee MSCCL Multithreaded regression root cause fix (#1347)
* Make sure the target device is used for MSCCL

* Enable single process mode by default to use MSCCL in MT

* Create a per-rank state when GPUs share a thread

[ROCm/rccl commit: 03a3ef3c34]
2024-09-25 15:24:25 -04:00
Nilesh M Negi 21a3b242bf [TRANSPORT] GDRDMA enablement for linux kernel 6.4.0 or newer (#1328)
Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>

[ROCm/rccl commit: 105ff1611f]
2024-09-25 11:29:52 -05:00
Mustafa Abduljabbar 13f6bbde57 Fix MSCCLPP seg-fault when RCCL_MSCCL_ENABLE_SINGLE_PROCESS is enabled (#1338)
Removing unnecessary changes.

rename unique hosts function

Co-authored-by: corey-derochie-amd <161367113+corey-derochie-amd@users.noreply.github.com>

use updated function name

Co-authored-by: corey-derochie-amd <161367113+corey-derochie-amd@users.noreply.github.com>

Missed one instance of `mscclIsMultithreadedComm`.

rename unique hosts function

Co-authored-by: corey-derochie-amd <161367113+corey-derochie-amd@users.noreply.github.com>

use updated function name

Co-authored-by: corey-derochie-amd <161367113+corey-derochie-amd@users.noreply.github.com>

Missed one instance of `mscclIsMultithreadedComm`.


[ROCm/rccl commit: 2fe1e9f7db]
2024-09-20 11:22:05 -05:00
Sylvain Jeaugey 60240fec77 2.23.4-1
Add scalable init API
 * Add new ncclCommInitRankScalable to allow for passing multiple
   unique IDs to the init function.
 * Spreads the load onto multiple bootstrap roots, allowing for
   constant bootstrap time.
 * Requires multiple ranks to create a unique ID, and the CPU-side
   ID exchange code to call allgather[v] instead of broadcast.

Accelerate init bootstrap operations
 * Reduce the number of calls to allgather.
 * Allow roots to reply early to ranks when information is already
   available.
 * Add an option to use ncclNet instead of sockets to perform
   bootstrap allgather operations.

Add PAT algorithms for Allgather and ReduceScatter
 * Parallel Aggregated Trees, variation of Bruck algorithm.
 * Logarithmic number of network steps for small sizes at scale.
 * Only supports one rank per node at the moment.

Add support for registered buffers for intra-node communication.
 * Allow registered user buffers to be accessed directly intra-node
 * Avoids extra copies in algorithms which permit it, saving
   memory bandwidth and helping with compute overlap.

Add profiler plugin API
 * New plugin API for profiling
 * Supports various levels of profiling, with a hierarchy.

Asynchronous graph allocation
 * Make calls to cudaMalloc and cudaMemcpy during graph allocation
   asynchronous.
 * Significantly speeds up graph capture.

Use fatal IB asynchronous events to stop network operation
 * Avoids many other error messages
 * Only fatal errors are affected; potentially transient errors
   (e.g. port down) do not cause an immediate stop.

Set P2P level to PXB on AMD CPUs when using more than 2 GPUs per node
 * P2P would cause a significant performance degradation when using
   many GPUs, and therefore many interleaved data flows.
 * Disable P2P through the CPU when we have 3+ GPUs per node; keep it
   enabled when we only have 2 GPUs.

Improve the init logs to report the real NCCL function.
 * Make the log report ncclCommInitRank or ncclCommSplit, rather than
   the generic ncclCommInitRankFunc.

Add a parameter to set the location of the user configuration file.
 * Add NCCL_CONF_FILE environment variable to set where the user's
   configuration file resides.

Increase default IB timeout
 * Increase IB timeout value from 18 to 20.
 * Should help avoid fatal errors on large RoCE systems.

Add new check for nvidia peermem
 * On linux kernels 6.6+, /sys/kernel/mm/memory_peers is no longer
   present; check for /sys/module/nvidia_peermem/version instead.

Fix old performance regression when mixing small and large operations.
 * Improves distribution of work on channels.

Fix crash when NUMA IDs are equal to -1.
 * Can happen when a NIC is a virtual NIC, or when linux doesn't
   know which NUMA node a device is attached to
 * Issue NVIDIA/nccl-tests#233

Fix tree graph search when NCCL_CROSS_NIC is set to 1.
 * Would force NCCL to use the balanced_tree pattern, thereby
   disabling LL128 on platforms with 1 GPU+1 NIC per PCI switch.
 * Would also try to use alternate rings even though it was not
   needed.

Compiler tweaks and fixes
 * PR #1177
 * PR #1228

Fix stack smash
 * PR #1325

Fixes for multi-node NVLink + IB operation

Coverity fixes and comments.


[ROCm/rccl commit: 68b542363f]
2024-09-16 23:41:17 -07:00
corey-derochie-amd cf48e57bd9 Moved mscclpp_ncclGetUniqueId call into ncclCommInitRankFunc (#1332)
* Moved call to `mscclpp_ncclGetUniqueId` into `ncclCommInitRankFunc` to avoid setting up transport early in environments where MSCCL++ isn't valid.

* Checking `mscclEnabled` for the process and the topology to gate MSCCL++.

* Allowed `mscclForceEnable` to enable MSCCL++.

[ROCm/rccl commit: 853a0586b4]
2024-09-16 16:41:40 -06:00
corey-derochie-amd 9ffd893c5a Re-enabled MSCCL++ (#1325)
* Added restrictions around calling MSCCL++ collectives (#1281)

* Added restriction to non-zero 32-byte multiple message sizes to MSCCL++ AllGather.

* Renamed and refactored some mscclpp types.

* Only transmit the MSCCL++ unique id for non-split comm init. For splitting comm, it has already been transmitted. Instead, save the MSCCL++ communicator in child communicators when calling `ncclCommSplit`. Only destroy MSCCL++ communicators when no RCCL communicators remain that use it. Also improved trace logging.

* Disable MSCCL++ when using managed memory buffers as it isn't supported.

* Added datatype and op constraints for MSCCL++ AllReduce.

* Added documentation on MSCCL++ restrictions to the README.

* [BUILD] Support custom CMake flags in MSCCLPP (#1275)

* [BUILD] Support custom CMAKE_PREFIX_PATH in MSCCLPP

Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>

* [BUILD] CMake flags to support build-id in MSCCLPP

Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>

* [BUILD] Fix CMake warnings in MSCCLPP build

Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>

* Wrapped all cmake arguments passed to mscclpp to remove empty arguments and properly format them.

---------

Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>
Co-authored-by: Corey Derochie <corey.derochie@amd.com>

* Link to libmscclpp_nccl statically (#1282)

* Switched mscclpp_nccl to static linking. Added a build step to rename the NCCL API functions.

* Undid separation of building libmscclpp_nccl from building librccl with MSCCL++ integration. With a static build, it's either fully enabled or fully disabled.

* `nm` isn't always available in docker containers due to being stripped down. Removed use of `nm` in `cmake` and hard-coded the output into mscclpp_nccl_syms.txt.

* Removed IBVerbs dependency for integrating with MSCCL++ (#1313)

* Renamed `RCCL_ENABLE_MSCCLPP` to `RCCL_MSCCLPP_ENABLE` to conform to MSCCL. Set `RCCL_MSCCLPP_ENABLE` to 1 by default if `ENABLE_MSCCLPP` is defined, or 0 otherwise. Added a log warning if `RCCL_MSCCLPP_ENABLE` is set to 1 but `ENABLE_MSCCLPP` is not defined. (#1294)

* Include mscclpp as a git submodule (#1314)

* Added the desired mscclpp commit as a git submodule.

* Added step to automatically checkout the mscclpp submodule if it isn't already present, in case the user forgot to clone recursively.

* Added instruction to README to clone using --recurse-submodules to get the mscclpp submodule.

* Enabled MSCCL++ feature build.

---------

Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>
Co-authored-by: Nilesh M Negi <Nilesh.Negi@amd.com>

[ROCm/rccl commit: 736a705875]
2024-09-11 09:55:16 -06:00
mberenjk 78e0b3fe9e replacing nccl/cuda related part of the api_trace.h with rccl/hip (#1326)
Co-authored-by: Marzieh Berenjkoub <mberenjk@amd.com>

[ROCm/rccl commit: 4ceb672179]
2024-09-10 11:05:14 -05:00
corey-derochie-amd dc04844405 Disable MSCCL for the non-multi-process case by default (#1307)
* Added `RCCL_MSCCL_ENABLE_SINGLE_PROCESS` runtime flag to return to the original MSCCL enablement behaviour except when explicitly enabling for multi-thread.

* Added documentation for the new `RCCL_MSCCL_ENABLE_SINGLE_PROCESS` runtime env var.

[ROCm/rccl commit: e056fe8f7e]
2024-09-04 11:11:50 -06:00
Nusrat Islam 7676d49260 graph: fix for MI300X 64 GPU case (#1308)
PR #1290 introduced a failure for 64 GPU case on MI300X. This PR
fixes the failure.

[ROCm/rccl commit: 833435be18]
2024-08-26 18:37:58 -05:00
Wenkai Du 157cc5f6ba Add new Rome model (#1304)
* Add another rome model and override

* Fix bug

* Fix typo

* Add ring

* Update ring

* Fix model matching

* Clean up

* Clean up

* Reverse rings for NCCL_RINGS input

* Only reverse NCCL_RINGS for ring graph

* Fix mapping issue when using  NCCL_RINGS

* Add NCCL_RINGS_REMAP to handle inconsistant net names

[ROCm/rccl commit: 532b70afb6]
2024-08-23 08:45:43 +08:00
mberenjk 886b576722 adding all nccl apis to api_support to enable rccl tracing by rocprofv3 (#1297)
* adding all nccl apis to api_support to enable rccl tracing by rocprofv3

Co-authored-by: Marzieh Berenjkoub <mberenjk@amd.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>

[ROCm/rccl commit: db840f024e]
2024-08-22 12:36:07 -05:00
Wenkai Du d5a33e7107 Fix gfx940 CPX mode (#1290)
[ROCm/rccl commit: d3171b51b7]
2024-08-16 08:46:06 +08:00
Wenkai Du e770054b7f Fix model matching with PXN enable (#1295)
[ROCm/rccl commit: eff56735b0]
2024-08-16 06:16:00 +08:00
akolliasAMD 38e189bb1e removed hcc mentions (#1291)
[ROCm/rccl commit: d6c317d6ae]
2024-08-14 15:04:13 -06:00
Pedram Alizadeh e40a0939f1 adding new tunning table for very large number of nodes (#1288)
[ROCm/rccl commit: a25ca9bb90]
2024-08-09 10:47:42 -04:00
Tim 9fdecceefb Adding core binding in info (#1212)
Signed-off-by: AtlantaPepsi <timhu102@amd.com>

[ROCm/rccl commit: 4200964202]
2024-08-08 11:36:24 -04:00
Richard Barnes 92d874be50 Remove unused but set variable from all_reduce.h (#1258)
Allows `-Wunused-but-set-variable` to pass

[ROCm/rccl commit: d09b152aa0]
2024-07-29 08:11:24 -07:00
Richard Barnes 3d208c8eb9 Remove unused but set variable from prims_ll128.h (#1257)
Allows `-Wunused-but-set-variable` to pass

[ROCm/rccl commit: 86a4ad6e8b]
2024-07-29 08:11:01 -07:00
Richard Barnes 780324296c Remove unused but set variable from prims_ll.h (#1256)
Allows `-Wunused-but-set-variable` to pass

[ROCm/rccl commit: 7ad432ee23]
2024-07-29 08:10:38 -07:00
akolliasAMD 37c44d531b gfx12 Disable ll protocol (#1268)
[ROCm/rccl commit: c246e25f8e]
2024-07-26 08:59:55 -06:00
corey-derochie-amd 94910b8f80 Fix bug where the first collective call was using MSCCL instead of MSCCL++ (#1260)
[ROCm/rccl commit: 69135976d6]
2024-07-22 15:46:47 -06:00
saurabhAMD 24e1ed5288 Adding performance collection feature in rccl_replayer, and updating MSCCL logging and replayer parsing (#1265)
* Adding performance collection feature in rccl_replayer, and updating MSCCL logging and replayer parsing

* Performance collection feature in rccl_replayer, and updating MSCCL logging and replayer parsing

[ROCm/rccl commit: cf311b71ee]
2024-07-22 10:21:29 -05:00
corey-derochie-amd f2b2372056 Only initialize MSCCL++ when runtime-enabled. (#1266)
[ROCm/rccl commit: b31b4082dd]
2024-07-22 00:41:31 -06:00
Nusrat Islam df63c9772f Enable CPX mode for MI300X (#1259)
* graph: enable cpx mode for MI300X

* graph: tune limits for cpx and cleanup

[ROCm/rccl commit: 6f331b0d43]
2024-07-19 11:30:37 -05:00
Wenkai Du 54e4899607 Template unroll for RCCL kernels (#1250)
* Template unroll for RCCL kernels

* Adding unroll template arg during CMake hipification

* Reduce linking parallel jobs to avoid OOM in CI

* Workaround issues with UT tests

SWDEV-469533: register spill fix is needed for mainline build
LWPCOMMLIBS-369: cannot enable 112 channels with 80 CUs
Use -parallel-jobs=8 for linking

* CI: do not use -j 16 when building

* CI: use -j 8 when building

* Only reduce parallel linking job for CI extended

* Restore original jenkins command. Change parallel linking jobs in cmake

* Disable MSCCLPP

---------

Co-authored-by: gilbertlee-amd <gilbert.lee@amd.com>

[ROCm/rccl commit: 89349f2ce4]
2024-07-19 08:15:59 -07:00
Nilesh M Negi 73e17b3e70 Consistent channel shuffling for MI300X multi-node (#1255)
* Revert "[GRAPH] Use channel shuffling only for IB systems (#1228)"

This reverts commit 8a7dd0e590.

* Revert "Revert "Changing channel stride for MI300X multinode (#1196)" (#1224)"

This reverts commit bb6fab3d8e.

[ROCm/rccl commit: a1ef217b32]
2024-07-18 10:18:09 -05:00
Nilesh M Negi 13134c6c64 [GRAPH] Disable MSCCL override of no. of channels (#1187)
Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>

[ROCm/rccl commit: 67e867271f]
2024-07-15 10:45:21 -05:00
corey-derochie-amd da08e5ed1e Only enable MSCCL++ AllReduce for message sizes that are multiples 32 (#1253)
* Only enable MSCCL++ AllReduce for message sizes that are multiples of 32. MSCCL++ does not handle these other sizes.

* Sanitized MSCCL++ logging.

[ROCm/rccl commit: 9cbb3da224]
2024-07-12 17:04:23 -07:00
corey-derochie-amd b8542c2477 Integrated RCCL with MSCCL++ for small message sizes (#1231)
[ROCm/rccl commit: 6dc47eecd7]
2024-07-12 15:32:58 -06:00
Rahul Vaidya f60367f1c3 Improved version reporting in NCCL_DEBUG=VERSION (#1232)
* Improved version reporting in NCCL_DEBUG=VERSION.

Signed-off-by: rahulvaidya20 <ravaidya@amd.com>

* Version reporting changes

Signed-off-by: rahulvaidya20 <ravaidya@amd.com>

* Versioning changes: Initialized char arrays to null and fixed typo.

---------

Signed-off-by: rahulvaidya20 <ravaidya@amd.com>

[ROCm/rccl commit: c755b9cf93]
2024-07-12 08:14:29 -05:00
akolliasAMD 942555fd21 gfx12 initial enablement (#1219)
[ROCm/rccl commit: 63e4d76e23]
2024-07-10 13:32:09 -06:00
corey-derochie-amd 37bf54b8f8 Enable multi-threading for MSCCL (#1203)
MSCCL can now run in a multi-threaded configuration. To test in the unit tests, added the ENABLE_OPENMP compile definition flag and the --openmp-test-enable flag to the unit test build script. To activate, set the environment variables UT_MULTITHREADED=1 and UT_PROCESS_MASK=1. Set Jenkins to use this mode.

[ROCm/rccl commit: 0c36d571ea]
2024-07-04 09:34:38 -06:00
Wenkai Du b5bc883f61 Checking kernel header files only when missing sysfs entry (#1239)
[ROCm/rccl commit: 45f3fbc52f]
2024-07-03 15:53:15 -07:00
Nilesh M Negi 8a7dd0e590 [GRAPH] Use channel shuffling only for IB systems (#1228)
* [GRAPH] Use channel shuffling only for IB systems

Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>

* [GRAPH] Define channels=48 for gfx94 RoCE systems

Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>

* [GRAPH] Increase channels for RoCE gfx94 systems

Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>

---------

Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>

[ROCm/rccl commit: 5be3b713ef]
2024-07-02 12:20:40 -05:00
Wenkai Du b3e9d2d61b NPKit: separate time stamps for GPU access from different blocks (#1229)
To avoid races in memory access in GPU

[ROCm/rccl commit: 9d8f68b4ee]
2024-06-28 08:00:22 -07:00
Nusrat Islam c24b1ff14f graph: fix minNchannels for multi-node overwrite (#1230)
[ROCm/rccl commit: b09ea29d66]
2024-06-26 16:56:10 -05:00
Wenkai Du bb6fab3d8e Revert "Changing channel stride for MI300X multinode (#1196)" (#1224)
This reverts channel stride change in commit
a009e43f3c

[ROCm/rccl commit: ad31d93f3d]
2024-06-25 14:03:30 -07:00
saurabhAMD de7ea612d7 Unit Tests for testing channels (#1222)
[ROCm/rccl commit: e170f41ddd]
2024-06-25 10:10:10 -05:00
Nusrat Islam 3c7bbd3243 Merge pull request #1223 from nusislam/minNchannels-multinode
graph: fix minNchannels for multi-node

[ROCm/rccl commit: 9f2514e5c8]
2024-06-25 10:03:35 -05:00
Wenkai Du 2e6c26a36c Fix DMABUF support (#1218)
* Fix DMABUF support

* Reduce log output by moving dmabuf allocation details to TRACE

* Enable peer memory GDR support if ib_umem_get_peer is in kernel

[ROCm/rccl commit: 5d7078e383]
2024-06-25 08:00:15 -07:00
Nusrat Islam bf164da244 graph: fix minNchannels for multi-node
Multi-node rccl was not correctly setting the minNchannels value. This
PR fixes the bug.


[ROCm/rccl commit: 05df0f8cea]
2024-06-24 16:42:44 -05:00
Sylvain Jeaugey 5ca1b6c160 2.22.3-1
Rework core for NVIDIA Trusted Computing
 * Compress work structs so that they are shared between channels
 * Utilize the full amount of kernel argument space permitted (4k)
   before resorting to work fifo.
 * Rework the task preprocessing phase.
 * Use a separate abortDevFlag which is kept in sync with abortFlag
   using cudaMemcpy operations.
 * Rename src/include/align.h to src/include/bitops.h

Add lazy connection establishment for collective operations
 * Move buffer allocation and connection establishment to the first
   collective operation using that algorithm.
 * Accelerate init time and reduce memory usage.
 * Avoid allocating NVLS buffers if all calls are registered.
 * Compute algo/proto in ncclLaunchCollTasksInfo early on.
 * Connect peers in ncclCollPreconnectFunc if not connected already.
 * Also move shared buffer creation to the first send/recv call.

Accelerate intra-node NVLink detection
 * Make each rank only detect NVLinks attached to its GPU.
 * Fuse XMLs to reconstruct the full NVLink topology

Add init profiling to report time spend in different init phases.
 * Report timings of bootstrap, allgather, search, connect, etc.
 * Add new "PROFILE" category for NCCL_DEBUG_SUBSYS.

Add support for PCI p2p on split PCI switches
 * Detect split PCI switches through a kernel module exposing
   switch information.
 * Update the topology XML and graph to add those inter-switch
   connections.

Add cost estimation API
 * Add a new ncclGroupEndSimulate primitive to return the estimated
   time a group would take.

Net/IB: Add separate traffic class for fifo messages
 * Add NCCL_IB_FIFO_TC to control the traffic class of fifo messages
   independently from NCCL_IB_TC.
   Merges PR #1194

Net/IB: Add support for IB router
 * Use flid instead of lid if subnets do not match
 * Warn if flid is 0

Optimizations and fixes for device network offload (unpack)
 * Double the default number of channels
 * Cache netDeviceType
 * Fix save/increment head logic to enable Tree support.

Support ncclGroupStart/End for ncclCommAbort/Destroy
 * Allow Abort/Destroy to be called within a group when managing
   multiple GPUs with a single process.

Improve Tuner API
 * Provide to the plugin the original cost table so that the plugin
   can leave unknown or disabled algo/proto combinations untouched.
 * Remove nvlsSupport and collnetSupport.

Do not print version to stdout when using a debug file
 * Also print version from all processes with INFO debug level.
   Fixes issue #1271

Fix clang warnings in NVTX headers
 * Update NVTX headers to the latest version
   Fixes issue #1270

Disable port fusion in heterogeneous systems
 * Do not fuse ports if a mix of multi-port and single port are detected.

Fix NVLS graphs search for dual NICs.
 * Fix NVLS graph search when we have more than one NIC per GPU.

Fix crash with collnetDirect
 * Add separate graph search for collnetDirect, testing alltoall paths
   and working similarly to the NVLS search.

Fix hang when nodes have different CPU types
 * Add the CPU type to the rank peer info.
 * Align all ranks on the CPU type after the first allgather.
 * Only use the aligned CPU type for all tuning operations.
   Fixes issue #1136
   Fixes issue #1184

Fix performance of registered send/recv operations
 * Allow for single full size operations
 * Add INFO to confirm the registration of send/recv buffers.

Move all sync ops to finalize stage
 * Ensure ncclCommDestroy is non-blocking if ncclCommFinalize has
   been called.

Improve error reporting during SHM segment creation

Improve support of various compilers
   Merges PR #1177
   Merges PR #1228

Allow net and tuner plugins to be statically linked
 * Search for ncclNet or ncclTuner symbols in the main binary.
   Merges PR #979

Plugin examples includes cleanup
 * Harmonize err.h and common.h usage.
 * Add mixed plugin with both net and tuner.


[ROCm/rccl commit: 178b6b7590]
2024-06-19 01:57:16 -07:00
Paul Emberson f7fb3392fb fix initOnceFunc setting incorrect result code (#1205)
Addresses DMA-BUF support check unexpectedly failing

[ROCm/rccl commit: 435756af02]
2024-06-07 16:47:19 -07:00
Nusrat Islam 7c029672a8 Merge pull request #1200 from nusislam/multi-node-256-fix
graph: fix multi-node channel count

[ROCm/rccl commit: 9660e2e2dc]
2024-06-07 14:34:20 -05:00
Nilesh M Negi 9b88e59ea4 Fix min_nchannels bug for gfx94* nranks=4 (#1202)
Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>

[ROCm/rccl commit: d9661c17e6]
2024-06-07 14:31:28 -05:00
gilbertlee-amd efe851cfff Disabling NUMA maching for model 79 for some VM configs (#1204)
[ROCm/rccl commit: 9b94a1052f]
2024-06-06 17:15:04 -06:00