fix sofmax seg fault in AVX, test=develop (#19487)

fix_crf_doc
Zeng Jinle 6 years ago committed by GitHub
parent 1fe468d319
commit 11f2f78458
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -160,7 +160,7 @@ inline void vec_sum<float, platform::avx>(const size_t n, const float* x,
end = n & ~(block - 1);
__m256 tmp = _mm256_setzero_ps();
for (i = 0; i < end; i += block) {
tmp = _mm256_add_ps(tmp, _mm256_load_ps(x + i));
tmp = _mm256_add_ps(tmp, _mm256_loadu_ps(x + i));
}
__m256 hsum = _mm256_hadd_ps(tmp, tmp);

Loading…
Cancel
Save