Added fix for using HCC_VERSION

1. The variable is brought outside the conditional so that its scope is increased

Change-Id: I2d2689553e67930050fe5b3648739f0f72c3bbc8


[ROCm/hip commit: 3be747c41e]
This commit is contained in:
Aditya Atluri
2016-08-11 16:13:44 -05:00
والد fd564cc04c
کامیت 25fa1336e6
+3 -1
مشاهده پرونده
@@ -72,10 +72,12 @@ if ($HIP_PLATFORM eq "hcc") {
if($hipConfig{'VALID'} == 0){
$HCC_HOME=$ENV{'HCC_HOME'};
$HCC_HOME="/opt/rocm/hcc" unless defined $HCC_HOME;
$HCC_VERSION=`${HCC_HOME}/bin/hcc --version | cut -d" " -f9 | tr -d "\n"`;
}else{
$HCC_HOME=$hipConfig{'HCC_HOME'};
}
$HCC_VERSION=`${HCC_HOME}/bin/hcc --version | cut -d" " -f9 | tr -d "\n"`;
$ROCM_PATH=$ENV{'ROCM_PATH'};
$ROCM_PATH="/opt/rocm" unless defined $ROCM_PATH;