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

Add support for GCC optimized builds in RISCV SiFive u74mc architecture #4641

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

julianmorillo
Copy link

No description provided.

@@ -96,6 +96,7 @@ class Gcc(Compiler):
(systemtools.POWER, systemtools.POWER_LE): 'mcpu=native',
(systemtools.X86_64, systemtools.AMD): 'march=native', # implies -mtune=native
(systemtools.X86_64, systemtools.INTEL): 'march=native', # implies -mtune=native
(systemtools.RISCV64, systemtools.SIFIVE): 'march=rv64gc mtune=sifive-7-series', # flags specified in archspec
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@julianmorillo Hmmm, is systemtools.SIFIVE fine-grained enough here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@boegel Probably not, if you consider all the possible mtune options in: https://gcc.gnu.org/onlinedocs/gcc/RISC-V-Options.html.
But, on the other hand, this is what it is currently being used in archspec: https://github.com/archspec/archspec-json/blob/b0c1872de59fe8c9902f55f97699d1b02b5cfe9c/cpu/microarchitectures.json#L3461
Also, there is no way to obtain more fine-grained information on such systems (at least not on the arriesgado machines I have been testing).
So I believe that for the moment this granularity should suffice.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, it's probably not a good idea to add this to EasyBuild by default, since if there are other SiFive models later, we would need to change/fix this somehow anyway?

Note that you can configure EasyBuild easily to use a particular set of flags instead of what it uses by default via --optarch (or $EASYBUILD_OPTARCH), see https://docs.easybuild.io/controlling-compiler-optimization-flags/#controlling_compiler_optimization_flags_optarch_flags

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@boegel As you requested, the detection is now more fine-grained. The compiler flags are only applied when we are in a SiFive U74-MC processor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants