Skip to content

Commit e69f27a

Browse files
ggormanmloubout
authored andcommitted
Reinstate AWS runner.
1 parent 49a09e1 commit e69f27a

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

devito/arch/compiler.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -434,10 +434,8 @@ def __init_finalize__(self, **kwargs):
434434
if platform in [POWER8, POWER9]:
435435
# -march isn't supported on power architectures, is -mtune needed?
436436
self.cflags = ['-mcpu=native'] + self.cflags
437-
elif platform is Graviton:
438-
# Graviton flag
439-
mx = platform.march
440-
self.cflags = ['-mcpu=%s' % mx] + self.cflags
437+
elif isinstance(platform, Graviton):
438+
self.cflags = ['-mcpu=%s' % platform.march] + self.cflags
441439
else:
442440
self.cflags = ['-march=native'] + self.cflags
443441

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

468466
# Graviton flag
469-
if platform is Graviton:
470-
mx = platform.march
471-
self.cflags += ['-mcpu=%s' % mx]
467+
if isinstance(platform, Graviton):
468+
self.cflags += ['-mcpu=%s' % platform.march]
472469

473470

474471
class ClangCompiler(Compiler):
@@ -979,11 +976,8 @@ def __getitem__(self, key):
979976
return partial(GNUCompiler, suffix=i)
980977
return super().__getitem__(key)
981978

982-
def has_key(self, k):
983-
return k in self.keys() or k.startswith('gcc-')
984-
985979
def __contains__(self, k):
986-
return self.has_key(k)
980+
return k in self.keys() or k.startswith('gcc-')
987981

988982

989983
_compiler_registry = {

0 commit comments

Comments
 (0)