Fix build failure when kokkos +rocm is enabled. (#44459)
This commit is contained in:
parent
6813a1e388
commit
5b18974452
1 changed files with 2 additions and 0 deletions
|
@ -197,6 +197,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))
|
||||
|
@ -349,6 +350,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)
|
||||
|
|
Loading…
Reference in a new issue