hpctoolkit: add variants for gtpin and opencl (#31439)

Reorder a few options to better group them by function.
This commit is contained in:
Mark W. Krentel 2022-07-05 14:22:00 -05:00 committed by GitHub
parent 37c9974755
commit 12fb842bea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -64,11 +64,18 @@ class Hpctoolkit(AutotoolsPackage):
description='Needed when MPICXX builds static binaries '
'for the compute nodes.')
variant('cuda', default=False,
description='Support CUDA on NVIDIA GPUs (2020.03.01 or later).')
variant('level_zero', default=False,
description='Support Level Zero on Intel GPUs (2022.04.15 or later).')
variant('cuda', default=False,
description='Support CUDA on NVIDIA GPUs (2020.03.01 or later).')
variant('gtpin', default=False,
description='Support instrumenting Intel GPU kernels with Intel GT-Pin '
'(2022.05.15 or later, and requires level_zero).')
variant('opencl', default=False,
description='Support OpenCL')
variant('rocm', default=False,
description='Support ROCM on AMD GPUs (2022.04.15 or later).')
@ -107,6 +114,10 @@ class Hpctoolkit(AutotoolsPackage):
depends_on('cuda', when='+cuda')
depends_on('oneapi-level-zero', when='+level_zero')
depends_on('oneapi-igc', when='+gtpin')
depends_on('intel-gtpin', when='+gtpin')
depends_on('opencl-c-headers', when='+opencl')
depends_on('intel-xed+pic', when='target=x86_64:')
depends_on('memkind', type=('build', 'run'), when='@2021.05.01:')
depends_on('papi', when='+papi')
@ -131,6 +142,9 @@ class Hpctoolkit(AutotoolsPackage):
conflicts('+cuda', when='@:2019',
msg='cuda requires 2020.03.01 or later')
conflicts('+gtpin', when='~level_zero',
msg='gtpin requires level_zero')
conflicts('+rocm', when='@:2022.03',
msg='rocm requires 2022.04.15 or later')
@ -168,14 +182,12 @@ def configure_args(self):
]
if spec.satisfies('@:master'):
args.append('--with-binutils=%s' % spec['binutils'].prefix)
args.append('--with-libdwarf=%s' % spec['libdwarf'].prefix)
if '+cuda' in spec:
args.append('--with-cuda=%s' % spec['cuda'].prefix)
if '+level_zero' in spec:
args.append('--with-level0=%s' % spec['oneapi-level-zero'].prefix)
args.extend([
'--with-binutils=%s' % spec['binutils'].prefix,
'--with-libdwarf=%s' % spec['libdwarf'].prefix,
])
else:
args.append('--with-libiberty=%s' % spec['libiberty'].prefix)
if spec.satisfies('@:2020.09'):
args.append('--with-gotcha=%s' % spec['gotcha'].prefix)
@ -183,9 +195,6 @@ def configure_args(self):
if spec.target.family == 'x86_64':
args.append('--with-xed=%s' % spec['intel-xed'].prefix)
if spec.satisfies('@develop'):
args.append('--with-libiberty=%s' % spec['libiberty'].prefix)
if spec.satisfies('@:2022.03'):
args.append('--with-mbedtls=%s' % spec['mbedtls'].prefix)
@ -197,6 +206,21 @@ def configure_args(self):
else:
args.append('--with-perfmon=%s' % spec['libpfm4'].prefix)
if '+cuda' in spec:
args.append('--with-cuda=%s' % spec['cuda'].prefix)
if '+level_zero' in spec:
args.append('--with-level0=%s' % spec['oneapi-level-zero'].prefix)
if '+opencl' in spec:
args.append('--with-opencl=%s' % spec['opencl-c-headers'].prefix)
if '+gtpin' in spec:
args.extend([
'--with-gtpin=%s' % spec['intel-gtpin'].prefix,
'--with-igc=%s' % spec['oneapi-igc'].prefix,
])
if spec.satisfies('+rocm'):
args.extend([
'--with-rocm-hip=%s' % spec['hip'].prefix,