Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
SWDEV-411709 - hipvars fix path/filename for .hipVersion
Browse files Browse the repository at this point in the history
SWDEV-413355 - cherry-pick

Linux file is named as 'version' in share/hip location
Windows file is named as '.hipVersion' in bin location
HIP Major/Minor values in hipcc needs to be revisisted since hipcc is
moved to a seperate project.

Change-Id: I10d0d00155581991c6bc685cee0add29f74c9b88
  • Loading branch information
agunashe authored and David Salinas committed Jul 25, 2023
1 parent 60e738a commit 3555aa1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bin/hipvars.pm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use Cwd;
use File::Basename;

$HIP_BASE_VERSION_MAJOR = "5";
$HIP_BASE_VERSION_MINOR = "5";
$HIP_BASE_VERSION_MINOR = "7";
$HIP_BASE_VERSION_PATCH = "0";

#---
Expand Down Expand Up @@ -150,7 +150,11 @@ if ($HIP_COMPILER eq "clang") {
#---
# Read .hipVersion
my %hipVersion = ();
parse_config_file("$hipvars::HIP_PATH/bin/.hipVersion", \%hipVersion);
if ($isWindows) {
parse_config_file("$hipvars::HIP_PATH/bin/.hipVersion", \%hipVersion);
} else {
parse_config_file("$hipvars::HIP_PATH/share/hip/version", \%hipVersion);
}
$HIP_VERSION_MAJOR = $hipVersion{'HIP_VERSION_MAJOR'} // $HIP_BASE_VERSION_MAJOR;
$HIP_VERSION_MINOR = $hipVersion{'HIP_VERSION_MINOR'} // $HIP_BASE_VERSION_MINOR;
$HIP_VERSION_PATCH = $hipVersion{'HIP_VERSION_PATCH'} // $HIP_BASE_VERSION_PATCH;
Expand Down

0 comments on commit 3555aa1

Please sign in to comment.