Fix default HIP_VDI_HOME

There is soft link /opt/rocm/bin/.hipVersion, therefore when hipcc is executed
as /opt/rocm/bin/hipcc, it will set HIP_VDI_HOME to /opt/rocm, which is
incorrect. Check ../lib/bitcode instead to identify HIP_VDI_HOME.


[ROCm/hip commit: 71f6bf4e67]
This commit is contained in:
Yaxun Sam Liu
2019-05-31 23:58:59 -04:00
parent 5de90e8fb5
commit d1ffde1c66
+1 -1
View File
@@ -108,7 +108,7 @@ $HIP_RUNTIME= $hipConfig{'HIP_RUNTIME'};
# If using VDI runtime, need to find HIP_VDI_HOME
if ($HIP_RUNTIME eq "VDI" and !defined $HIP_VDI_HOME) {
my $hipcc_dir = dirname($0);
if (-e "$hipcc_dir/.hipVersion") {
if (-e "$hipcc_dir/../lib/bitcode") {
$HIP_VDI_HOME = abs_path($hipcc_dir . "/..");
} else {
$HIP_VDI_HOME = "/opt/rocm/hip";