superlu-dist: fix rocm variant for the master branch (#33624)
* superlu-dist: fix rocm variant for the master branch * simplify superlu-dist * add mpi include to HIP_HIPCC_FLAGS Co-authored-by: liuyangzhuan <liuyangzhuan@users.noreply.github.com>
This commit is contained in:
parent
d925ba9bc6
commit
973b43b1c1
@ -122,12 +122,15 @@ def append_from_variant(*args):
|
||||
if cuda_arch[0] != "none":
|
||||
append_define("CMAKE_CUDA_ARCHITECTURES", cuda_arch[0])
|
||||
|
||||
if "+rocm" in spec and spec.satisfies("@amd"):
|
||||
if "+rocm" in spec and (spec.satisfies("@amd") or spec.satisfies("@8:")):
|
||||
append_define("TPL_ENABLE_HIPLIB", True)
|
||||
append_define("HIP_ROOT_DIR", spec["hip"].prefix)
|
||||
rocm_archs = spec.variants["amdgpu_target"].value
|
||||
mpiinc = spec["mpi"].prefix.include
|
||||
if "none" not in rocm_archs:
|
||||
append_define("HIP_HIPCC_FLAGS", "--amdgpu-target=" + ",".join(rocm_archs))
|
||||
append_define(
|
||||
"HIP_HIPCC_FLAGS", "--amdgpu-target=" + ",".join(rocm_archs) + " -I/" + mpiinc
|
||||
)
|
||||
|
||||
append_from_variant("BUILD_SHARED_LIBS", "shared")
|
||||
return cmake_args
|
||||
|
Loading…
Reference in New Issue
Block a user