Fix build failure when kokkos +rocm is enabled. (#44459)

* fix kokkos +rocm build failure

* address review comments

* address review comments . revert the previous changes

* address review comments. Add rocthrust for 4.3 version onwards
This commit is contained in:
Sreenivasa Murthy Kolam 2024-07-26 19:14:06 +05:30 committed by GitHub
parent 690bcf5d47
commit f99a5ef2e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -202,6 +202,7 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
variant(dev, default=dflt, description=desc)
conflicts("+cuda", when="+rocm", msg="CUDA and ROCm are not compatible in Kokkos.")
depends_on("intel-oneapi-dpl", when="+sycl")
depends_on("rocthrust", when="@4.3: +rocm")
for opt, (dflt, desc) in options_variants.items():
variant(opt, default=dflt, description=desc, when=("+cuda" if "cuda" in opt else None))
@ -354,6 +355,7 @@ def cmake_args(self):
if "+rocm" in self.spec:
options.append(self.define("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc))
options.append(self.define("Kokkos_ENABLE_ROCTHRUST", True))
elif "+wrapper" in self.spec:
options.append(
self.define("CMAKE_CXX_COMPILER", self.spec["kokkos-nvcc-wrapper"].kokkos_cxx)