Tau rocm fix (#26134)

* update the Tau package to use the correct ROCm dependencies and prefixes

    1st:
    When the rocm variant is selected, tau defaults to look for rocm in /opt/rocm
    which is not guarenteed to be the correct location -- this has been fixed
    to provide the prefix for hsa-rocr-dev (which is now a dependency when +rocm is
    selected).

    2nd:
    the rocprofiler dependency package was not specified correctly, it should
    be called rocprofiler-dev, also rocprofiler-dev is a dependency when
    +rocprofiler is selected.

added roctracer support
This commit is contained in:
luker 2021-09-24 17:29:04 -05:00 committed by GitHub
parent cdcecda9d0
commit ab90cd8fc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,6 +74,7 @@ class Tau(Package):
variant('rocm', default=False, description='Activates ROCm support')
variant('level_zero', default=False, description='Activates Intel OneAPI Level Zero support')
variant('rocprofiler', default=False, description='Activates ROCm rocprofiler support')
variant('roctracer', default=False, description='Activates ROCm roctracer support')
variant('opencl', default=False, description='Activates OpenCL support')
variant('fortran', default=darwin_default, description='Activates Fortran support')
variant('io', default=True, description='Activates POSIX I/O support')
@ -106,6 +107,9 @@ class Tau(Package):
depends_on('adios2', when='+adios2')
depends_on('sqlite', when='+sqlite')
depends_on('hwloc')
depends_on('rocprofiler-dev', when='+rocprofiler')
depends_on('roctracer-dev', when='+roctracer')
depends_on('hsa-rocr-dev', when='+rocm')
# Elf only required from 2.28.1 on
conflicts('+elf', when='@:2.28.0')
@ -258,10 +262,13 @@ def install(self, spec, prefix):
options.append("-opencl")
if '+rocm' in spec:
options.append("-rocm")
options.append("-rocm=%s" % spec['hsa-rocr-dev'].prefix)
if '+rocprofiler' in spec:
options.append("-rocprofiler=%s" % spec['rocprofiler'].prefix)
options.append("-rocprofiler=%s" % spec['rocprofiler-dev'].prefix)
if '+roctracer' in spec:
options.append("-roctracer=%s" % spec['roctracer-dev'].prefix)
if '+adios2' in spec:
options.append("-adios=%s" % spec['adios2'].prefix)