Skip to content

Commit 93091ba

Browse files
committed
dnn: AVX2 fix invalid unaligned read
1 parent 623de33 commit 93091ba

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/dnn/src/layers/layers_common.avx2.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050
namespace cv {
5151
namespace dnn {
5252

53+
#define _mm256_load_ps _mm256_loadu_ps // "weights" in fastConv_avx2 is not always aligned to 32 bytes
54+
5355
void fastConv_avx2( const float* weights, size_t wstep, const float* bias,
5456
const float* rowbuf, float* output, const int* outShape,
5557
int blockSize, int vecsize, int vecsize_aligned,

0 commit comments

Comments
 (0)