add ROCmPackage to OSU Micro Benchmarks (#32806)

This commit is contained in:
Pak Lui 2022-09-26 14:26:58 -07:00 committed by GitHub
parent b192e3492c
commit de9fc038f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@
from spack.package import *
class OsuMicroBenchmarks(AutotoolsPackage, CudaPackage):
class OsuMicroBenchmarks(AutotoolsPackage, CudaPackage, ROCmPackage):
"""The Ohio MicroBenchmark suite is a collection of independent MPI
message passing performance microbenchmarks developed and written at
The Ohio State University. It includes traditional benchmarks and
@ -48,6 +48,12 @@ def configure_args(self):
if "none" not in cuda_arch:
config_args.append("NVCCFLAGS=" + " ".join(self.cuda_flags(cuda_arch)))
if "+rocm" in spec:
config_args.extend(["--enable-rocm", "--with-rocm=%s" % spec["hip"].prefix])
rocm_arch = spec.variants["amdgpu_target"].value
if "none" not in rocm_arch:
config_args.append("HCC_AMDGPU_TARGET=" + " ".join(self.hip_flags(rocm_arch)))
# librt not available on darwin (and not required)
if not sys.platform == "darwin":
config_args.append("LDFLAGS=-lrt")