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

With new clang based intel compilers (ifx, icx, icpx) we should use -march=native #4744

Open
Micket opened this issue Jan 14, 2025 · 5 comments
Milestone

Comments

@Micket
Copy link
Contributor

Micket commented Jan 14, 2025

We should set this to -march=native but only when the new ifx, icx, icpx are used.

This will be better for AMD cpus. I think @bartoldeman said that from 2025 onwards the old compilers are gone, so, we shouldn't use that old bad -x flags that are only supported on Intel cpus.

@Thyre
Copy link
Contributor

Thyre commented Jan 26, 2025

With 2024.0.0, icc and icpc were removed. With 2025.0.0, ifort is gone, leaving only the "new" ones. I think switching to -march=native beginning with 2025.0.0 is therefore a good idea, since a toolchain using 2024.x.x might still use ifort.

@boegel boegel added the EasyBuild-5.0 EasyBuild 5.0 label Jan 29, 2025
@boegel boegel added this to the 5.0 milestone Jan 29, 2025
@boegel boegel moved this to Changed default in EasyBuild v5.0 Jan 29, 2025
@boegel
Copy link
Member

boegel commented Jan 29, 2025

Is there any reference material on this?

I'm not sure we should trust the Intel (oneAPI) compilers to "do the right thing" on AMD-based systems when using -march=native...

@Thyre
Copy link
Contributor

Thyre commented Jan 29, 2025

Is there any reference material on this?

I'm not sure we should trust the Intel (oneAPI) compilers to "do the right thing" on AMD-based systems when using -march=native...

Intel doesn't mention what happens for -march=native unfortunately, see: https://www.intel.com/content/www/us/en/docs/dpcpp-cpp-compiler/developer-guide-reference/2025-0/march.html

@Micket
Copy link
Contributor Author

Micket commented Jan 29, 2025

at most they say

Many of the Clang settings for option -m are supported. For more information on Clang settings for option -m, see the Clang documentation.

but for me it was @bartoldeman telling me to just use it, and from my testing i can confirm that yes, that works.

@Thyre
Copy link
Contributor

Thyre commented Jan 29, 2025

If one looks at the downstream source code, the behavior is basically the same from what I've found for LLVM:

This seems completely independent of the CPU vendor. Who knows though if they are using the same code in their oneAPI packages...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Changed default
Development

No branches or pull requests

3 participants