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

arch: Correct march to mcpu for ppc #2174

Merged
merged 2 commits into from
Aug 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion devito/arch/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def __init__(self, *args, **kwargs):

platform = kwargs.pop('platform', configuration['platform'])

self.cflags += ['-march=native', '-Wno-unused-result',
self.cflags += ['-Wno-unused-result',
Copy link
Contributor

Choose a reason for hiding this comment

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

This may also break flake8?

'-Wno-unused-variable', '-Wno-unused-but-set-variable']

if configuration['safe-math']:
Expand All @@ -400,6 +400,12 @@ def __init__(self, *args, **kwargs):
# from `=512`
self.cflags.append('-mprefer-vector-width=512')

if platform in [POWER8, POWER9]:
# -march isn't supported on power architectures, is -mtune needed?
self.cflags = ['-mcpu=native'] + self.cflags
else:
self.cflags = ['-march=native'] + self.cflags

language = kwargs.pop('language', configuration['language'])
try:
if self.version >= Version("4.9.0"):
Expand Down