-
Notifications
You must be signed in to change notification settings - Fork 232
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
compiler: Support compiler flags for Cortex #2531
Conversation
8172a47
to
c64cfee
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2531 +/- ##
==========================================
- Coverage 87.30% 87.30% -0.01%
==========================================
Files 238 238
Lines 45990 46001 +11
Branches 4075 4075
==========================================
+ Hits 40152 40161 +9
- Misses 5150 5151 +1
- Partials 688 689 +1 ☔ View full report in Codecov by Sentry. |
c64cfee
to
e6dd1ff
Compare
def version(self): | ||
return int(self.name.split('cortexa')[-1]) | ||
|
||
@cached_property |
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.
Why is this cached, but version
is not? Surely the reverse should be true?
I presume it's meant to return 'cortex'
or '76'
?
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.
It is meant to retun 76.
Why is this cached, but version is not? Surely the reverse should be true?
I did not think much of it. I just used the recipe of what already exists in Apple, Graviton etc
devito/arch/compiler.py
Outdated
@@ -443,6 +443,9 @@ def __init_finalize__(self, **kwargs): | |||
self.cflags = ['-mcpu=native'] + self.cflags | |||
elif isinstance(platform, Graviton): | |||
self.cflags = ['-mcpu=%s' % platform.march] + self.cflags | |||
elif isinstance(platform, Cortex): | |||
self.cflags += ['-march=%s' % platform.march] |
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.
Nitpick: could be fstring
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.
So I guess for homogeneity I should change the whole file? If this is a transition devito codebase is doing I am happy to do it.
64cf6d8
to
5cb65f2
Compare
devito/arch/compiler.py
Outdated
@@ -468,11 +469,6 @@ class ArmCompiler(GNUCompiler): | |||
|
|||
def __init_finalize__(self, **kwargs): |
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.
this constructor can go
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.
The whole class is redundant now...but keeping for compatibility I guess.
docs: Minor fstring changes
compiler: Support compiler flags for Cortex on Raspberry pi