Skip to content

Commit

Permalink
Merge branch 'cuda_9_update' into 'master'
Browse files Browse the repository at this point in the history
Update for CUDA 9.0

See merge request amd/hipRAND!129
  • Loading branch information
Adel Johar committed Sep 28, 2017
2 parents 758a1e4 + 4df7fe5 commit 383ebce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions library/src/rng/philox4x32_10.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ namespace detail {

inline __device__ unsigned int warp_reduce_min(unsigned int val, int size) {
for (int offset = size/2; offset > 0; offset /= 2) {
#if defined(__HIP_PLATFORM_NVCC__) && __CUDACC_VER_MAJOR__ >= 9
unsigned int temp = __shfl_xor_sync(0xffffffff, (int)val, offset);
#else
unsigned int temp = __shfl_xor((int)val, offset);
#endif
val = (temp < val) ? temp : val;
}
return val;
Expand Down

0 comments on commit 383ebce

Please sign in to comment.