Update to 5.7.0

I've disabled non-x86, since it seems they're moving away from arch
independent code, as they are doing some x86 intrinsics now.
This commit is contained in:
Jeremy Newton
2023-10-03 14:08:46 -04:00
parent 4028afce15
commit a96eccdd36
8 changed files with 27 additions and 233 deletions

3
.gitignore vendored
View File

@@ -8,3 +8,6 @@
/HIP-5.6.1.tar.gz
/HIPCC-5.6.1.tar.gz
/rocclr-5.6.1.tar.gz
/HIP-5.7.0.tar.gz
/HIPCC-5.7.0.tar.gz
/rocclr-5.7.0.tar.gz

View File

@@ -1,54 +0,0 @@
From 6b0bf158be8d16bca097fb65474d3169a861b498 Mon Sep 17 00:00:00 2001
From: Jeremy Newton <Jeremy.Newton@amd.com>
Date: Thu, 1 Jun 2023 17:46:48 -0400
Subject: [PATCH] Install .hipVersion into datadir for linux
Starting with LLVM 16, we can put .hipVersion in datadir for better
Linux FHS compliance:
https://github.com/llvm/llvm-project/commit/082593ff7aff68060bd66dccfa43493d07d9c255
For Windows, we can keep it status quo.
Change-Id: Id15ed0dac346fabec21ee060e7576ce085b1af70
---
hipamd/CMakeLists.txt | 6 +++++-
hipamd/packaging/CMakeLists.txt | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt
index c14a9ad32..6b5d8d3c5 100755
--- a/hipamd/CMakeLists.txt
+++ b/hipamd/CMakeLists.txt
@@ -329,7 +329,11 @@ endif()
install(FILES ${PROJECT_BINARY_DIR}/.hipInfo DESTINATION ${CMAKE_INSTALL_LIBDIR})
# Install .hipVersion
-install(FILES ${PROJECT_BINARY_DIR}/.hipVersion DESTINATION ${CMAKE_INSTALL_BINDIR})
+if(WIN32)
+ install(FILES ${PROJECT_BINARY_DIR}/.hipVersion DESTINATION ${CMAKE_INSTALL_BINDIR})
+else()
+ install(FILES ${PROJECT_BINARY_DIR}/.hipVersion DESTINATION ${CMAKE_INSTALL_DATADIR}/hip RENAME version)
+endif()
# Install src, bin, include & cmake if necessary
execute_process(COMMAND test ${CMAKE_INSTALL_PREFIX} -ef ${CMAKE_CURRENT_SOURCE_DIR}
diff --git a/hipamd/packaging/CMakeLists.txt b/hipamd/packaging/CMakeLists.txt
index b19d59490..3eac9cf14 100644
--- a/hipamd/packaging/CMakeLists.txt
+++ b/hipamd/packaging/CMakeLists.txt
@@ -97,7 +97,11 @@ install(FILES ${CMAKE_BINARY_DIR}/hipamd/include/hip/amd_detail/hip_prof_str.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hip/amd_detail COMPONENT dev)
install(FILES ${CMAKE_BINARY_DIR}/hipamd/include/hip/hip_version.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hip COMPONENT dev)
-install(FILES ${CMAKE_BINARY_DIR}/hipamd/.hipVersion DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT dev)
+if(WIN32)
+ install(FILES ${CMAKE_BINARY_DIR}/hipamd/.hipVersion DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT dev)
+else()
+ install(FILES ${CMAKE_BINARY_DIR}/hipamd/.hipVersion DESTINATION ${CMAKE_INSTALL_DATADIR}/hip RENAME version COMPONENT dev)
+endif()
install(DIRECTORY ${HIP_COMMON_DIR}/cmake/ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hip COMPONENT dev)
#End dev files install
--
2.40.1

View File

@@ -1,4 +1,4 @@
From 939e62c0f5f2a56ab4b03e18064b44605a2b95a5 Mon Sep 17 00:00:00 2001
From 166c36922a83dc6f640d04546e4d2d1ac2c833d0 Mon Sep 17 00:00:00 2001
From: Jeremy Newton <Jeremy.Newton@amd.com>
Date: Thu, 1 Jun 2023 17:54:13 -0400
Subject: [PATCH] Move FindHIP to datadir
@@ -14,10 +14,10 @@ Change-Id: If368620a6c66ca93624d023153f756d8f5c992d2
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt
index 6b5d8d3c5..fefab6acc 100755
index 272ebca35..c0f728411 100755
--- a/hipamd/CMakeLists.txt
+++ b/hipamd/CMakeLists.txt
@@ -371,7 +371,7 @@ if(NOT ${INSTALL_SOURCE} EQUAL 0)
@@ -369,7 +369,7 @@ if(NOT ${INSTALL_SOURCE} EQUAL 0)
if(WIN32)
install(DIRECTORY ${HIP_COMMON_DIR}/cmake DESTINATION .)
else()
@@ -27,18 +27,18 @@ index 6b5d8d3c5..fefab6acc 100755
endif()
diff --git a/hipamd/packaging/CMakeLists.txt b/hipamd/packaging/CMakeLists.txt
index 3eac9cf14..ab8a92e10 100644
index e6d725b67..23ff9861a 100644
--- a/hipamd/packaging/CMakeLists.txt
+++ b/hipamd/packaging/CMakeLists.txt
@@ -62,7 +62,7 @@ if(HIP_PLATFORM STREQUAL "amd" )
#Keeping it as is for now
install(FILES ${CMAKE_BINARY_DIR}/hipamd/.hipInfo DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
-install(FILES ${CMAKE_BINARY_DIR}/hipamd/hip-config.cmake ${CMAKE_BINARY_DIR}/hipamd/hip-config-version.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hip COMPONENT binary)
+install(FILES ${CMAKE_BINARY_DIR}/hipamd/hip-config.cmake ${CMAKE_BINARY_DIR}/hipamd/hip-config-version.cmake DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/hip COMPONENT binary)
install ( EXPORT hip-targets FILE hip-targets.cmake NAMESPACE hip:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hip COMPONENT binary)
install(FILES ${CMAKE_BINARY_DIR}/hipamd/src/hip-lang-config.cmake ${CMAKE_BINARY_DIR}/hipamd/src/hip-lang-config-version.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hip-lang COMPONENT binary)
@@ -102,7 +102,7 @@ else()
install(FILES ${CMAKE_BINARY_DIR}/hipamd/.hipVersion DESTINATION ${CMAKE_INSTALL_DATADIR}/hip RENAME version COMPONENT dev)
endif()
install(DIRECTORY ${HIP_COMMON_DIR}/cmake/ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hip COMPONENT dev)
-install(FILES ${CMAKE_BINARY_DIR}/hipamd/hip-config.cmake ${CMAKE_BINARY_DIR}/hipamd/hip-config-version.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hip COMPONENT dev)
+install(FILES ${CMAKE_BINARY_DIR}/hipamd/hip-config.cmake ${CMAKE_BINARY_DIR}/hipamd/hip-config-version.cmake DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/hip COMPONENT dev)
install(FILES ${CMAKE_BINARY_DIR}/hipamd/hip-config-amd.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hip COMPONENT dev)
install(FILES ${CMAKE_BINARY_DIR}/hipamd/hip-config-nvidia.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hip COMPONENT dev)
#End dev files install
--
2.40.1
2.41.0

View File

@@ -1,49 +0,0 @@
From 2cda949920a2ae5e88702ceaa806f5262070824c Mon Sep 17 00:00:00 2001
From: Jeremy Newton <Jeremy.Newton@amd.com>
Date: Tue, 23 May 2023 14:49:50 -0400
Subject: [PATCH] SWDEV-361988 - Fix hip library install permissions
"FILES" installs files as 644, but we want libraries to be 755, which
we can do with "PROGRAMS".
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
Change-Id: I155ed77482839ff6d71f90239a014d239e20f4b8
---
hipamd/packaging/CMakeLists.txt | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/hipamd/packaging/CMakeLists.txt b/hipamd/packaging/CMakeLists.txt
index 1a80e7e8c..0183b0550 100644
--- a/hipamd/packaging/CMakeLists.txt
+++ b/hipamd/packaging/CMakeLists.txt
@@ -42,20 +42,20 @@ set(CPACK_RPM_PACKAGE_LICENSE "MIT")
#Begin binary files install
if(HIP_PLATFORM STREQUAL "amd" )
if(BUILD_SHARED_LIBS)
- install(FILES ${PROJECT_BINARY_DIR}/lib/libamdhip64.so DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
- install(FILES ${PROJECT_BINARY_DIR}/lib/libamdhip64.so.${HIP_LIB_VERSION_MAJOR} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
- install(FILES ${PROJECT_BINARY_DIR}/lib/libamdhip64.so.${HIP_LIB_VERSION_STRING} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
- install(FILES ${PROJECT_BINARY_DIR}/lib/libhiprtc.so DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
- install(FILES ${PROJECT_BINARY_DIR}/lib/libhiprtc.so.${HIP_LIB_VERSION_MAJOR} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
- install(FILES ${PROJECT_BINARY_DIR}/lib/libhiprtc.so.${HIP_LIB_VERSION_STRING} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
- install(FILES ${PROJECT_BINARY_DIR}/lib/libhiprtc-builtins.so DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
- install(FILES ${PROJECT_BINARY_DIR}/lib/libhiprtc-builtins.so.${HIP_LIB_VERSION_MAJOR} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
- install(FILES ${PROJECT_BINARY_DIR}/lib/libhiprtc-builtins.so.${HIP_LIB_VERSION_STRING} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
+ install(PROGRAMS ${PROJECT_BINARY_DIR}/lib/libamdhip64.so DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
+ install(PROGRAMS ${PROJECT_BINARY_DIR}/lib/libamdhip64.so.${HIP_LIB_VERSION_MAJOR} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
+ install(PROGRAMS ${PROJECT_BINARY_DIR}/lib/libamdhip64.so.${HIP_LIB_VERSION_STRING} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
+ install(PROGRAMS ${PROJECT_BINARY_DIR}/lib/libhiprtc.so DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
+ install(PROGRAMS ${PROJECT_BINARY_DIR}/lib/libhiprtc.so.${HIP_LIB_VERSION_MAJOR} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
+ install(PROGRAMS ${PROJECT_BINARY_DIR}/lib/libhiprtc.so.${HIP_LIB_VERSION_STRING} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
+ install(PROGRAMS ${PROJECT_BINARY_DIR}/lib/libhiprtc-builtins.so DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
+ install(PROGRAMS ${PROJECT_BINARY_DIR}/lib/libhiprtc-builtins.so.${HIP_LIB_VERSION_MAJOR} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
+ install(PROGRAMS ${PROJECT_BINARY_DIR}/lib/libhiprtc-builtins.so.${HIP_LIB_VERSION_STRING} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
# Add libraries to asan package
install(DIRECTORY ${PROJECT_BINARY_DIR}/lib/ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT asan
PATTERN ".hipInfo" EXCLUDE)
else()
- install(FILES ${PROJECT_BINARY_DIR}/lib/libamdhip64.a DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
+ install(PROGRAMS ${PROJECT_BINARY_DIR}/lib/libamdhip64.a DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
endif()#End BUILD_SHARED_LIBS
#TODO:This do not belong in BINARY package.

View File

@@ -1,51 +0,0 @@
From 560bee0df3b95d9cf18d5e52d7fa99ffe6b0f488 Mon Sep 17 00:00:00 2001
From: Jeremy Newton <Jeremy.Newton@amd.com>
Date: Wed, 31 May 2023 10:51:27 -0400
Subject: [PATCH] Improve HIP_CLANG_PATH detection
Instead of checking for windows, it seems better to detect the location
of the clang binary. Normally distros put clang bin in the same
directory as hipcc, so this will improve the experience there too.
Change-Id: I506faa15c8cc69500436f2dec3cdfd3f86356fab
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
---
bin/hipvars.pm | 4 ++--
src/hipBin_amd.h | 5 ++++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/bin/hipvars.pm b/bin/hipvars.pm
index bea4ec7..0bf8c69 100644
--- a/bin/hipvars.pm
+++ b/bin/hipvars.pm
@@ -83,8 +83,8 @@ if (-e "$HIP_PATH/bin/rocm_agent_enumerator") {
}
$CUDA_PATH=$ENV{'CUDA_PATH'} // '/usr/local/cuda';
-# Windows has a different structure, all binaries are inside hip/bin
-if ($isWindows) {
+# Windows/Distro's have a different structure, all binaries are with hipcc
+if (-e "$HIP_PATH/bin/clang" or -e "$HIP_PATH/bin/clang.exe") {
$HIP_CLANG_PATH=$ENV{'HIP_CLANG_PATH'} // "$HIP_PATH/bin";
} else {
$HIP_CLANG_PATH=$ENV{'HIP_CLANG_PATH'} // "$ROCM_PATH/llvm/bin";
diff --git a/src/hipBin_amd.h b/src/hipBin_amd.h
index 21102bc..6401585 100644
--- a/src/hipBin_amd.h
+++ b/src/hipBin_amd.h
@@ -218,11 +218,14 @@ void HipBinAmd::constructCompilerPath() {
if (osInfo == windows) {
complierPath = getHipPath();
hipClangPath = complierPath;
- hipClangPath /= "bin";
} else {
complierPath = getRoccmPath();
hipClangPath = complierPath;
+ }
+ if (fs::exists("llvm/bin/clang++")) {
hipClangPath /= "llvm/bin";
+ } else {
+ hipClangPath /= "bin";
}
complierPath = hipClangPath.string();
} else {

View File

@@ -1,48 +0,0 @@
From a11397e769f71227cfc44353842ea90707610236 Mon Sep 17 00:00:00 2001
From: Jeremy Newton <Jeremy.Newton@amd.com>
Date: Wed, 31 May 2023 10:37:08 -0400
Subject: [PATCH] Improve HIP_CLANG_INCLUDE detection
Using:
$HIP_CLANG_PATH."/../lib/clang/".$HIP_CLANG_VERSION;
Isn't always correct, as the library and resource directory can be
customized at build time in LLVM.
E.g. Fedora, RHEL, and SLE uses "lib64/clang" instead of "lib/clang".
So it's better to ask clang where its resource directory is instead.
Change-Id: I026b245735af5e5310b9ee6188f3f080fac6eb51
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
---
bin/hipconfig.pl | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/bin/hipconfig.pl b/bin/hipconfig.pl
index dd03ad6..5abdfbf 100755
--- a/bin/hipconfig.pl
+++ b/bin/hipconfig.pl
@@ -64,19 +64,16 @@ BEGIN
);
if ($HIP_COMPILER eq "clang") {
- $HIP_CLANG_VERSION = "";
+ $HIP_CLANG_INCLUDE = "";
if($isWindows) {
- $HIP_CLANG_VERSION = `\"$HIP_CLANG_PATH/clang++\" --version`;
+ $HIP_CLANG_INCLUDE = `\"$HIP_CLANG_PATH/clang++\" --print-resource-dir`;
} else {
- $HIP_CLANG_VERSION = `$HIP_CLANG_PATH/clang++ --version`;
+ $HIP_CLANG_INCLUDE = `$HIP_CLANG_PATH/clang++ --print-resource-dir`;
}
- $HIP_CLANG_VERSION=~/.*clang version (\S+).*/;
- $HIP_CLANG_VERSION=$1;
$CPP_CONFIG = " -D__HIP_PLATFORM_HCC__= -D__HIP_PLATFORM_AMD__=";
$HIP_PATH_INCLUDE = $HIP_PATH."/include";
- $HIP_CLANG_INCLUDE = $HIP_CLANG_PATH."/../lib/clang/".$HIP_CLANG_VERSION;
if($isWindows) {
$CPP_CONFIG .= " -I\"$HIP_PATH_INCLUDE\" -I\"$HIP_CLANG_INCLUDE\"";
} else {

View File

@@ -4,8 +4,8 @@
# See the file "rocclr/device/comgrctx.cpp" for reference:
# https://github.com/ROCm-Developer-Tools/ROCclr/blob/develop/device/comgrctx.cpp#L62
%global rocm_release 5.6
%global rocm_patch 1
%global rocm_release 5.7
%global rocm_patch 0
%global rocm_version %{rocm_release}.%{rocm_patch}
Name: rocclr
@@ -20,19 +20,10 @@ Source1: https://github.com/ROCm-Developer-Tools/HIP/archive/refs/tags/ro
# TODO introduce HIPCC package so I can delete this:
Source2: https://github.com/ROCm-Developer-Tools/HIPCC/archive/refs/tags/rocm-%{version}.tar.gz#/HIPCC-%{version}.tar.gz
Patch0: https://github.com/ROCm-Developer-Tools/clr/commit/2cda949920a2ae5e88702ceaa806f5262070824c.patch
# Rebased upstream patch:
#https://github.com/ROCm-Developer-Tools/clr/commit/03bfa6168453cca9ddbc6aa1bf46324db186cbb3
Patch1: 0001-Install-.hipVersion-into-datadir-for-linux.patch
# Revert patch: this causes some issues with upstream LLVM 16 (RHBZ#2207599)
#https://github.com/ROCm-Developer-Tools/ROCclr/commit/041c00465b7adcee78085dc42253d42d1bb1f250
Patch4: 0001-Revert-SWDEV-325538-Enable-code-object-v5-by-default.patch
# HIPCC fixes:
Patch100: https://github.com/ROCm-Developer-Tools/HIPCC/commit/a11397e769f71227cfc44353842ea90707610236.patch
Patch101: https://github.com/ROCm-Developer-Tools/HIPCC/commit/560bee0df3b95d9cf18d5e52d7fa99ffe6b0f488.patch
# Moves FindHIP cmake to datadir, to fit better with hip-devel being noarch:
Patch6: 0001-Move-FindHIP-to-datadir.patch
@@ -57,10 +48,9 @@ BuildRequires: rocminfo >= %{rocm_release}
BuildRequires: rocm-runtime-devel >= %{rocm_release}
BuildRequires: zlib-devel
# Only the following architectures are supported, since the kernel support only
# exists for x86_64, aarch64, and ppc64le:
ExclusiveArch: x86_64 aarch64 ppc64le
# ROCclr relise on some x86 intrinsics
# 32bit userspace is excluded as it likely doesn't work and is not very useful
ExclusiveArch: x86_64
# rocclr bundles OpenCL 2.2 headers
# Some work is needed to unbundle this, as it fails to compile with latest
@@ -306,6 +296,9 @@ chmod 755 %{buildroot}%{_libdir}/lib*.so*
%{_docdir}/hip
%changelog
* Tue Oct 03 2023 Jeremy Newton <alexjnewt at hotmail dot com> - 5.7.0-1
- Update to 5.7
* Tue Sep 12 2023 Jeremy Newton <alexjnewt at hotmail dot com> - 5.6.1-1
- Update to 5.6.1

View File

@@ -1,3 +1,3 @@
SHA512 (HIP-5.6.1.tar.gz) = 5776a446161c141538fd86007668b483c859b8e46389ee0ac9e9cb8e75c04df07a2e8ef22e4465a4db6dd31444d1e38223983acad8182b2fe637265aab22bcb5
SHA512 (HIPCC-5.6.1.tar.gz) = f416e733bd6262c41cc77424a2f25e2cad3e9caed5caa0b4c42fce508f96d3b31aee42a96a4df9e6af4edea43a092ac8413eb0bac7ee86eae78f62c13a7cb0b8
SHA512 (rocclr-5.6.1.tar.gz) = d2c80ad1f3b851abf0a383155a31ef25d680b2e8d9c1d1394314839c27c55546d25045bf90e9160942ce8107f181d8305823248df399e2b9364f33e1b94048ab
SHA512 (HIP-5.7.0.tar.gz) = 02d42f0abb81c21a6929eff2257975eca4a022e6f9fc84e7ff46b84c8f40a69074bf3cad9f09ecd05a26c7a3bde30c67ef44cb028a5206e0738535a0dc4f6145
SHA512 (HIPCC-5.7.0.tar.gz) = b9f44c82623136a91b20bf541140b75e61a9bfa89b977ab84512ef8509c61c874887aed20a33f4e927469ed96222ba5d01df47eb6324f3f0f119ae2e31f2567d
SHA512 (rocclr-5.7.0.tar.gz) = 2c36e44ce488c01deaae4a73daad2b18d34c0a23a8ad1b72cee0936e6e3651f47275a84190f4f92eadd1dceb153cd4dd3746dd40066055bda65902aec40b8071