-
Notifications
You must be signed in to change notification settings - Fork 3.4k
AVX 256 functions accepting __m{128,256}i_u
should accept __m{128,256}i
#24076
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
Comments
Would you have time to send a PR? Also, have you looked into disabled the AVX2 code in the library in question? The emulation path is unlikely to give you great results in wasm anyway. |
I would like to, but I need to spend some time understanding why SIMDe chose
Yes, It's interesting that the SSE4.1 wasm build performs optimally across both x86-64 and ARM.
|
@tlively ?
Are you talking about wasm performance or native build performance? |
The wasm performance when running in Chrome 135. The table shows the avg time they took to encode a large image file. |
@tlively are these number what we might expect? I suspect the reason is that sse4.1 is closest to wasm-simd and therefore has the smallest emulation overhead? |
From #24095 , I'm curious whether a more ideal fix (i.e. more inline with other compilers) is to somehow unify the definitions of If we could somehow unify both definitions, then we could typedef both |
@sbc100 will something like this work? typedef int64_t __m128i_u __attribute__((__vector_size__(16), __aligned__(1)));
typedef struct {
__m128i_u v0;
__m128i_u v1;
} __m256i_base;
typedef __m256i_base __m256i_u __attribute__((__aligned__(1)));
typedef __m256i_base __m256i __attribute__((__aligned__(32))); |
Version of emscripten/emsdk:
Failing command line in full:
It fails to compile astc-encoder x86-64 AVX2 version. Below is the error and a working solution. The other steps to adapt to emscripten AVX seem irrelevant, so they are not written here.
The error:
A working solution:
Manually adding the
__m256i*
overloads of the functions suggested by the error message toavxintrin.h
resolves the error.SIMDe uses
void*
, so it appears they don't have the issue.https://github.com/simd-everywhere/simde/blob/2af3dce9b2481b6b32139b1022cdfc02a633c898/simde/x86/avx.h#L4361
The text was updated successfully, but these errors were encountered: