-
Notifications
You must be signed in to change notification settings - Fork 15
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
Use -march=haswell
or similar flags instead of -march=native
#21
Comments
I think it makes a lot of sense to build this on the machine you intend to run it on. |
Intel recently disable AVX on some processors due to a vulnerability. So you cannot count on The real solution is to use runtime dispatching. |
There's also the https://github.com/p12tic/libsimdpp The dispatching part can be reused in case we don't want to rewrite the functions. |
Well, I know how to do the runtime dispatching. That's not a problem. The question is whether anyone is planning to use this software for something serious. If so, they should get in touch with me and we can put in the effort. I just wrote this code for research purposes. |
The CMake file uses
-march=native
, which generates binaries that are not usable on other machines that might lack the instruction set.I think the better approach would be to use
-march=haswell
, which is a good default these days.For
avx512
, a CMake option could be exposed.despacer/CMakeLists.txt
Lines 17 to 19 in 579530b
-march=haswell
includes AVX2 and older SSE instruction sets :https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
The text was updated successfully, but these errors were encountered: