-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
HACL SIMD support incorrectly detected under WASI #126458
Comments
@erlend-aasland how would you prefer to structure this in |
I think @picnixz already started hashing out better SIMD checks in #125022. |
The easiest way to patch it for now is to opt-out I think and just use the normal headers. That way, we won't have any issue.
My checks only detect the SIMD compiler flags separately instead in one go so it could not necessarily be a solution. It does not care about the architecture itself and just to see whether the flags are supported or not. Concerning the headers that can or cannot be included, they should be done at compile time so we cannot rely on CPUID checks. But what we can do is create a Maybe @corona10 has some ideas on this topic? we could perhaps discuss it on the Discord (I've created a thread for #125022, so you could join (or I can just @ you)). |
I will try to follow up the issue at this weekend :) |
I have a PR up to at least opt out for now. If someone could give the two-liner (plus comments) a quick check I would appreciate it so I can get unblocked. |
Requires an extra `-msimd128` flag and the `*mmintrin.h` header files are exclusive to x86-family CPUs.
Bug report
Bug description:
I'm getting a lot of:
That seems to be defined at:
cpython/Modules/_hacl/libintvector.h
Line 30 in 5e91684
But that whole header file is guarded by:
cpython/Modules/_hacl/libintvector.h
Line 22 in 5e91684
Unfortunately, if you add
defined(__wasi__)
to that guard you then get:To me that suggests the check at:
cpython/configure.ac
Lines 7854 to 7906 in 5e91684
is too broad since the header files don't work on non-x86 architectures.
This probably requires either a CPU/platform check before checking the flag support or an explicit opt-out for at least WASI.
(And I have no idea why CI isn't running into this problem while I am locally; bad configure caching via
cpython/.github/workflows/reusable-wasi.yml
Lines 63 to 68 in 5e91684
CPython versions tested on:
CPython main branch
Operating systems tested on:
Other
Linked PRs
The text was updated successfully, but these errors were encountered: