Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Jul 17, 2023
1 parent fe19e33 commit 06879cf
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/layer/x86/convolution_packed_int8.h
Original file line number Diff line number Diff line change
Expand Up @@ -926,9 +926,15 @@ static void convolution_packed_int8(const Mat& bottom_blob, Mat& top_blob, const
const int elempack = bottom_blob.elempack;
const int inch = bottom_blob.c * elempack;

const int N = bottom_blob.cstep * elempack;

const int outw = top_blob.w;
const int outh = top_blob.h;
const int out_elempack = top_blob.elempack;
const int outch = top_blob.c * out_elempack;

const int M = top_blob.cstep * out_elempack;

const int maxk = kernel_w * kernel_h;

// kernel offsets
Expand Down Expand Up @@ -961,6 +967,7 @@ static void convolution_packed_int8(const Mat& bottom_blob, Mat& top_blob, const
{
const int p = pp * 16;

// shadowed variable for less openmp task args
const int outw = top_blob.w;
const int outh = top_blob.h;
const int N = bottom_blob.cstep * elempack;
Expand Down Expand Up @@ -1540,6 +1547,7 @@ static void convolution_packed_int8(const Mat& bottom_blob, Mat& top_blob, const
{
const int p = remain_outch_start + pp * 8;

// shadowed variable for less openmp task args
const int outw = top_blob.w;
const int outh = top_blob.h;
const int N = bottom_blob.cstep * elempack;
Expand Down Expand Up @@ -2095,6 +2103,7 @@ static void convolution_packed_int8(const Mat& bottom_blob, Mat& top_blob, const
{
const int p = remain_outch_start + pp * 4;

// shadowed variable for less openmp task args
const int outw = top_blob.w;
const int outh = top_blob.h;
const int N = bottom_blob.cstep * elempack;
Expand Down Expand Up @@ -2701,6 +2710,7 @@ static void convolution_packed_int8(const Mat& bottom_blob, Mat& top_blob, const
{
const int p = remain_outch_start + pp * 2;

// shadowed variable for less openmp task args
const int outw = top_blob.w;
const int outh = top_blob.h;
const int N = bottom_blob.cstep * elempack;
Expand Down Expand Up @@ -3156,10 +3166,6 @@ static void convolution_packed_int8(const Mat& bottom_blob, Mat& top_blob, const
remain_outch_start += nn_outch * 2;
for (int p = remain_outch_start; p < outch; p++)
{
const int outw = top_blob.w;
const int outh = top_blob.h;
const int N = bottom_blob.cstep * elempack;

int* outptr = top_blob.channel(p);

int ij = 0;
Expand Down

0 comments on commit 06879cf

Please sign in to comment.