Skip to content

Commit

Permalink
arch: Fixup platform for avx512 jit
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioLuporini committed Aug 9, 2023
1 parent b85be26 commit c0d920a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions devito/arch/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,14 @@ def __init__(self, *args, **kwargs):
self.cflags.append('-ffast-math')

if platform.isa == 'avx512':
# The default is `=256` because avx512 slows down the CPU frequency;
# however, we empirically found that stencils generally benefit
# from `=512`
self.cflags.append('-mprefer-vector-width=512')
if self.version >= Version("8.0.0"):
# The default is `=256` because avx512 slows down the CPU frequency;
# however, we empirically found that stencils generally benefit
# from `=512`
self.cflags.append('-mprefer-vector-width=512')
else:
# Unsupported on earlier versions
pass

if platform in [POWER8, POWER9]:
# -march isn't supported on power architectures, is -mtune needed?
Expand Down Expand Up @@ -698,6 +702,7 @@ class IntelCompiler(Compiler):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

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

self.cflags.append("-xHost")
Expand Down

0 comments on commit c0d920a

Please sign in to comment.