Commit Graph

809 Commits

Author SHA1 Message Date
Bertan Dogancay e261b0ef93 Fix ROCTX call for MSCCL (#1502)
[ROCm/rccl commit: dd185f26d2]
2025-01-23 16:00:07 -07:00
BertanDogancay 1b000665df Merge remote-tracking branch 'nccl/master' into develop
[ROCm/rccl commit: 36343be84f]
2025-01-23 12:08:46 -06:00
corey-derochie-amd abc9197821 Removing duplicate definitions of INC_COLL_TRACE and traceData macros (#1500)
They are nearly identical, except the common.h definition sets `collTrace->channelId`.

[ROCm/rccl commit: f77308a2fe]
2025-01-22 16:50:27 -07:00
isaki001 835c708a92 fix scatter_perf crash (#1493)
* fix scatter_perf crash

* Update src/misc/msccl/msccl_lifecycle.cc

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

* Update src/misc/msccl/msccl_lifecycle.cc

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

* More buffsRegisteredNonGraphMode spelling fixes.

---------

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

[ROCm/rccl commit: ff130cce7a]
2025-01-21 09:24:32 -06:00
isaki001 25150b1f20 update mscclpp (#1488)
* update commit hash for mscclpp submodule

* update mscclpp submodule

* remove print messages in cmake

* add back some print messages, update MSCLPP CMAKE_ARGS

* enable MSCCL++ patches regardless of finding mscclpp_nccl package

[ROCm/rccl commit: d89432e8c8]
2025-01-20 08:06:43 -06:00
corey-derochie-amd ebacc24598 Added RCCL env params to control setting the SO_REUSEADDR and SO_LINGER socket options (#1418)
* Added RCCL env params to control setting the SO_REUSEADDR and SO_LINGER socket options. This can allow control over the number of file descriptors created during bootstrapping.

* Casted the linger value to `int` sooner to avoid a scope of unknown typed-ness.

* Added CHANGELOG entry for this feature.

[ROCm/rccl commit: 2e35417fe5]
2025-01-14 10:26:04 -07:00
Nusrat Islam cf907dbf61 Add MSCCLPP user buffer registration APIs and integrate with RCCL (#1477)
* ext-src: add MSCCLPP memory registration APIs

* update mem-reg patch with mscclpp helper routine to check if buffer is registered

* RCCL integration of MSCCL++ user-buffer registration APIs

* only include mscclpp_nccl header if ENABLE_MSCCLPP is defined

* ext-src: update mscclpp mem-reg patch

* add helper routine to patch

* check handle before MSCCL++ deregister

* fix typo to replace send buff with recv buff

* in case of no mscclpp registration, dduring deRegister call, ont fall back to rccl deRegister which will return an error

* Apply suggestions from code review

Whitespace suggestions and reducing diffs to avoid future merge conflicts

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

* rename helper functions and change their return type

* set RCCL user-buffer registration to occur if attempting MSCCL++ registration with a buffer in managed memory

---------

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

[ROCm/rccl commit: e9b6bbca8a]
2025-01-14 08:20:24 -06:00
Dingming Wu b6ae2fd71d improving kernel traces on opCount bits and adding channelId in ncclCollTrace (#1485)
[ROCm/rccl commit: 69d0134ed2]
2025-01-10 07:57:46 -08:00
Luna 28c80c9b4e net_ib: fix out of bounds read in ncclIbGdrSupport on non-RDMA kernel (#1470)
Fixes #1469

[ROCm/rccl commit: b24580e3d4]
2025-01-07 16:49:24 -08:00
qiwei_ji 2b9394f08a Check nvlink_node instead of xgmi_node in xml.cc (#1407)
It seems like here wants to check xgmi_node instead. If checks node for "nvlink", it will verify the link_info everytime.
If checks node for "xgmi", when get yes answer, it won't need check vsmi topo interface.

[ROCm/rccl commit: f2ee8d9132]
2025-01-06 17:09:27 -08:00
Xeonacid f3e883805c Define wc_store_fence for riscv (#1475)
[ROCm/rccl commit: c6c7b6db98]
2025-01-06 16:59:14 -08:00
corey-derochie-amd 17becdb7f8 [SWDEV-497665] Blocked cudaMemcpyAsync race condition by synchronizing (#1447)
* Switched calls to `cudaMemcpyAsync` to be `cudaMemcpy` in `ncclTransportP2pSetup` to avoid race condition with `cudaIpcOpenMemHandle` inside p2p `connect`. See `ncclP2pImportShareableBuffer`.

* Moved synchronize outside of the loop, as it isn't necessary to sync between every iteration of the loop.

[ROCm/rccl commit: c158d3a9b4]
2025-01-03 13:06:47 -07:00
Mustafa Abduljabbar dd3fc22531 Add macro for channel mask offset (#1467)
[ROCm/rccl commit: a9d6e7661c]
2025-01-03 08:41:41 -05:00
Mustafa Abduljabbar 4588da1888 Remove unneeded highestTransportType (#1461)
[ROCm/rccl commit: e6b179d627]
2024-12-16 13:28:47 -05:00
Ziyue Yang 987dfc3b5d Fix MSCCL algorithm loading order (#1460)
[ROCm/rccl commit: 83c5eb7378]
2024-12-16 07:41:17 -08:00
Hujingbo bea86f6248 increase p2p channels for Intel platform (#1448)
Co-authored-by: hujingbo <hujingbo@kuaishou.com>

[ROCm/rccl commit: ad4c36dc34]
2024-12-10 07:33:37 -08:00
Benjamin Kitor fe806d5427 Add Topologies for 16-GPU gfx942 SuperNode (#1417)
* Add Topologies for 16-GPU gfx942 SuperNode

- Add GigaIO topologies to tools/topo_expl for dev and testing
- Add GigaIO Columba 16 GPU romeModel and adjust topology
  matching algorithm in rome_models for 16 GPU system
- Fix bug which failed to match Rome Model when using subsets
  of system resources (i.e. ROCR_VISIBLE_DEVICES is set)
- Fixes for topo_expl

* Fix bug w/ 1H16P

[ROCm/rccl commit: a05329bd0d]
2024-12-03 13:12:03 -08:00
gilbertlee-amd be0865f335 Adding RCCL_MODEL_REVERSAL_DISABLE env var to disable model reversal (#1431)
* Adding RCCL_MODEL_REVERSAL_DISABLE env var to disable model reversal

[ROCm/rccl commit: 000575867c]
2024-11-25 11:24:54 -07:00
Bertan Dogancay df51937f09 Fix typo in ncclGetKernelIndex macro (#1424)
[ROCm/rccl commit: dfe4a3ed81]
2024-11-18 10:40:05 -05:00
Bertan Dogancay 9041572e23 Template generic kernel for unroll factor (#1419)
* Template generic kernel for unroll factor

[ROCm/rccl commit: cb175fb0b3]
2024-11-12 18:27:29 -05:00
darren-amd 61258b9a9f remove undefined computeColl declaration
[ROCm/rccl commit: ebf0417e90]
2024-11-04 13:42:01 -05:00
corey-derochie-amd ad1384bea1 Hide or fix all build warnings (#1331)
* Changing C-strings to be const.

* Changed variable-length arrays to std::vector to avoid warnings. VLA is a compiler extension.

* Changed `#define` inside functions into `constexpr int` to preserve scoping and avoid macro redefinition warnings.

* Disabled warnings for modifying `CMAKE_CXX_FLAGS` caused by `check_symbol_exists`, which temporarily modifies the flag to do a compile check.

* Fixed VLA in rccl UT.

[ROCm/rccl commit: 1c45962273]
2024-11-04 09:46:42 -07:00
Abhishek Kulkarni 595cda2ab9 GDR enablement logic fix for kernel 6.4.0+ (#1378)
[ROCm/rccl commit: 6178556853]
2024-11-03 01:20:07 -05:00
Avinash da3887bafb Memory leak fixes in hostside functions (#1388)
memory leak fixes for parseRome4P2H and ncclTopoAddGPU

[ROCm/rccl commit: d6006f0425]
2024-10-30 14:25:56 -05:00
corey-derochie-amd af1e36a7ee Remove MSCCL switch case fall-through by adding break statement. (#1342)
[ROCm/rccl commit: ea20af698e]
2024-10-29 15:47:59 -06:00
gilbertlee-amd 02bf3a3bf8 Adding support for odd nodes for model_87 (#1309)
[ROCm/rccl commit: 0cbce2a757]
2024-10-24 08:38:12 -06:00
Arm Patinyasakdikul 928414ac06 Increased maximum number of XML nodes to support CPX mode. (#1386)
[ROCm/rccl commit: 29f87c7191]
2024-10-23 11:15:11 -05:00
Wenkai Du 075381ee2e Fix topology discovery in container with subset of GPUs (#1384)
* Fix topology discovery in container with subset of GPUs

* Move links counting out of loop

[ROCm/rccl commit: e0780ba4d4]
2024-10-22 13:50:23 -07:00
Bertan Dogancay 57710c1183 Dynamically select unroll factor to build for when targeting local arch (#1371)
* Dynamically select unroll factor to build for when targeting local arch only

[ROCm/rccl commit: 373f113524]
2024-10-21 10:53:11 -04:00
Wenkai Du 5ee84e0353 Increase CQ size to 3*MAX_REQUESTS (#1374)
* Increase CQ size to 3*MAX_REQUESTS

Suggested by Rukhsana Ansari <rukhsana.ansari@broadcom.com>

* Reword comments based on feedback from Rukhsana

[ROCm/rccl commit: 7c077db307]
2024-10-18 11:01:03 -07:00
akolliasAMD ad2c8c3eb8 added atomic acquire for gfx12 on prims_simple (#1382)
[ROCm/rccl commit: af5678641d]
2024-10-18 11:26:38 -06:00
Wenkai Du bd0cdf5a50 Add back missing net flush (#1376)
[ROCm/rccl commit: c8d3543d3f]
2024-10-15 08:12:26 -07:00
Wenkai Du 09acdb6b49 Allow zero byte sendrecv in alltoallv (#1349)
* Allow zero byte sendrecv in alltoallv

* Fix previous merge error

[ROCm/rccl commit: 821d2e1f30]
2024-10-11 10:40:32 -07:00
Wenkai Du 4cd1b3a9f5 Improve model matching for GPUs with alltoall XGMI connection (#1372)
[ROCm/rccl commit: 5c367a21d0]
2024-10-11 09:53:14 -07:00
Arm Patinyasakdikul ef54dd7cbc Increase default number of channels for MI300A in multi-node scenario. (#1366)
This commit changed the default of channels of MI300A from 8 upto 24.
This helps bring up multi-node performance to the expected level.

[ROCm/rccl commit: 133ea201cf]
2024-10-11 11:37:48 -05:00
Wenkai Du 1b988c1b31 Fix crash when PXN is enabled on some platforms (#1369)
[ROCm/rccl commit: b55b6be0cb]
2024-10-11 09:02:59 -07:00
corey-derochie-amd 35d98330f2 Only set minNchannels if we are actually using MSCCL, checked using comm->mscclCompatible. (#1337)
[ROCm/rccl commit: c11f6b1531]
2024-10-08 10:20:55 -06:00
akolliasAMD 949fdd027b disabled wbinvl1 for gfx9x on ll128 (#1365)
[ROCm/rccl commit: bc519fd733]
2024-10-08 08:43:29 -06:00
Nilesh M Negi cd29f1e22f [TRANSPORT] Add RCCL_FORCE_ENABLE_GDRDMA for debugging (#1356)
Signed-off-by: nileshnegi <Nilesh.Negi@amd.com>

[ROCm/rccl commit: 8ad76f8d10]
2024-10-06 18:43:49 -05:00
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
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