diff --git a/lite/api/model_test.cc b/lite/api/model_test.cc index 6e0a249a81c..114d1acdbe1 100644 --- a/lite/api/model_test.cc +++ b/lite/api/model_test.cc @@ -40,6 +40,7 @@ void OutputOptModel(const std::string& load_model_dir, config.set_valid_places({ Place{TARGET(kX86), PRECISION(kFloat)}, Place{TARGET(kARM), PRECISION(kFloat)}, + Place{TARGET(kHost), PRECISION(kFloat)}, }); auto predictor = lite_api::CreatePaddlePredictor(config); diff --git a/lite/core/mir/fusion/conv_elementwise_fuser.cc b/lite/core/mir/fusion/conv_elementwise_fuser.cc index c3ab3e4c4ca..abc78edda88 100644 --- a/lite/core/mir/fusion/conv_elementwise_fuser.cc +++ b/lite/core/mir/fusion/conv_elementwise_fuser.cc @@ -27,8 +27,10 @@ void ConvElementwiseFuser::BuildPattern() { VarNode("input")->assert_is_op_input(conv_type_, "Input")->AsInput(); auto* filter = VarNode("filter")->assert_is_op_input(conv_type_, "Filter")->AsInput(); - auto* bias = - VarNode("bias")->assert_is_op_input("elementwise_add", "Y")->AsInput(); + auto* bias = VarNode("bias") + ->assert_is_op_input("elementwise_add", "Y") + ->AsInput() + ->assert_is_persistable_var(); // create op nodes auto* conv2d = diff --git a/lite/core/mir/memory_optimize_pass.cc b/lite/core/mir/memory_optimize_pass.cc index 6956e805c67..02311b05794 100644 --- a/lite/core/mir/memory_optimize_pass.cc +++ b/lite/core/mir/memory_optimize_pass.cc @@ -49,6 +49,7 @@ void MemoryOptimizePass::CollectLifeCycleByDevice( "equal", "lod_reset", "concat", + "yolo_box", "graph_op", "feed", "fetch"}; diff --git a/lite/kernels/arm/norm_compute.cc b/lite/kernels/arm/norm_compute.cc index 3cc1645fc68..fb8b4bbe077 100644 --- a/lite/kernels/arm/norm_compute.cc +++ b/lite/kernels/arm/norm_compute.cc @@ -47,4 +47,5 @@ REGISTER_LITE_KERNEL( norm, kARM, kFloat, kNCHW, paddle::lite::kernels::arm::NormCompute, def) .BindInput("X", {LiteType::GetTensorTy(TARGET(kARM))}) .BindOutput("Out", {LiteType::GetTensorTy(TARGET(kARM))}) + .BindOutput("Norm", {LiteType::GetTensorTy(TARGET(kARM))}) .Finalize(); diff --git a/lite/operators/op_params.h b/lite/operators/op_params.h index 5c88a28527a..321474875fe 100644 --- a/lite/operators/op_params.h +++ b/lite/operators/op_params.h @@ -600,6 +600,7 @@ struct SequenceSoftmaxParam { struct NormParam { const lite::Tensor* X{}; lite::Tensor* Out{}; + lite::Tensor* Norm{}; int axis{1}; float epsilon{1e-10}; }; diff --git a/lite/tests/kernels/norm_compute_test.cc b/lite/tests/kernels/norm_compute_test.cc index 830bac06278..6aee1758c19 100644 --- a/lite/tests/kernels/norm_compute_test.cc +++ b/lite/tests/kernels/norm_compute_test.cc @@ -46,7 +46,7 @@ class NormComputeTester : public arena::TestCase { auto* x = scope->FindTensor(input_); const auto* x_data = x->data(); - int axis = axis_ < 0 ? axis + dims_.size() : axis_; + int axis = axis_ < 0 ? axis_ + dims_.size() : axis_; int pre_n = dims_.count(0, axis); int n = dims_[axis]; int post_n = dims_.count(axis + 1, dims_.size()); diff --git a/lite/tools/build.sh b/lite/tools/build.sh index d56a5f81cb8..87e50fd11e8 100755 --- a/lite/tools/build.sh +++ b/lite/tools/build.sh @@ -221,7 +221,7 @@ function print_usage { echo -e "argument choices:" echo -e "--arm_os:\t android|ios|ios64" echo -e "--arm_abi:\t armv8|armv7" - echo -e "--arm_lang:\t gcc|clang (for android)" + echo -e "--arm_lang:\t only support gcc now, clang will be supported in future.(for android)" echo -e "--android_stl:\t c++_static|c++_shared (for android)" echo echo -e "tasks:" @@ -252,6 +252,13 @@ function main { ;; --arm_lang=*) ARM_LANG="${i#*=}" + if [ ${ARM_LANG} == "clang" ]; then + set +x + echo + echo -e "error: only support gcc now, clang will be supported in future." + echo + exit 1 + fi shift ;; --android_stl=*)