diff --git a/src/collectives/device/common_kernel.h b/src/collectives/device/common_kernel.h index 28e86c3ca9..c5092cf52a 100644 --- a/src/collectives/device/common_kernel.h +++ b/src/collectives/device/common_kernel.h @@ -343,8 +343,12 @@ __device__ void ReduceCopy128bMulti( const int w, const int nw, const int t, } } +#if defined(__HIP_PLATFORM_HCC__) || defined(__HCC__) || defined(__HIPCC__) template +__device__ int ptrAlign128(T* ptr) { return (uint64_t)ptr % alignof(int32_t); } +#else __device__ int ptrAlign128(T* ptr) { return (uint64_t)ptr % alignof(Pack128); } +#endif // Try to limit consecutive load/stores to 8. // Use UNROLL 8 when we have a single source and a single destination, 4 otherwise @@ -366,9 +370,15 @@ __device__ void ReduceOrCopyMulti(const int tid, const int nthreads, for (int i=0; i