rocm conflicts with compilers that do not support rocm
This commit is contained in:
@@ -139,11 +139,6 @@ def initconfig_compiler_entries(self):
|
|||||||
"endif()\n",
|
"endif()\n",
|
||||||
]
|
]
|
||||||
|
|
||||||
# We defined hipcc as top-level compiler for packages when +rocm.
|
|
||||||
# This avoid problems coming from rocm flags being applied to another compiler.
|
|
||||||
if "+rocm" in spec:
|
|
||||||
entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc))
|
|
||||||
|
|
||||||
flags = spec.compiler_flags
|
flags = spec.compiler_flags
|
||||||
|
|
||||||
# use global spack compiler flags
|
# use global spack compiler flags
|
||||||
|
|||||||
@@ -145,7 +145,11 @@ class ROCmPackage(PackageBase):
|
|||||||
depends_on("hip +rocm", when="+rocm")
|
depends_on("hip +rocm", when="+rocm")
|
||||||
|
|
||||||
# need amd gpu type for rocm builds
|
# need amd gpu type for rocm builds
|
||||||
|
compilers_supporting_rocm = ("cce", "rocmcc")
|
||||||
conflicts("amdgpu_target=none", when="+rocm")
|
conflicts("amdgpu_target=none", when="+rocm")
|
||||||
|
for compiler in spack.compilers.supported_compilers():
|
||||||
|
if compiler not in compilers_supporting_rocm:
|
||||||
|
conflicts(f"%{compiler}", when="+rocm")
|
||||||
|
|
||||||
# https://github.com/ROCm-Developer-Tools/HIP/blob/master/bin/hipcc
|
# https://github.com/ROCm-Developer-Tools/HIP/blob/master/bin/hipcc
|
||||||
# It seems that hip-clang does not (yet?) accept this flag, in which case
|
# It seems that hip-clang does not (yet?) accept this flag, in which case
|
||||||
|
|||||||
Reference in New Issue
Block a user