Skip to content

Commit

Permalink
fix matmul_int8&&gemv bugs,test=develop (#5986)
Browse files Browse the repository at this point in the history
  • Loading branch information
xingjing1 authored Apr 27, 2021
1 parent 6958847 commit f8b5ea9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lite/backends/arm/math/gemv_arm_int8.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,7 @@ bool gemv_int8_trans_oth(const int8_t* A,
int cnt_4 = tail >> 2;
int tail_4 = tail & 3;
int stride_in = M << 3;
#pragma omp parallel for
// #pragma omp parallel for
for (int i = 0; i < cnt; i++) {
const int8_t* in_ptr0 = data_in;
const int8_t* in_ptr1 = in_ptr0 + M;
Expand Down
8 changes: 7 additions & 1 deletion lite/kernels/arm/matmul_compute.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ void MatMulCompute<PRECISION(kFloat), PRECISION(kFloat)>::PrepareForRun() {
}

template <>
void MatMulCompute<PRECISION(kInt8), PRECISION(kFloat)>::PrepareForRun() {
void MatMulCompute<PRECISION(kInt8), PRECISION(kFloat)>::PrepareForRun() {}

template <>
void MatMulCompute<PRECISION(kFloat), PRECISION(kFloat)>::ReInitWhenNeeded() {}

template <>
void MatMulCompute<PRECISION(kInt8), PRECISION(kFloat)>::ReInitWhenNeeded() {
auto& ctx = this->ctx_->template As<ARMContext>();
auto& param = Param<param_t>();
auto x_dims = param.X->dims();
Expand Down
2 changes: 2 additions & 0 deletions lite/kernels/arm/matmul_compute.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class MatMulCompute : public KernelLite<TARGET(kARM), PType> {

void PrepareForRun() override;

void ReInitWhenNeeded() override;

void Run() override;

virtual ~MatMulCompute() = default;
Expand Down

0 comments on commit f8b5ea9

Please sign in to comment.