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

User-provided C flags containing -march=core-avx2 causes link failure #3

Open
coalsont opened this issue Jul 1, 2019 · 0 comments
Open

Comments

@coalsont
Copy link

coalsont commented Jul 1, 2019

See Washington-University/workbench#34 (comment)

The user was providing added compiler options to try to automatically vectorize things (-O3 -DNDEBUG -ftree-vectorize -march=core-avx2 -mavx2), but when these were passed into the dot library, it caused the function names of the dot_avx.c functions to never be compiled as sdot_avx, etc. I am guessing that -march=core-avx2 may imply -mfma, and therefore it just made two copies of sdot_avxfma, etc.

If this is the reason, it would probably be more robust to use a define like DOT_USE_FMA for the purpose of changing the function name and tweaking the implementation, instead of the __FMA__ that can unintentionally be triggered by a user playing with standard project-wide compiler flags.

@coalsont coalsont changed the title User-provided C flags containing -mavx2 causes link failure User-provided C flags containing -march=core-avx2 causes link failure Jul 2, 2019
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

1 participant