Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/booster/arm/depthwise.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,14 @@ void dwConvs2(float *output, float *input, int inw, int inh, int stridew, int st
sum1 = vfmaq_f32(sum1, r20, k6789);

sum1 = vsetq_lane_f32(0.0f, sum1, 3); //set third value of og to 0
*og = vaddvq_f32(sum1); //accumulate the first three value of og

float vsum = vaddvq_f32(sum1); //accumulate the first three value of og
if (fuseBias)
vsum += bias_arr[g];
if (fuseRelu)
vsum = (vsum > 0.f) ? vsum : 0.f;

*og = vsum;
_r0 += 2;
_r1 += 2;
_r2 += 2;
Expand Down Expand Up @@ -1292,8 +1299,8 @@ void dwConv_template(float *output, float *input, int input_channels, int inw, i
}
else if (kw == 3 && kh == 3 && stridew == 1 && strideh == 1)
dwConvs1<fuseBias, fuseRelu>(output, input, inw, inh, stridew, strideh, kernel, kw, kh, group, nThreads, bias_arr);
//else if (kw == 3 && kh == 3 && stridew == 2 && strideh == 2)
// dwConvs2<fuseBias, fuseRelu>(output, input, inw, inh, stridew, strideh, kernel, kw, kh, group, nThreads, bias_arr);
else if (kw == 3 && kh == 3 && stridew == 2 && strideh == 2)
dwConvs2<fuseBias, fuseRelu>(output, input, inw, inh, stridew, strideh, kernel, kw, kh, group, nThreads, bias_arr);
else
{
int outw = (inw - kw) / stridew + 1; //for strided case in odd dimensions, should take the floor value as output dim.
Expand Down