Skip to content

Commit 993808b

Browse files
committed
arch: switch amd openmp offload to native offload arch
1 parent 6046f82 commit 993808b

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

devito/arch/compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ def __init_finalize__(self, **kwargs):
563563
if language in ['C', 'openmp']:
564564
self.ldflags += ['-target', 'x86_64-pc-linux-gnu']
565565
self.ldflags += ['-fopenmp']
566-
self.ldflags += ['--offload-arch=%s' % platform.march]
566+
self.ldflags += ['--offload-arch=native']
567567
elif platform in [POWER8, POWER9]:
568568
# It doesn't make much sense to use AOMP on Power, but it should work
569569
self.cflags.append('-mcpu=native')

tests/test_gpu_common.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,7 @@ def test_streaming_multi_input(self, opt, ntmps):
643643

644644
assert np.all(grad.data == grad1.data)
645645

646+
@switchconfig(safe_math=True)
646647
def test_streaming_multi_input_conddim_foward(self):
647648
nt = 10
648649
grid = Grid(shape=(4, 4))
@@ -671,6 +672,7 @@ def test_streaming_multi_input_conddim_foward(self):
671672

672673
assert np.all(v.data == v1.data)
673674

675+
@switchconfig(safe_math=True)
674676
def test_streaming_multi_input_conddim_backward(self):
675677
nt = 10
676678
grid = Grid(shape=(4, 4))

0 commit comments

Comments
 (0)