未验证 提交 05f7d0c5 编写于 作者: D duanyanhui 提交者: GitHub

Fix compile error of windows platform(atomicAdd in grid_sample_grad_kernel) (#45131)

* fix compile error
上级 6815c8ab
...@@ -34,18 +34,18 @@ static __forceinline__ __device__ void AtomicAdd( ...@@ -34,18 +34,18 @@ static __forceinline__ __device__ void AtomicAdd(
template <typename T> template <typename T>
static __forceinline__ __device__ void AtomicAdd3D(T* data, static __forceinline__ __device__ void AtomicAdd3D(T* data,
int64_t d, int d,
int64_t h, int h,
int64_t w, int w,
int64_t sD, int sD,
int64_t sH, int sH,
int64_t sW, int sW,
int64_t D, int D,
int64_t H, int H,
int64_t W, int W,
T delta) { T delta) {
if (InBounds3D(d, h, w, D, H, W)) { 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);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册