hpctoolkit: add variant to support rocm (#20826)

Add early support for ROCM on AMD GPUs, for develop branch only.
Requires ROCM packages to be specified as external packages.
This commit is contained in:
Mark W. Krentel 2021-01-13 02:54:17 -06:00 committed by GitHub
parent 8b9f4d53da
commit 991ff2fd94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,6 +55,10 @@ class Hpctoolkit(AutotoolsPackage):
variant('cuda', default=False,
description='Support CUDA on NVIDIA GPUs (2020.03.01 or later).')
variant('rocm', default=False,
description='Support ROCM on AMD GPUs (develop branch only, '
'requires ROCM as external packages.')
boost_libs = (
'+atomic +chrono +date_time +filesystem +system +thread +timer'
' +graph +regex +shared +multithreaded visibility=global'
@ -84,6 +88,10 @@ class Hpctoolkit(AutotoolsPackage):
depends_on('libpfm4', when='~papi')
depends_on('mpi', when='+mpi')
depends_on('hip', when='@develop+rocm')
depends_on('rocm-dbgapi', when='@develop+rocm')
depends_on('roctracer-dev', when='@develop+rocm')
conflicts('%gcc@:4.7.99', when='^dyninst@10.0.0:',
msg='hpctoolkit requires gnu gcc 4.8.x or later')
@ -126,6 +134,13 @@ def configure_args(self):
else:
args.append('--with-perfmon=%s' % spec['libpfm4'].prefix)
if spec.satisfies('@develop+rocm'):
args.extend([
'--with-rocm-hip=%s' % spec['hip'].prefix,
'--with-rocm-dbgapi=%s' % spec['rocm-dbgapi'].prefix,
'--with-rocm-tracer=%s' % spec['roctracer-dev'].prefix,
])
# MPI options for hpcprof-mpi.
if '+cray' in spec:
args.extend([