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

Passing any of -msse, -msse2, -msse3, -mssse3, -msse4.1, -msse4.2, -mavx, -mfpu=neon flags also requires passing -msimd128 #14132

Open
raphael10-collab opened this issue May 10, 2021 · 9 comments

Comments

@raphael10-collab
Copy link

As described here: kaldi-asr/kaldi#4523
I'm getting this error message: em++: error: Passing any of -msse, -msse2, -msse3, -mssse3, -msse4.1, -msse4.2, -mavx, -mfpu=neon flags also requires passing -msimd128!

How to solve the problem?

@kripken
Copy link
Member

kripken commented May 10, 2021

Does also passing -msimd128 fix things?

@RReverser
Copy link
Collaborator

RReverser commented May 10, 2021

I suspect we'll be seeing more of this unless we adopt #12714. Updating each build system / config is not always an easy change.

@Level0r0s
Copy link

Having a -s ENABLE_EXPERIMENTAL_SIMD128=1 flag that is required to enable -msse (without -msimd128)

@leopsidom
Copy link

Is there an update on this ? I'm also getting the same problem while trying to compile numpy 1.21.2. This was not a problem when we were compiling numpy 1.17.5 / 1.18.5 but start having the problem from 1.20+. Wonder why would emcc suddenly require a new flag ?

PS: I also tried to pass -msimd128 to emcc but it causes another problem, some type could not be found (__m512i, etc).

@kripken
Copy link
Member

kripken commented Sep 28, 2021

@leopsidom

PS: I also tried to pass -msimd128 to emcc but it causes another problem, some type could not be found (__m512i, etc).

Is __m512i an intrinsic not supported by clang perhaps @tlively ?

@tlively
Copy link
Member

tlively commented Sep 29, 2021

It looks like we don't implement AVX-512 headers that would define __m512i.

@leopsidom
Copy link

leopsidom commented Sep 29, 2021

Thanks for the reply @kripken & @tlively. Yeah numpy is adding support for avx512 in the new version.

It looks like we don't implement AVX-512 headers that would define __m512i.

This sounds like the issue.

@leopsidom
Copy link

leopsidom commented Oct 8, 2021

@tlively Based on the numpy compile options documentation, it seems numpy can select what features to be enabled based on the compiler support: https://numpy.org/devdocs/reference/simd/simd-optimizations.html#build-options-for-compilation. Do you know why it couldn't detect that emcc doesn't support beyond 128bit avx and try to compile with all cpu features ?

Also do you know how we can pass the compiler option --cpu-baseline and --cpu-dispatch to emcc ?

I tried: emcc .... --cpu-baseline=avx and emcc ... --cpu-baseline="avx"

But I got the following error:

clang-13: error: unsupported option '--cpu-baseline="avx"'
clang-13: error: unsupported option '--cpu-dispatch="avx"'

@leopsidom
Copy link

leopsidom commented Oct 9, 2021

Okay I have figured out how to pass the compiler option to numpy via the build.py and the issue has resolved for me. Thanks @kripken and @tlively both for the pointer.

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

6 participants