Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opus 1.5.x and main compilation failing with GCC 8.5.0 #344

Open
SudhirKesti opened this issue May 8, 2024 · 3 comments
Open

Opus 1.5.x and main compilation failing with GCC 8.5.0 #344

SudhirKesti opened this issue May 8, 2024 · 3 comments

Comments

@SudhirKesti
Copy link

Opus 1.5.2 Buils is failing with gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-18).

g++ 8.5.0 not compatible with AVX2 interensic.

../silk/x86/NSQ_del_dec_avx2.c: In function 'silk_nsq_del_dec_scale_states_avx2':
../silk/x86/NSQ_del_dec_avx2.c:959:43: warning: implicit declaration of function '_mm_loadu_si64'; did you mean '_mm_loadu_si32'? [-Wimplicit-function-declaration]
__m256i x = _mm256_cvtepi16_epi64(_mm_loadu_si64(&x16[i]));
^~~~~~~~~~~~~~
_mm_loadu_si32
../silk/x86/NSQ_del_dec_avx2.c:959:43: warning: nested extern declaration of '_mm_loadu_si64' [-Wnested-externs]
../silk/x86/NSQ_del_dec_avx2.c:959:43: error: incompatible type for argument 1 of '_mm256_cvtepi16_epi64'
__m256i x = _mm256_cvtepi16_epi64(_mm_loadu_si64(&x16[i]));
^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-redhat-linux/8/include/immintrin.h:43,
from ../silk/x86/NSQ_del_dec_avx2.c:37:
/usr/lib/gcc/x86_64-redhat-linux/8/include/avx2intrin.h:468:32: note: expected '__m128i' {aka '__vector(2) long long int'} but argument is of type 'int'
_mm256_cvtepi16_epi64 (__m128i __X)

@SudhirKesti
Copy link
Author

Replacing
[ 'AVX2', 'immintrin.h', '__m256i', '_mm256_abs_epi32(_mm256_setzero_si256())', ['-mavx', '-mfma', '-mavx2'], ['/arch:AVX2'] ],
with
[ 'AVX2', 'immintrin.h', '__m256i', '_mm256_cvtepi16_epi64(_mm_loadu_si64())', ['-mavx', '-mfma', '-mavx2'], ['/arch:AVX2'] ],

resolves the issue.

@GordonHuangYong
Copy link

Replacing [ 'AVX2', 'immintrin.h', '__m256i', '_mm256_abs_epi32(_mm256_setzero_si256())', ['-mavx', '-mfma', '-mavx2'], ['/arch:AVX2'] ], with [ 'AVX2', 'immintrin.h', '__m256i', '_mm256_cvtepi16_epi64(_mm_loadu_si64())', ['-mavx', '-mfma', '-mavx2'], ['/arch:AVX2'] ],

resolves the issue.

which file?

@SudhirKesti
Copy link
Author

Ahh My bad. Forgot to mention the file name.
This change needs to be done in meson.build file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants