[CPU] Fix the compiling issue with AVX512F macro. (#18634)

DDDivano-patch-1
Yihua Xu 6 years ago committed by tensor-tang
parent 256ba7cbb8
commit 97549a4f13

@ -46,7 +46,7 @@ void CRFDecoding(const int seq_len, const float* x, const float* w,
x_content = _mm512_loadu_ps(x + i_offset); x_content = _mm512_loadu_ps(x + i_offset);
alpha_content = _mm512_add_ps(w_content, x_content); alpha_content = _mm512_add_ps(w_content, x_content);
// Save the alpha value. // Save the alpha value.
_mm512_storeu_ps(alpha_value + i_offset, alpha_content); _mm512_storeu_ps(alpha + i_offset, alpha_content);
#else #else
// AVX or AVX2 // AVX or AVX2
// weights, input and alpha values. // weights, input and alpha values.
@ -131,12 +131,11 @@ void CRFDecoding(const int seq_len, const float* x, const float* w,
} }
/* Update the alpha and track values. */ /* Update the alpha and track values. */
#ifdef __AVX512F__ #ifdef __AVX512F__
__m512 x_content = __m512 x_content = _mm512_loadu_ps(x + seq_offset + tag_num + j_offset);
_mm512_loadu_ps(x + seq_offset + this->num_ + j_offset);
max_score = _mm512_add_ps(max_score, x_content); max_score = _mm512_add_ps(max_score, x_content);
_mm512_storeu_ps(alpha + seq_offset + this->num_ + j_offset, max_score); _mm512_storeu_ps(alpha + seq_offset + tag_num + j_offset, max_score);
_mm512_storeu_si512(reinterpret_cast<__m512i*>(track + seq_offset + _mm512_storeu_si512(
this->num_ + j_offset), reinterpret_cast<__m512i*>(track + seq_offset + tag_num + j_offset),
max_j); max_j);
#else #else
__m256 x_content = _mm256_loadu_ps(x + seq_offset + tag_num + j_offset); __m256 x_content = _mm256_loadu_ps(x + seq_offset + tag_num + j_offset);

Loading…
Cancel
Save