From 2e7c172c07841f4f0e277527405b9a10fc93bf11 Mon Sep 17 00:00:00 2001 From: limingshu <61349199+JamesLim-sy@users.noreply.github.com> Date: Thu, 8 Dec 2022 19:58:16 +0800 Subject: [PATCH] first commit (#38143) --- paddle/fluid/operators/fused/attn_bias_add.cu.h | 2 +- paddle/fluid/operators/optimizers/lars_momentum_op.cu | 2 +- .../{fluid/platform => phi/kernels/funcs}/fast_divmod.h | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) rename paddle/{fluid/platform => phi/kernels/funcs}/fast_divmod.h (95%) diff --git a/paddle/fluid/operators/fused/attn_bias_add.cu.h b/paddle/fluid/operators/fused/attn_bias_add.cu.h index b44faf31501..0c8618972e8 100644 --- a/paddle/fluid/operators/fused/attn_bias_add.cu.h +++ b/paddle/fluid/operators/fused/attn_bias_add.cu.h @@ -34,7 +34,7 @@ namespace cub = hipcub; #include "paddle/fluid/operators/elementwise/elementwise_op_broadcast.cu.h" #include "paddle/fluid/operators/kernel_primitives/kernel_primitives.h" #include "paddle/fluid/operators/reduce_ops/reduce_op.cu.h" -#include "paddle/fluid/platform/fast_divmod.h" +#include "paddle/phi/kernels/funcs/fast_divmod.h" namespace paddle { namespace operators { diff --git a/paddle/fluid/operators/optimizers/lars_momentum_op.cu b/paddle/fluid/operators/optimizers/lars_momentum_op.cu index 30f38004241..43ac1532d4f 100644 --- a/paddle/fluid/operators/optimizers/lars_momentum_op.cu +++ b/paddle/fluid/operators/optimizers/lars_momentum_op.cu @@ -15,7 +15,7 @@ limitations under the License. */ #include "paddle/fluid/operators/optimizers/lars_momentum_op.h" #include "paddle/fluid/framework/op_registry.h" #include "paddle/fluid/operators/amp/fp16_type_traits.h" -#include "paddle/fluid/platform/fast_divmod.h" +#include "paddle/phi/kernels/funcs/aligned_vector.h" #include "paddle/phi/kernels/funcs/math_cuda_utils.h" #if CUDA_VERSION >= 11000 diff --git a/paddle/fluid/platform/fast_divmod.h b/paddle/phi/kernels/funcs/fast_divmod.h similarity index 95% rename from paddle/fluid/platform/fast_divmod.h rename to paddle/phi/kernels/funcs/fast_divmod.h index 892c5b29aae..cdd9524627b 100644 --- a/paddle/fluid/platform/fast_divmod.h +++ b/paddle/phi/kernels/funcs/fast_divmod.h @@ -23,8 +23,8 @@ limitations under the License. */ #define __forceinline__ __inline__ #endif -namespace paddle { -namespace platform { +namespace phi { +namespace funcs { struct FastDivMod { // 1st value represents the result of input number divides by recorded divisor @@ -64,5 +64,5 @@ struct FastDivMod { uint32_t multiplier; }; -} // namespace platform -} // namespace paddle +} // namespace funcs +} // namespace phi -- GitLab