Skip to content

Commit

Permalink
move zero initialize out of unrolled loop
Browse files Browse the repository at this point in the history
  • Loading branch information
edgchen1 committed Dec 29, 2023
1 parent 437ad52 commit 241ca27
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions onnxruntime/core/mlas/lib/sqnbitgemm_kernel_neon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,10 +665,9 @@ ComputeDotProducts_BlkBitWidth4_CompInt8(
});

// compute quantized dot product
int32x4_t dot[NCols];
int32x4_t dot[NCols]{};
UnrolledLoop<NCols>([&](size_t i) {
const int32x4_t zero_v = vdupq_n_s32(0);
dot[i] = vdotq_s32(zero_v, av, bv[i]);
dot[i] = vdotq_s32(dot[i], av, bv[i]);
});

// convert to float and add to `acc`
Expand Down

0 comments on commit 241ca27

Please sign in to comment.