Skip to content

Commit

Permalink
Reinstate AWS runner.
Browse files Browse the repository at this point in the history
  • Loading branch information
ggorman authored and mloubout committed Jul 21, 2024
1 parent a0c1a66 commit f9b08f0
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions devito/arch/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,10 +434,8 @@ def __init_finalize__(self, **kwargs):
if platform in [POWER8, POWER9]:
# -march isn't supported on power architectures, is -mtune needed?
self.cflags = ['-mcpu=native'] + self.cflags
elif platform is Graviton:
# Graviton flag
mx = platform.march
self.cflags = ['-mcpu=%s' % mx] + self.cflags
elif isinstance(platform, Graviton):
self.cflags = ['-mcpu=%s' % platform.march] + self.cflags
else:
self.cflags = ['-march=native'] + self.cflags

Expand Down Expand Up @@ -466,9 +464,8 @@ def __init_finalize__(self, **kwargs):
platform = kwargs.pop('platform', configuration['platform'])

# Graviton flag
if platform is Graviton:
mx = platform.march
self.cflags += ['-mcpu=%s' % mx]
if isinstance(platform, Graviton):
self.cflags += ['-mcpu=%s' % platform.march]


class ClangCompiler(Compiler):
Expand Down Expand Up @@ -979,11 +976,8 @@ def __getitem__(self, key):
return partial(GNUCompiler, suffix=i)
return super().__getitem__(key)

def has_key(self, k):
return k in self.keys() or k.startswith('gcc-')

def __contains__(self, k):
return self.has_key(k)
return k in self.keys() or k.startswith('gcc-')


_compiler_registry = {
Expand Down

0 comments on commit f9b08f0

Please sign in to comment.