From e4c2fa9ac0ba8b3b1a6a2142f22a519779ed7b65 Mon Sep 17 00:00:00 2001 From: MyPandaShaoxiang Date: Mon, 17 Feb 2020 21:38:14 -0500 Subject: [PATCH] fix: fix compile problem --- lite/core/mir/fusion/quant_dequant_op_fuser.cc | 6 ------ lite/core/mir/kernel_place_correct_pass.h | 2 -- lite/gen_code/paddle_infer.h | 1 + lite/kernels/host/one_hot_compute.cc | 1 - lite/operators/one_hot_op.cc | 2 -- 5 files changed, 1 insertion(+), 11 deletions(-) mode change 100755 => 100644 lite/gen_code/paddle_infer.h diff --git a/lite/core/mir/fusion/quant_dequant_op_fuser.cc b/lite/core/mir/fusion/quant_dequant_op_fuser.cc index 2c761c6c2a..0327a50af3 100644 --- a/lite/core/mir/fusion/quant_dequant_op_fuser.cc +++ b/lite/core/mir/fusion/quant_dequant_op_fuser.cc @@ -103,12 +103,6 @@ void DeleteDynamicQuantOpFuser::InsertNewNode(SSAGraph* graph, // obtain values, save values and relink node int bit_length = quant_node->stmt()->op_info()->GetAttr("bit_length"); - int range = ((1 << (bit_length - 1)) - 1); - auto* scope = quant_node->stmt()->op()->scope(); - auto* scale_tensor = scope->FindVar(output_scale_node->arg()->name) - ->GetMutable(); - float scale_value = scale_tensor->data()[0] / range; - auto outlinks = output_act_node->outlinks; for (auto* quantized_node : outlinks) { auto* op_desc = quantized_node->stmt()->mutable_op_info(); diff --git a/lite/core/mir/kernel_place_correct_pass.h b/lite/core/mir/kernel_place_correct_pass.h index 5fab500086..35cd2e6ef7 100644 --- a/lite/core/mir/kernel_place_correct_pass.h +++ b/lite/core/mir/kernel_place_correct_pass.h @@ -86,7 +86,6 @@ class KernelPlaceCorrectPass : public DebugPass { << node_name; VLOG(4) << "-- input arg_name:" << arg_name << " " << "-- node name:" << node_name; - auto type = inst.picked_kernel().GetInputDeclType(arg_name); if (!x_in->AsArg().type) { need_correct_place &= false; } else { @@ -108,7 +107,6 @@ class KernelPlaceCorrectPass : public DebugPass { << node_name << " in Inst " << inst.op_type(); VLOG(4) << "-- output arg_name " << arg_name; - auto type = inst.picked_kernel().GetOutputDeclType(arg_name); if (!x_out->AsArg().type) { need_correct_place &= false; } else { diff --git a/lite/gen_code/paddle_infer.h b/lite/gen_code/paddle_infer.h old mode 100755 new mode 100644 index dc2d56422c..e01ffc25e2 --- a/lite/gen_code/paddle_infer.h +++ b/lite/gen_code/paddle_infer.h @@ -46,6 +46,7 @@ class Tensor { */ class PaddlePredictor { public: + void Init(); std::unique_ptr GetTensor(const std::string &id) const; std::unique_ptr GetMutableTensor(const std::string &id); diff --git a/lite/kernels/host/one_hot_compute.cc b/lite/kernels/host/one_hot_compute.cc index e0af6f5173..97e98a7ef5 100755 --- a/lite/kernels/host/one_hot_compute.cc +++ b/lite/kernels/host/one_hot_compute.cc @@ -16,7 +16,6 @@ #include #include -#include "lite/backends/fpga/KD/debugger.hpp" #include "lite/kernels/host/one_hot_compute.h" #include "lite/utils/paddle_enforce.h" diff --git a/lite/operators/one_hot_op.cc b/lite/operators/one_hot_op.cc index 023cdc23ae..397326abf7 100644 --- a/lite/operators/one_hot_op.cc +++ b/lite/operators/one_hot_op.cc @@ -15,8 +15,6 @@ #include "lite/operators/one_hot_op.h" #include "lite/core/op_registry.h" -#include "lite/backends/fpga/KD/debugger.hpp" - namespace paddle { namespace lite { namespace operators { -- GitLab