Skip to content

Commit

Permalink
pylayer support HIP (#38184)
Browse files Browse the repository at this point in the history
  • Loading branch information
MingMingShangTian committed Dec 16, 2021
1 parent af30f54 commit 2e76d5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions paddle/fluid/operators/py_layer_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ REGISTER_OP_CPU_KERNEL(
::paddle::platform::complex<float>>,
ops::PyLayerOpKernel<paddle::platform::CPUDeviceContext,
::paddle::platform::complex<double>>);
#ifdef PADDLE_WITH_CUDA
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
REGISTER_OP_CUDA_KERNEL(
py_layer, ops::PyLayerOpKernel<paddle::platform::CUDADeviceContext, float>,
ops::PyLayerOpKernel<paddle::platform::CUDADeviceContext,
Expand All @@ -239,4 +239,4 @@ REGISTER_OP_CUDA_KERNEL(
::paddle::platform::complex<float>>,
ops::PyLayerOpKernel<paddle::platform::CUDADeviceContext,
::paddle::platform::complex<double>>);
#endif // PADDLE_WITH_CUDA
#endif // PADDLE_WITH_CUDA || PADDLE_WITH_HIP

0 comments on commit 2e76d5a

Please sign in to comment.