llvm-amdgpu: remove the openmp variant. (#42807)

Add rocm-openmp-extras package as a dependency for +openmp for rocm
This commit is contained in:
Sreenivasa Murthy Kolam 2024-03-05 00:46:53 +05:30 committed by GitHub
parent 250038fa9b
commit 913d79238e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 6 additions and 12 deletions

View file

@ -133,7 +133,7 @@ class Hwloc(AutotoolsPackage, CudaPackage, ROCmPackage):
depends_on("rocm-opencl", when="+opencl")
# Avoid a circular dependency since the openmp
# variant of llvm-amdgpu depends on hwloc.
depends_on("llvm-amdgpu~openmp", when="+opencl")
depends_on("llvm-amdgpu", when="+opencl")
with when("+oneapi-level-zero"):
depends_on("oneapi-level-zero")

View file

@ -640,7 +640,8 @@ def url_for_version(self, version):
depends_on("vtk", when="+user-vtk")
depends_on("vtk", when="+vtk")
depends_on("hipcub", when="~kokkos +rocm")
depends_on("llvm-amdgpu +openmp", when="+rocm +openmp", type="build")
depends_on("llvm-amdgpu ", when="+rocm", type="build")
depends_on("rocm-openmp-extras", when="+rocm +openmp", type="build")
# propagate CUDA and ROCm architecture when +kokkos
for arch in CudaPackage.cuda_arch_values:

View file

@ -53,7 +53,6 @@ class LlvmAmdgpu(CMakePackage):
"standalone spack package."
),
)
variant("openmp", default=False, description="Enable OpenMP")
variant(
"llvm_dylib",
default=False,
@ -78,11 +77,6 @@ class LlvmAmdgpu(CMakePackage):
depends_on("ncurses+termlib", type="link")
depends_on("pkgconfig", type="build")
# openmp dependencies
depends_on("perl-data-dumper", type="build", when="+openmp")
depends_on("hwloc", when="+openmp")
depends_on("elf", type="link", when="+openmp")
# OpenMP clang toolchain looks for bitcode files in llvm/bin/../lib
# as per 5.2.0 llvm code. It used to be llvm/bin/../lib/libdevice.
# Below patch is to look in the old path.
@ -189,8 +183,6 @@ class LlvmAmdgpu(CMakePackage):
def cmake_args(self):
llvm_projects = ["clang", "lld", "clang-tools-extra", "compiler-rt"]
if "+openmp" in self.spec:
llvm_projects.append("openmp")
llvm_runtimes = ["libcxx", "libcxxabi"]
args = [
self.define("LLVM_ENABLE_Z3_SOLVER", "OFF"),

View file

@ -68,7 +68,8 @@ class Papi(AutotoolsPackage, ROCmPackage):
depends_on("cuda", when="+nvml")
depends_on("hsa-rocr-dev", when="+rocm")
depends_on("rocprofiler-dev", when="+rocm")
depends_on("llvm-amdgpu +openmp", when="+rocm")
depends_on("llvm-amdgpu", when="+rocm")
depends_on("rocm-openmp-extras", when="+rocm")
depends_on("rocm-smi-lib", when="+rocm_smi")
conflicts("%gcc@8:", when="@5.3.0", msg="Requires GCC version less than 8.0")

View file

@ -205,7 +205,7 @@ class RocmOpenmpExtras(Package):
depends_on(f"hsakmt-roct@{ver}", when=f"@{ver}")
depends_on(f"comgr@{ver}", when=f"@{ver}")
depends_on(f"hsa-rocr-dev@{ver}", when=f"@{ver}")
depends_on(f"llvm-amdgpu@{ver} ~openmp", when=f"@{ver}")
depends_on(f"llvm-amdgpu@{ver}", when=f"@{ver}")
for ver in ["5.5.0", "5.5.1", "5.6.0", "5.6.1", "5.7.0", "5.7.1", "6.0.0", "6.0.2"]:
depends_on(f"rocm-core@{ver}", when=f"@{ver}")