Make hwloc both CudaPackage and ROCmPackage (#31334)

* Make hwloc both CudaPackage and ROCmPackage

* Remove redundant variants
This commit is contained in:
Wileam Y. Phan 2022-10-05 11:45:47 -04:00 committed by GitHub
parent 592d97137a
commit 9fe315b953
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,7 @@
from spack.package import *
class Hwloc(AutotoolsPackage):
class Hwloc(AutotoolsPackage, CudaPackage, ROCmPackage):
"""The Hardware Locality (hwloc) software project.
The Portable Hardware Locality (hwloc) software package
@ -64,7 +64,6 @@ class Hwloc(AutotoolsPackage):
variant("nvml", default=False, description="Support NVML device discovery")
variant("gl", default=False, description="Support GL device discovery")
variant("cuda", default=False, description="Support CUDA devices")
variant("libxml2", default=True, description="Build with libxml2")
variant("libudev", default=False, description="Build with libudev")
variant(
@ -167,8 +166,8 @@ def configure_args(self):
args.append("--disable-rsmi")
if "+rocm" in self.spec:
args.append("--with-rocm={0}".format(self.spec["rocm"].prefix))
args.append("--with-rocm-version={0}".format(self.spec["rocm"].version))
args.append("--with-rocm={0}".format(self.spec["hip"].prefix))
args.append("--with-rocm-version={0}".format(self.spec["hip"].version))
if "+netloc" in self.spec:
args.append("--enable-netloc")