Skip to content

Conversation

@iclementine
Copy link

@iclementine iclementine commented Feb 18, 2022

PR types

Others

PR changes

Others

Describe

  1. Move LSTM compute related files
paddle/fluid/operators/math/lstm_compute.h => paddle/phi/kernels/funcs/lstm_compute.h paddle/fluid/operators/math/lstm_compute.cc => paddle/phi/kernels/funcs/lstm_compute.cc paddle/fluid/operators/math/lstm_compute.cu => paddle/phi/kernels/funcs/lstm_compute.cu paddle/fluid/operators/math/detail/lstm_kernel.h => paddle/phi/kernels/funcs/detail/lstm_kernel.h paddle/fluid/operators/math/detail/lstm_cpu_kernel.h => paddle/phi/kernels/funcs/detail/lstm_cpu_kernel.h paddle/fluid/operators/math/detail/lstm_gpu_kernel.h => paddle/phi/kernels/funcs/detail/lstm_gpu_kernel.h 
  1. Move GRU compute related files;
paddle/fluid/operators/math/gru_compute.h => paddle/phi/kernels/funcs/gru_compute.h paddle/fluid/operators/math/gru_compute.cc => paddle/phi/kernels/funcs/gru_compute.cc paddle/fluid/operators/math/gru_compute.cu => paddle/phi/kernels/funcs/gru_compute.cu paddle/fluid/operators/math/detail/gru_kernel.h => paddle/phi/kernels/funcs/detail/gru_kernel.h paddle/fluid/operators/math/detail/gru_cpu_kernel.h => paddle/phi/kernels/funcs/detail/gru_cpu_kernel.h paddle/fluid/operators/math/detail/gru_gpu_kernel.h => paddle/phi/kernels/funcs/detail/gru_gpu_kernel.h 
  1. Move a small Activation functions system only used in LSTM and GRU;
paddle/fluid/operators/math/detail/activation_functions.h => paddle/phi/kernels/funcs/detail/activation_functions.h paddle/fluid/operators/math/detail/avx_functions.cc => paddle/phi/kernels/funcs/detail/avx_functions.cc paddle/fluid/operators/math/detail/avx_mathfun.h => paddle/phi/kernels/funcs/detail/avx_mathfun.h 
  1. Move sequence2batch related files;
paddle/fluid/operators/math/sequence2batch.h => paddle/phi/kernels/funcs/sequence2batch.h paddle/fluid/operators/math/sequence2batch.cc => paddle/phi/kernels/funcs/sequence2batch.cc paddle/fluid/operators/math/sequence2batch.cu => paddle/phi/kernels/funcs/sequence2batch.cu 
  1. update all references to symbols within them.
@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Contributor

@chenwhql chenwhql left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,一些命名空间后续PR可以追加修改为phi下面的

LstmMetaValue<T> value, LstmMetaGrad<T> grad,
int frame_size, int batch_size, T cell_clip,
ActivationType active_node, ActivationType active_gate,
void gpu_lstm_backward(const paddle::platform::DeviceContext& context,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

paddle::platform::DeviceContext -> phi::DeviceContext


auto stream =
reinterpret_cast<const platform::CUDADeviceContext&>(context).stream();
reinterpret_cast<const paddle::platform::CUDADeviceContext&>(context)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

paddle::platform::CUDADeviceContext -> phi::GPUContext

void operator()(const DeviceContext& context,
const framework::LoDTensor& lod_tensor,
framework::LoDTensor* batch, bool is_cal_batch_lod,
const paddle::framework::LoDTensor& lod_tensor,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

paddle::framework::LoDTensor -> DenseTensor

Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iclementine iclementine merged commit e4dba69 into PaddlePaddle:develop Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants