From d1ffde1c66b6cd5f3217a7b3e012f85bd9b7b163 Mon Sep 17 00:00:00 2001 From: Yaxun Sam Liu Date: Fri, 31 May 2019 23:58:59 -0400 Subject: [PATCH] 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: 71f6bf4e678b5124df762e89197e921a793fc6c3] --- projects/hip/bin/hipcc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/hip/bin/hipcc b/projects/hip/bin/hipcc index a438f0afe5..58c8fe45c9 100755 --- a/projects/hip/bin/hipcc +++ b/projects/hip/bin/hipcc @@ -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";