Tweak unroll factors.

[ROCm/rccl commit: 84054c3b30]
This commit is contained in:
Wen-Heng (Jack) Chung
2022-09-22 13:02:56 -05:00
parent e4d46a0f64
commit 7cde92deff
3 changed files with 3 additions and 10 deletions
@@ -172,7 +172,6 @@ __device__ void ReduceCopy128bMulti(const int w, const int nw, const int t,
for (int u = 0; u < UNROLL; ++u) Fetch128(vals2[u], srcs[i]+u*WARP_SIZE);
for (int u = 0; u < UNROLL; ++u) MULTI128<FUNC, T>()(vals[u], vals2[u]);
}
#pragma unroll 1
for (int i=MINSRCS; i<MAXSRCS && i<nsrcs; i++) {
Pack128 vals2[UNROLL];
for (int u = 0; u < UNROLL; ++u) Fetch128(vals2[u], srcs[i]+u*WARP_SIZE);
@@ -183,7 +182,6 @@ __device__ void ReduceCopy128bMulti(const int w, const int nw, const int t,
for (int i = 0; i < MINDSTS; i++) {
for (int u = 0; u < UNROLL; ++u) Store128(dsts[i]+u*WARP_SIZE, vals[u]);
}
#pragma unroll 1
for (int i=MINDSTS; i<MAXDSTS; i++) {
if (i<ndsts) {
for (int u = 0; u < UNROLL; ++u) Store128(dsts[i]+u*WARP_SIZE, vals[u]);
@@ -264,4 +262,4 @@ __device__ __forceinline__ void ReduceOrCopyMulti(const int tid, const int nthre
ReduceCopyMulti<FUNC, T, 1, MINSRCS, MAXSRCS, MINDSTS, MAXDSTS>(w, nw, t, nsrcs, srcs, ndsts, dsts, offset, Nrem);
}
#endif
#endif