diff --git a/lite/kernels/arm/lstm_compute.cc b/lite/kernels/arm/lstm_compute.cc index 5335e230a0569612af863d0b066469d61298b4e4..5cc0a995dab4e3eec0ceb54ce492295e6bb66459 100644 --- a/lite/kernels/arm/lstm_compute.cc +++ b/lite/kernels/arm/lstm_compute.cc @@ -208,6 +208,8 @@ REGISTER_LITE_KERNEL(lstm, .BindInput("Input", {LiteType::GetTensorTy(TARGET(kARM))}) .BindInput("Weight", {LiteType::GetTensorTy(TARGET(kARM))}) .BindInput("Bias", {LiteType::GetTensorTy(TARGET(kARM))}) + .BindInput("C0", {LiteType::GetTensorTy(TARGET(kARM))}) + .BindInput("H0", {LiteType::GetTensorTy(TARGET(kARM))}) .BindOutput("Hidden", {LiteType::GetTensorTy(TARGET(kARM))}) .BindOutput("Cell", {LiteType::GetTensorTy(TARGET(kARM))}) .BindOutput("BatchGate", {LiteType::GetTensorTy(TARGET(kARM))}) diff --git a/lite/kernels/npu/bridges/graph.h b/lite/kernels/npu/bridges/graph.h index b615460ae73235b53cd16c18f90c945cfd98537f..3d86a9dbddde5432b7fe40fcf9608ac7000d526e 100644 --- a/lite/kernels/npu/bridges/graph.h +++ b/lite/kernels/npu/bridges/graph.h @@ -20,6 +20,7 @@ #include #include #include "graph/compatible/all_ops.h" +#include "graph/op/all_ops.h" #include "lite/core/op_lite.h" #include "lite/core/tensor.h" diff --git a/lite/kernels/npu/bridges/layer_norm_op.cc b/lite/kernels/npu/bridges/layer_norm_op.cc index 8c12724a1416a28fbfbde40cccc4b204db0bb154..235e97dc72490e3111f63beef90f7a48b569b527 100644 --- a/lite/kernels/npu/bridges/layer_norm_op.cc +++ b/lite/kernels/npu/bridges/layer_norm_op.cc @@ -127,12 +127,11 @@ int LayerNormConverter(void* ctx, OpLite* op, KernelBase* kernel) { } // LayerNorm node - auto layer_norm_node = graph->Add(y_name); - auto layer_norm_op = layer_norm_node->data(); + auto layer_norm_node = graph->Add(y_name); + auto layer_norm_op = layer_norm_node->data(); layer_norm_op->set_input_x(*x_node->data()); - layer_norm_op->set_input_scale(*scale_node->data()); - layer_norm_op->set_input_bias(*bias_node->data()); - layer_norm_op->set_attr_reduction_indices(ge::AttrValue::LIST_INT({3})); + layer_norm_op->set_input_gamma(*scale_node->data()); + layer_norm_op->set_input_beta(*bias_node->data()); layer_norm_op->set_attr_epsilon(epsilon); // Reshaped Y node if needs