diff --git a/paddle/phi/kernels/funcs/elementwise_functor.h b/paddle/phi/kernels/funcs/elementwise_functor.h index a4636565cf25a0c6a4dfc5e37bbafc92823fbd25..1304fedbd2e24284dc528127e5d33a7e1e66439d 100644 --- a/paddle/phi/kernels/funcs/elementwise_functor.h +++ b/paddle/phi/kernels/funcs/elementwise_functor.h @@ -570,7 +570,7 @@ struct FloorDivideFunctor { #ifndef PADDLE_WITH_XPU_KP PADDLE_ENFORCE(b != 0, DIV_ERROR_INFO); #endif - return static_cast(std::trunc(a / b)); + return static_cast(a / b); } }; @@ -580,7 +580,7 @@ struct InverseFloorDivideFunctor { #ifndef PADDLE_WITH_XPU_KP PADDLE_ENFORCE(a != 0, DIV_ERROR_INFO); #endif - return static_cast(std::trunc(b / a)); + return static_cast(b / a); } };