add ROCmPackage to OSU Micro Benchmarks (#32806)
This commit is contained in:
parent
b192e3492c
commit
de9fc038f7
@ -8,7 +8,7 @@
|
|||||||
from spack.package import *
|
from spack.package import *
|
||||||
|
|
||||||
|
|
||||||
class OsuMicroBenchmarks(AutotoolsPackage, CudaPackage):
|
class OsuMicroBenchmarks(AutotoolsPackage, CudaPackage, ROCmPackage):
|
||||||
"""The Ohio MicroBenchmark suite is a collection of independent MPI
|
"""The Ohio MicroBenchmark suite is a collection of independent MPI
|
||||||
message passing performance microbenchmarks developed and written at
|
message passing performance microbenchmarks developed and written at
|
||||||
The Ohio State University. It includes traditional benchmarks and
|
The Ohio State University. It includes traditional benchmarks and
|
||||||
@ -48,6 +48,12 @@ def configure_args(self):
|
|||||||
if "none" not in cuda_arch:
|
if "none" not in cuda_arch:
|
||||||
config_args.append("NVCCFLAGS=" + " ".join(self.cuda_flags(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)
|
# librt not available on darwin (and not required)
|
||||||
if not sys.platform == "darwin":
|
if not sys.platform == "darwin":
|
||||||
config_args.append("LDFLAGS=-lrt")
|
config_args.append("LDFLAGS=-lrt")
|
||||||
|
Loading…
Reference in New Issue
Block a user