From e97c1a8ca04bdbfe8906e74f9433afad58fa2d7f Mon Sep 17 00:00:00 2001 From: chengduoZH Date: Thu, 3 May 2018 12:58:32 +0800 Subject: [PATCH] fix __shfl --- paddle/fluid/platform/cuda_device_function.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/paddle/fluid/platform/cuda_device_function.h b/paddle/fluid/platform/cuda_device_function.h index 7cfeaab35b..2405f33d4f 100644 --- a/paddle/fluid/platform/cuda_device_function.h +++ b/paddle/fluid/platform/cuda_device_function.h @@ -35,6 +35,16 @@ __forceinline__ __device__ T __shfl_sync(unsigned, T val, int src_line, #define FULL_WARP_MASK 0xFFFFFFFF #define CREATE_SHFL_MASK(mask, predicate) \ mask = __ballot_sync(FULL_WARP_MASK, (predicate)) +template +__forceinline__ __device__ T __shfl_down_sync(unsigned mask, T val, int delta) { + return __shfl_down_sync(mask, val, delta); +} + +template +__forceinline__ __device__ T __shfl_sync(unsigned mask, T val, int src_line, + int width) { + return __shfl_sync(mask, val, src_line, width); +} #endif template -- GitLab