summaryrefslogtreecommitdiffstats
path: root/amd/packages/patches/hipcc-5.6.1.patch
blob: 595c301062b085ec546180895d51696d437d9d5d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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";