Tencent / ncnn

ncnn is a high-performance neural network inference framework optimized for the mobile platform
Other
20.54k stars 4.18k forks source link

Fix BOF in the last channel handling logic of SSE ShuffleChannel #5735

Open junwha opened 1 month ago

junwha commented 1 month ago

Fix https://github.com/Tencent/ncnn/issues/5734

tencent-adm commented 1 month ago

CLA assistant check
All committers have signed the CLA.

codecov-commenter commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.03%. Comparing base (1c7af00) to head (b2ee3aa).

:exclamation: There is a different number of reports uploaded between BASE (1c7af00) and HEAD (b2ee3aa). Click for more details.

HEAD has 32 uploads less than BASE | Flag | BASE (1c7af00) | HEAD (b2ee3aa) | |------|------|------| ||33|1|
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #5735 +/- ## =========================================== - Coverage 95.15% 90.03% -5.13% =========================================== Files 793 265 -528 Lines 270315 77624 -192691 =========================================== - Hits 257218 69886 -187332 + Misses 13097 7738 -5359 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

junwha commented 1 month ago

Hi @nihui, Thank you for the fast response and review! I will reflect the unrolling part.

Could I ask why do you think the out-of-bound risk does not exist in pack8/16 codes? As far as I think, it also accesses (start of the channel) + (size-1)*(element size) + (element size)/2 in the same manner, which is beyond the size of the channel.

Thank you for your effort on this issue!