HIP: Change mesa dep to gl (#29017)
* HIP: Change mesa18 dep to gl * Mesa: Conflict with llvm-amdgpu when +llvm and swr * Add def for suffix * Disable llvm suffix patch. * LLVM: Remove version suffix patches
This commit is contained in:
parent
a6aff211d2
commit
cbfe0d7492
@ -114,7 +114,7 @@ class Aomp(Package):
|
||||
depends_on('python@3:', type='build', when='@3.9.0:')
|
||||
depends_on('py-setuptools', when='@3.9.0:', type='build')
|
||||
|
||||
depends_on('mesa18~llvm@18.3:', type=('build', 'link'))
|
||||
depends_on('gl@4.5:', type=('build', 'link'))
|
||||
depends_on('py-pip', when='@3.8.0:', type='build')
|
||||
depends_on('py-wheel', when='@3.8.0:', type=('build', 'run'))
|
||||
depends_on('perl-data-dumper', type='build')
|
||||
|
@ -42,7 +42,7 @@ def url_for_version(self, version):
|
||||
variant('build_type', default='Release', values=("Release", "Debug", "RelWithDebInfo"), description='CMake build type')
|
||||
|
||||
depends_on('cmake@3:', type='build')
|
||||
depends_on('mesa~llvm@21:', type='link')
|
||||
depends_on('gl@4.5:', type='link')
|
||||
depends_on('libelf', type='link', when="@3.7.0:3.8.0")
|
||||
depends_on('numactl', type='link', when="@3.7.0:")
|
||||
|
||||
|
@ -37,7 +37,7 @@ class Hip(CMakePackage):
|
||||
|
||||
depends_on('cmake@3:', type='build')
|
||||
depends_on('perl@5.10:', type=('build', 'run'))
|
||||
depends_on('mesa~llvm@21:')
|
||||
depends_on('gl@4.5:')
|
||||
|
||||
for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0', '4.1.0',
|
||||
'4.2.0', '4.3.0', '4.3.1']:
|
||||
|
@ -1,14 +0,0 @@
|
||||
diff --git a/llvm/include/llvm/Config/llvm-config.h.cmake b/llvm/include/llvm/Config/llvm-config.h.cmake
|
||||
index 4493bb65d444..e2b3c61b3c33 100644
|
||||
--- a/llvm/include/llvm/Config/llvm-config.h.cmake
|
||||
+++ b/llvm/include/llvm/Config/llvm-config.h.cmake
|
||||
@@ -74,6 +74,9 @@
|
||||
/* Patch version of the LLVM API */
|
||||
#define LLVM_VERSION_PATCH ${LLVM_VERSION_PATCH}
|
||||
|
||||
+/* LLVM version suffix */
|
||||
+#cmakedefine LLVM_VERSION_SUFFIX "${LLVM_VERSION_SUFFIX}"
|
||||
+
|
||||
/* LLVM version string */
|
||||
#define LLVM_VERSION_STRING "${PACKAGE_VERSION}"
|
||||
|
@ -72,10 +72,6 @@ class LlvmAmdgpu(CMakePackage):
|
||||
# This is already fixed in upstream but not in 4.2.0 rocm release
|
||||
patch('fix-spack-detection-4.2.0.patch', when='@4.2.0:')
|
||||
|
||||
# Add LLVM_VERSION_SUFFIX
|
||||
# https://reviews.llvm.org/D115818
|
||||
patch('llvm-version-suffix-macro.patch', when='@:4.3.2')
|
||||
|
||||
conflicts('^cmake@3.19.0')
|
||||
|
||||
root_cmakelists_dir = 'llvm'
|
||||
@ -112,6 +108,12 @@ class LlvmAmdgpu(CMakePackage):
|
||||
when='@master +rocm-device-libs'
|
||||
)
|
||||
|
||||
def setup_dependent_build_environment(self, env, dependent_spec):
|
||||
# LLVM-amdgpu is always based off of a pre-release version of LLVM.
|
||||
# Set the version suffix to denote this fact for downstream projects.
|
||||
env.append_flags('CXXFLAGS', '-DLLVM_VERSION_SUFFIX=git')
|
||||
env.append_flags('CFLAGS', '-DLLVM_VERSION_SUFFIX=git')
|
||||
|
||||
def cmake_args(self):
|
||||
llvm_projects = [
|
||||
'clang',
|
||||
|
@ -1,14 +0,0 @@
|
||||
diff --git a/llvm/include/llvm/Config/llvm-config.h.cmake b/llvm/include/llvm/Config/llvm-config.h.cmake
|
||||
index 4493bb65d444..e2b3c61b3c33 100644
|
||||
--- a/llvm/include/llvm/Config/llvm-config.h.cmake
|
||||
+++ b/llvm/include/llvm/Config/llvm-config.h.cmake
|
||||
@@ -74,6 +74,9 @@
|
||||
/* Patch version of the LLVM API */
|
||||
#define LLVM_VERSION_PATCH ${LLVM_VERSION_PATCH}
|
||||
|
||||
+/* LLVM version suffix */
|
||||
+#cmakedefine LLVM_VERSION_SUFFIX "${LLVM_VERSION_SUFFIX}"
|
||||
+
|
||||
/* LLVM version string */
|
||||
#define LLVM_VERSION_STRING "${PACKAGE_VERSION}"
|
||||
|
@ -347,10 +347,6 @@ class Llvm(CMakePackage, CudaPackage):
|
||||
|
||||
patch('llvm-gcc11.patch', when='@9:11%gcc@11:')
|
||||
|
||||
# Add LLVM_VERSION_SUFFIX
|
||||
# https://reviews.llvm.org/D115818
|
||||
patch('llvm-version-suffix-macro.patch', when='@:13.0.1')
|
||||
|
||||
# The functions and attributes below implement external package
|
||||
# detection for LLVM. See:
|
||||
#
|
||||
|
@ -42,7 +42,8 @@ class Mesa18(AutotoolsPackage):
|
||||
|
||||
# Internal options
|
||||
variant('llvm', default=True, description="Enable LLVM.")
|
||||
variant('swr', values=any_combination_of('avx', 'avx2', 'knl', 'skx'),
|
||||
_SWR_ENABLED_VALUES = ('avx', 'avx2', 'knl', 'skx')
|
||||
variant('swr', values=any_combination_of(*_SWR_ENABLED_VALUES),
|
||||
description="Enable the SWR driver.")
|
||||
# conflicts('~llvm', when='~swr=none')
|
||||
|
||||
|
@ -38,7 +38,7 @@ def url_for_version(self, version):
|
||||
variant('build_type', default='Release', values=("Release", "Debug", "RelWithDebInfo"), description='CMake build type')
|
||||
|
||||
depends_on('cmake@3:', type='build')
|
||||
depends_on('mesa~llvm@21:', type='link')
|
||||
depends_on('gl@4.5:', type='link')
|
||||
depends_on('numactl', type='link', when='@3.7.0:')
|
||||
|
||||
for d_version, d_shasum in [
|
||||
|
@ -105,7 +105,7 @@ class RocmOpenmpExtras(Package):
|
||||
version('3.9.0', sha256=versions_dict['3.9.0']['aomp'])
|
||||
|
||||
depends_on('cmake@3:', type='build')
|
||||
depends_on('mesa~llvm@21:', type=('build', 'link'))
|
||||
depends_on('gl@4.5:', type=('build', 'link'))
|
||||
depends_on('py-setuptools', type='build')
|
||||
depends_on('python@3:', type='build')
|
||||
depends_on('perl-data-dumper', type='build')
|
||||
|
Loading…
Reference in New Issue
Block a user