Skip to content

Commit

Permalink
add defined cuda macro to cuda/conj_kernel.h
Browse files Browse the repository at this point in the history
  • Loading branch information
MingMingShangTian committed Dec 20, 2021
1 parent 85dbe74 commit 8f4c482
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 0 additions & 2 deletions paddle/pten/kernels/cuda/conj_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ void Conj(const CUDAContext& dev_ctx, const DenseTensor& x, DenseTensor* out) {

} // namespace pten

#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
PT_REGISTER_KERNEL(conj,
CUDA,
ALL_LAYOUT,
Expand All @@ -38,4 +37,3 @@ PT_REGISTER_KERNEL(conj,
double,
int,
int64_t) {}
#endif
5 changes: 5 additions & 0 deletions paddle/pten/kernels/cuda/conj_kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ limitations under the License. */

#pragma once

// CUDA and HIP use same api
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)

#include "paddle/pten/backends/cuda/cuda_context.h"
#include "paddle/pten/core/dense_tensor.h"

Expand All @@ -23,3 +26,5 @@ template <typename T>
void Conj(const CUDAContext& dev_ctx, const DenseTensor& x, DenseTensor* out);

} // namespace pten

#endif

1 comment on commit 8f4c482

@paddle-bot-old
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulation! Your pull request passed all required CI. You could ask reviewer(s) to approve and merge. 🎉

Please sign in to comment.