spack/var/spack/repos/builtin/packages/hip/0014-Remove-compiler-rt-linkage-for-host-for-5.7.0.patch
Sreenivasa Murthy Kolam 5351382501
Bump up the version for ROCm-5.7.0 and ROCm-5.7.1 releases. (#40724)
* initial commit for rocm-5.7.0 and 5.7.1 releases
* bump up ther version for 5.7.0 and 5.7.1 releases
* update recipes to support 5.7.0 and 5.7.1 releases
* bump up the version for ROCm 5.7.0 and ROCm-5.7.1 releases
* bump up the version for composable-kernel amd miopen-hip
* fix style errors
* fix style errors in hip etc
* renaming composable-kernel recipe
* changes for composable_kernel
* Revert "renaming composable-kernel recipe"
  This reverts commit 0cf6c6debf.
* Revert "changes for composable_kernel"
  This reverts commit 05272a10a7.
* bump up the version for hiprand
* using the checksum for hiprand-5.7.1
* bump up the version for 5.7.0 and 5.7.1 releases
* fix style errors
* fix merge conflicts with the develop.
* temp workaround for the error seen with rocm-5.7.0 when trying
  to generate the dependency file for runtime/legion/legion_redop.cu
* fix build issue(work around) with legion
* add patch for migraphx package to turn off ck
* update to  hip recipe
* fix hip-path detection inside llvm clang driver
* update llvm-amdgpu and rocm-validation-suite recipes
* fix style errors
* bump up the version for amdsmi for rocm-5.7.0 release
* add support for gfx941,gfx942 for rocm-5.7.0 release onwards
* revert changes to rocm.py file
* added gfx941 and gfx942 to rocm.py and add the gfx942 to kokkos and new checksum
  the new version seem to support gfx942
* bump up the version for rccl for 5.7.1
* update the patch for rocm-openmp-extras for 5.7.0
* update mivisionx recipe for 5.7.0 release
* add new dependencies for rocfft tests
* port the fix for avx build, the start address of values_ buffer in KernelParameters is not
  correct as it is computed based on 16-byte alignment
* set HIP_PATH=ROCM_PATH for 5.7.0 onwards
* address review comments
* revert adding xnack- and xnack+ to gfx940,gfx941,gfx942 as the prechecks were failing
2023-12-11 14:49:19 -08:00

75 lines
3.1 KiB
Diff

From 9be86942bfd8fd9a1c9436a7f87de5a52aa4cb7e Mon Sep 17 00:00:00 2001
From: sreenivasa murthy kolam <sreenivasamurthy.kolam@amd.com>
Date: Wed, 25 Oct 2023 07:33:45 +0000
Subject: [PATCH] Remove-compiler-rt-linkage-for-host-for-5.7.0
---
clr/hipamd/CMakeLists.txt | 6 ++++--
clr/hipamd/hip-config-amd.cmake | 1 -
hipcc/bin/hipcc.pl | 10 +++++++---
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/clr/hipamd/CMakeLists.txt b/clr/hipamd/CMakeLists.txt
index 272ebca..48f7686 100755
--- a/clr/hipamd/CMakeLists.txt
+++ b/clr/hipamd/CMakeLists.txt
@@ -402,8 +402,10 @@ if (NOT ${HIPCC_BIN_DIR} STREQUAL "")
install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.pl DESTINATION bin)
install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.pl DESTINATION bin)
install(PROGRAMS ${HIPCC_BIN_DIR}/hipvars.pm DESTINATION bin)
- install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.bat DESTINATION bin)
- install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.bat DESTINATION bin)
+ if(WIN32)
+ install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.bat DESTINATION bin)
+ install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.bat DESTINATION bin)
+ endif()
endif()
#############################
diff --git a/clr/hipamd/hip-config-amd.cmake b/clr/hipamd/hip-config-amd.cmake
index 229bb0f..d685172 100755
--- a/clr/hipamd/hip-config-amd.cmake
+++ b/clr/hipamd/hip-config-amd.cmake
@@ -153,7 +153,6 @@ else()
# Add support for __fp16 and _Float16, explicitly link with compiler-rt
if( "${CLANGRT_BUILTINS_FETCH_EXIT_CODE}" STREQUAL "0" )
# CLANG_RT Builtins found Successfully Set interface link libraries property
- set_property(TARGET hip::host APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${CLANGRT_BUILTINS}")
set_property(TARGET hip::device APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${CLANGRT_BUILTINS}")
else()
message(STATUS "clangrt builtins lib not found: ${CLANGRT_BUILTINS_FETCH_EXIT_CODE}")
diff --git a/hipcc/bin/hipcc.pl b/hipcc/bin/hipcc.pl
index 56dcda2..c2e0cc9 100755
--- a/hipcc/bin/hipcc.pl
+++ b/hipcc/bin/hipcc.pl
@@ -155,11 +155,14 @@ if ($HIP_PLATFORM eq "amd") {
if($isWindows) {
$execExtension = ".exe";
}
- $HIPCC="$HIP_CLANG_PATH/clang++" . $execExtension;
+ # llvm_path is set inside the hip recipe
+ $LLVM_PATH= $ENV{'LLVM_PATH'};
+ $HIPCC="${LLVM_PATH}/bin/clang++" . $execExtension;
# If $HIPCC clang++ is not compiled, use clang instead
if ( ! -e $HIPCC ) {
- $HIPCC="$HIP_CLANG_PATH/clang" . $execExtension;
+ $LLVM_PATH= $ENV{'LLVM_PATH'};
+ $HIPCC="${LLVM_PATH}/bin/clang" . $execExtension;
$HIPLDFLAGS = "--driver-mode=g++";
}
# to avoid using dk linker or MSVC linker
@@ -483,7 +486,8 @@ if($HIP_PLATFORM eq "amd"){
$targetsStr = $ENV{HCC_AMDGPU_TARGET};
} elsif (not $isWindows) {
# Else try using rocm_agent_enumerator
- $ROCM_AGENT_ENUM = "${ROCM_PATH}/bin/rocm_agent_enumerator";
+ $ROCMINFO_PATH = $ENV{'ROCMINFO_PATH'} // $ROCMINFO_PATH;
+ $ROCM_AGENT_ENUM = "${ROCMINFO_PATH}/bin/rocm_agent_enumerator";
$targetsStr = `${ROCM_AGENT_ENUM} -t GPU`;
$targetsStr =~ s/\n/,/g;
}
--
2.39.3