|
12 | 12 | // See the License for the specific language governing permissions and |
13 | 13 | // limitations under the License. |
14 | 14 |
|
| 15 | +#include "paddle/fluid/operators/reduce_ops/reduce_functor_op.h" |
| 16 | +#include "paddle/fluid/operators/reduce_ops/reduce_op.cu.h" |
15 | 17 | #include "paddle/fluid/operators/reduce_ops/reduce_prod_op.h" |
16 | 18 |
|
17 | | -#ifdef __HIPCC__ |
18 | | -// Eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h:922 |
19 | | -// do not support double in HIPCC platform (Eigen3 to be fixed) |
20 | | -REGISTER_OP_CUDA_KERNEL(reduce_prod, |
21 | | - ops::ReduceKernel<paddle::platform::CUDADeviceContext, |
22 | | - float, ops::ProdFunctor>, |
23 | | - ops::ReduceKernel<paddle::platform::CUDADeviceContext, |
24 | | - int, ops::ProdFunctor>, |
25 | | - ops::ReduceKernel<paddle::platform::CUDADeviceContext, |
26 | | - int64_t, ops::ProdFunctor>); |
27 | | -#else |
28 | | -REGISTER_OP_CUDA_KERNEL(reduce_prod, |
29 | | - ops::ReduceKernel<paddle::platform::CUDADeviceContext, |
30 | | - float, ops::ProdFunctor>, |
31 | | - ops::ReduceKernel<paddle::platform::CUDADeviceContext, |
32 | | - double, ops::ProdFunctor>, |
33 | | - ops::ReduceKernel<paddle::platform::CUDADeviceContext, |
34 | | - int, ops::ProdFunctor>, |
35 | | - ops::ReduceKernel<paddle::platform::CUDADeviceContext, |
36 | | - int64_t, ops::ProdFunctor>); |
37 | | -#endif |
| 19 | +// reduce_prod |
| 20 | +REGISTER_OP_CUDA_KERNEL( |
| 21 | + reduce_prod, ops::ReduceCudaKernel<float, paddle::operators::CustomMul>, |
| 22 | + ops::ReduceCudaKernel<int, paddle::operators::CustomMul>, |
| 23 | + ops::ReduceCudaKernel<double, paddle::operators::CustomMul>, |
| 24 | + ops::ReduceCudaKernel<int64_t, paddle::operators::CustomMul>); |
0 commit comments