-
Notifications
You must be signed in to change notification settings - Fork 151
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
Fix zen3 flags for icc and support icelake #321
Conversation
This might not work yet, because the Vc static library for AVX2 compiles with |
94239ba
to
cc93142
Compare
15e8240
to
690481f
Compare
690481f
to
02c27b6
Compare
02c27b6
to
e491eda
Compare
@@ -495,7 +495,7 @@ macro(vc_compile_for_all_implementations _srcs _src) | |||
# which case AVX2 implies the availability of FMA and BMI2 | |||
#_vc_compile_one_implementation(${_srcs} AVX2 "-mavx2") | |||
#_vc_compile_one_implementation(${_srcs} AVX2+BMI2 "-mavx2 -mbmi2") | |||
_vc_compile_one_implementation(${_srcs} AVX2+FMA+BMI2 "-xCORE-AVX2" "-mavx2 -mfma -mbmi2" "/arch:AVX2") | |||
_vc_compile_one_implementation(${_srcs} AVX2+FMA+BMI2 "-xAVX2" "-mavx2 -mfma -mbmi2" "/arch:AVX2") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this used on AMD?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. And funnily it works. Because the unit tests did not work with -xAVX2
, I needed -mavx2
. Should we change to -mavx2
here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think that anything that could be run on AMD should fallback to -mavx2
so that the compiler doesn't add special code based on cpuid checks (for example, if may just fallback to scalar if the AMD CPU is not recognized, or even intentionally).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will send a separate PR for that.
This PR fixes the flags passed to icc, when a zen3 CPU was detected. It furthermore let's icc build the AVX2 Vc static library without Intel specific instruction sets. To make the CI pass, also support for icelake CPUs had to be cherry-picked from #319.