summaryrefslogtreecommitdiffstats
path: root/amd/packages/patches/hipcc-5.6.1.patch
diff options
context:
space:
mode:
Diffstat (limited to 'amd/packages/patches/hipcc-5.6.1.patch')
-rw-r--r--amd/packages/patches/hipcc-5.6.1.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/amd/packages/patches/hipcc-5.6.1.patch b/amd/packages/patches/hipcc-5.6.1.patch
new file mode 100644
index 0000000..595c301
--- /dev/null
+++ b/amd/packages/patches/hipcc-5.6.1.patch
@@ -0,0 +1,35 @@
+Make the hipcc compiler wrapper compatible with the modified hipvars perl module
+and the more modular pacakging approach compared to upstream ROCm
+diff --git a/bin/hipcc.pl b/bin/hipcc.pl
+index 56dcda2..e75ef67 100755
+--- a/bin/hipcc.pl
++++ b/bin/hipcc.pl
+@@ -128,8 +128,10 @@ $HIP_CLANG_PATH = $hipvars::HIP_CLANG_PATH;
+ $CUDA_PATH = $hipvars::CUDA_PATH;
+ $HIP_PATH = $hipvars::HIP_PATH;
+ $ROCM_PATH = $hipvars::ROCM_PATH;
++$ROCMINFO_PATH = $hipvars::ROCMINFO_PATH;
+ $HIP_VERSION = $hipvars::HIP_VERSION;
+-$HIP_ROCCLR_HOME = $hipvars::HIP_ROCCLR_HOME;
++$HIP_ROCCLR_HOME = $hipvars::HIP_ROCCLR_HOME;
++$DEVICE_LIB_PATH = $hipvars::DEVICE_LIB_PATH;
+
+ if ($HIP_PLATFORM eq "amd") {
+ $HIP_INCLUDE_PATH = "$HIP_ROCCLR_HOME/include";
+@@ -483,7 +485,7 @@ 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";
++ $ROCM_AGENT_ENUM = "${ROCMINFO_PATH}/bin/rocm_agent_enumerator";
+ $targetsStr = `${ROCM_AGENT_ENUM} -t GPU`;
+ $targetsStr =~ s/\n/,/g;
+ }
+@@ -613,6 +615,7 @@ if ($needLDFLAGS and not $compileOnly) {
+ $CMD .= " $HIPLDFLAGS";
+ }
+ $CMD .= " $toolArgs";
++$CMD .= " --hip-path=${HIP_PATH}";
+
+ if ($verbose & 0x1) {
+ print "hipcc-cmd: ", $CMD, "\n";