From 05f7d0c55811192bb38809d009141e0fa115ef0b Mon Sep 17 00:00:00 2001 From: duanyanhui <45005871+YanhuiDua@users.noreply.github.com> Date: Mon, 15 Aug 2022 15:30:23 +0800 Subject: [PATCH] Fix compile error of windows platform(atomicAdd in grid_sample_grad_kernel) (#45131) * fix compile error --- .../kernels/gpu/grid_sample_grad_kernel.cu | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/paddle/phi/kernels/gpu/grid_sample_grad_kernel.cu b/paddle/phi/kernels/gpu/grid_sample_grad_kernel.cu index 551f9c53bc0..436faeaabf9 100644 --- a/paddle/phi/kernels/gpu/grid_sample_grad_kernel.cu +++ b/paddle/phi/kernels/gpu/grid_sample_grad_kernel.cu @@ -34,18 +34,18 @@ static __forceinline__ __device__ void AtomicAdd( template static __forceinline__ __device__ void AtomicAdd3D(T* data, - int64_t d, - int64_t h, - int64_t w, - int64_t sD, - int64_t sH, - int64_t sW, - int64_t D, - int64_t H, - int64_t W, + int d, + int h, + int w, + int sD, + int sH, + int sW, + int D, + int H, + int W, T delta) { if (InBounds3D(d, h, w, D, H, W)) { - atomicAdd(data + d * sD + h * sH + w * sW, delta); + paddle::platform::CudaAtomicAdd(data + d * sD + h * sH + w * sW, delta); } } -- GitLab