mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
Fixed __shfl() and __ballot() warnings
This commit is contained in:
@ -84,7 +84,11 @@ __global__ void set_zero_kernel(float *src, int size)
|
||||
__inline__ __device__
|
||||
float warpAllReduceSum(float val) {
|
||||
for (int mask = WARP_SIZE / 2; mask > 0; mask /= 2)
|
||||
#if CUDA_VERSION >= 9000
|
||||
val += __shfl_xor_sync(0xffffffff, val, mask);
|
||||
#else
|
||||
val += __shfl_xor(val, mask);
|
||||
#endif
|
||||
return val;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user