-
Notifications
You must be signed in to change notification settings - Fork 188
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
[NativeAOT-LLVM] Vector.IsHardwareAccelerated true? #2515
Comments
Yes, we don't support SIMD yet. |
Well I tried the same code in Blazor AOT which supposedly supports SIMD and it's not any faster; they must not support these operations - on my system this is 120ms natively compiled, 2400 ms Blazor, 1600 ms NativeAOT-LLVM
Would it be straightforward to link in a C or C++ file with SSE2 intrinsics and have Emscripten translate it? Any examples? (sorry this doesn't seem appropriate for issue; not sure where else to discuss/ask questions) |
With NativeAOT-LLVM, you would first need to compile the native code into a native library. For the case of a single
You do need to use a matching version of Emscripten, however. https://learn.microsoft.com/en-us/aspnet/core/blazor/webassembly-native-dependencies?view=aspnetcore-8.0 is the documentation for how to do the same using the upstream toolchain - it supports compiling source files directly. |
Just wanted to note; this works great - same test above using the WASM SIMD functions directly is only ~330 ms which seems expected; the natively-compiled version code is twice as fast (likely because it gets to use 256-bit vectors on my machine instead of 128-bit) and the WASM SIMD version is roughly 4 times faster than the Vector version. In case anyone sees this I just put this in my project file:
Then in the code
And for this test lib.c file is just this:
|
I understand that browsers mostly support WebAssembly SIMD and so does Emscripten
I am seeing Vector.IsHardwareAccelerated return false from my app compiled with
Is this expected at this time? Thanks!
The text was updated successfully, but these errors were encountered: