From 2e76d5ad969f8cfde0295418a7a1d93a03da50dc Mon Sep 17 00:00:00 2001 From: chentianyu03 Date: Thu, 16 Dec 2021 17:33:55 +0800 Subject: [PATCH] pylayer support HIP (#38184) --- paddle/fluid/operators/py_layer_op.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/operators/py_layer_op.cc b/paddle/fluid/operators/py_layer_op.cc index ce6db633c95..14c9e8b0c26 100644 --- a/paddle/fluid/operators/py_layer_op.cc +++ b/paddle/fluid/operators/py_layer_op.cc @@ -220,7 +220,7 @@ REGISTER_OP_CPU_KERNEL( ::paddle::platform::complex>, ops::PyLayerOpKernel>); -#ifdef PADDLE_WITH_CUDA +#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) REGISTER_OP_CUDA_KERNEL( py_layer, ops::PyLayerOpKernel, ops::PyLayerOpKernel>, ops::PyLayerOpKernel>); -#endif // PADDLE_WITH_CUDA +#endif // PADDLE_WITH_CUDA || PADDLE_WITH_HIP -- GitLab