Skip to content

Commit 08ea454

Browse files
committed
arch: support rocm7
1 parent 20da795 commit 08ea454

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

devito/arch/compiler.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,7 @@ class HipCompiler(Compiler):
760760
_default_cpp = True
761761

762762
def __init_finalize__(self, **kwargs):
763+
self.cflags.append('-Wno-unused-result')
763764

764765
if configuration['mpi']:
765766
# We rather use `hipcc` to compile MPI, but for this we have to
@@ -773,6 +774,23 @@ def __init_finalize__(self, **kwargs):
773774

774775
self.src_ext = 'cpp'
775776

777+
@property
778+
def version(self):
779+
try:
780+
res = run(['hipconfig', "--version"], stdout=PIPE, stderr=DEVNULL)
781+
ver = res.stdout.decode("utf-8").split('-')[0]
782+
ver = Version(ver)
783+
except (UnicodeDecodeError, OSError):
784+
ver = Version("0")
785+
return ver
786+
787+
@property
788+
def _cxxstd(self):
789+
if self.version >= Version("7.0.0"):
790+
return 'c++17'
791+
else:
792+
return 'c++14'
793+
776794
def __lookup_cmds__(self):
777795
self.CC = 'hipcc'
778796
self.CXX = 'hipcc'

docker/Dockerfile.amd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
# Based on https://github.com/amd/InfinityHub-CI/tree/main/base-gpu-mpi-rocm-docker
44
##############################################################
55

6-
ARG ROCM_VERSION=6.3.2
6+
ARG ROCM_VERSION=7.0.2
77

88
FROM rocm/dev-ubuntu-22.04:${ROCM_VERSION}-complete AS sdk-base
99

10-
ARG UCX_BRANCH="v1.16.0"
10+
ARG UCX_BRANCH="v1.17.x"
1111
ARG OMPI_BRANCH="v5.0.x"
1212

1313
# Update and Install basic Linux development tools

0 commit comments

Comments
 (0)