From 3147e5bd2e045ec728dbfbc036559c6208962a04 Mon Sep 17 00:00:00 2001 From: cc <52520497+juncaipeng@users.noreply.github.com> Date: Mon, 24 Aug 2020 19:13:05 +0800 Subject: [PATCH] Support ocr int8 model, test=develop (#4189) --- lite/api/benchmark.cc | 2 ++ lite/kernels/arm/fc_compute.h | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lite/api/benchmark.cc b/lite/api/benchmark.cc index b72a6e6bdb..1dccbb49a4 100644 --- a/lite/api/benchmark.cc +++ b/lite/api/benchmark.cc @@ -30,6 +30,8 @@ #include #include #include "lite/api/paddle_api.h" +#include "lite/api/paddle_use_kernels.h" +#include "lite/api/paddle_use_ops.h" #include "lite/core/device_info.h" #include "lite/utils/cp_logging.h" #include "lite/utils/string.h" diff --git a/lite/kernels/arm/fc_compute.h b/lite/kernels/arm/fc_compute.h index e45758775d..c5e86f94e8 100644 --- a/lite/kernels/arm/fc_compute.h +++ b/lite/kernels/arm/fc_compute.h @@ -90,7 +90,7 @@ class FcCompute : public KernelLite { return; } last_shape_ = x_dims; - auto w_dims = param.w->dims(); + auto w_dims = param.w_dims; auto& ctx = this->ctx_->template As(); CHECK_GE(x_dims.size(), 2UL); @@ -99,9 +99,7 @@ class FcCompute : public KernelLite { m_ = x_dims.Slice(0, param.in_num_col_dims).production(); k_ = x_dims.Slice(param.in_num_col_dims, x_dims.size()).production(); - CHECK_EQ(k_, w_dims[0]); n_ = w_dims[1]; - CHECK_EQ(k_, static_cast(w_dims[0])); flag_gemm_ = check_fc_use_gemm( m_, param.weight_scale, param.bias != nullptr); if (flag_trans_weights_ == flag_gemm_) { -- GitLab