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 22, 2024
1 parent 49a09e1 commit e69f27a
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 e69f27a

Please sign in to comment.