mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
dnn: don't use aligned load without alignment checks
- weights are unaligned in dasiamprn sample (comes from numpy)
This commit is contained in:
@@ -347,7 +347,9 @@ public:
|
||||
if (!blobs.empty())
|
||||
{
|
||||
Mat wm = blobs[0].reshape(1, numOutput);
|
||||
if( wm.step1() % VEC_ALIGN != 0 )
|
||||
if ((wm.step1() % VEC_ALIGN != 0) ||
|
||||
!isAligned<VEC_ALIGN * sizeof(float)>(wm.data)
|
||||
)
|
||||
{
|
||||
int newcols = (int)alignSize(wm.step1(), VEC_ALIGN);
|
||||
Mat wm_buffer = Mat(numOutput, newcols, wm.type());
|
||||
@@ -1299,7 +1301,6 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// now compute dot product of the weights
|
||||
// and im2row-transformed part of the tensor
|
||||
#if CV_TRY_AVX512_SKX
|
||||
|
||||
Reference in New Issue
Block a user