From 154765df88d4027e76b0cdcbf2166b4130c5737d 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. --- hipamd/bin/hipcc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hipamd/bin/hipcc b/hipamd/bin/hipcc index a438f0afe5..58c8fe45c9 100755 --- a/hipamd/bin/hipcc +++ b/hipamd/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";