Files
rocm-systems/projects/rccl/ext-src/non-multiple-128-fix.patch
T
Ameya Keshava Mallya 42d84317cf Add 'projects/rccl/' from commit '1f2f9f33bac3e8ecfd84c69af6063d7352c362fc'
git-subtree-dir: projects/rccl
git-subtree-mainline: 3fd8a0d393
git-subtree-split: 1f2f9f33ba
2025-12-11 20:46:05 +00:00

17 wiersze
665 B
Diff

diff --git a/apps/nccl/src/allreduce.hpp b/apps/nccl/src/allreduce.hpp
index 76674ba..7a2cd4a 100644
--- a/apps/nccl/src/allreduce.hpp
+++ b/apps/nccl/src/allreduce.hpp
@@ -368,7 +368,10 @@ __global__ void __launch_bounds__(512, 1)
const size_t chanOffset = nPeer * blockIdx.x;
// assume (nelems * sizeof(T)) is divisible by (16 * worldSize)
const size_t nInt4 = nelems * sizeof(T) / sizeof(int4);
- const size_t nInt4PerRank = nInt4 / worldSize;
+ size_t nInt4PerRank = nInt4 / worldSize;
+ if (nInt4 % worldSize)
+ nInt4PerRank = nInt4PerRank + 1;
+
auto smChans = smChannels + chanOffset;
auto smOutChans = smOutChannels + chanOffset;