SWDEV-345870 - Correct HIP path for new directory layout and removed the usage of HSA_PATH in hipcc (#3065)
With file reorganization, HIP installed in /opt/rocm-ver Use the install path rather than using backward compatible path. HSA_PATH is not at all required in hipcc and removed the same Change-Id: Ia461cb4da2c0e0967703033f5c2c79b67732f5b5
Esse commit está contido em:
commit de
GitHub
pai
d3e7e5a23b
commit
388432384f
@@ -41,8 +41,6 @@ use Cwd 'abs_path';
|
||||
# Other environment variable controls:
|
||||
# HIP_PATH : Path to HIP directory, default is one dir level above location of this script.
|
||||
# CUDA_PATH : Path to CUDA SDK (default /usr/local/cuda). Used on NVIDIA platforms only.
|
||||
# HSA_PATH : Path to HSA dir (defaults to ../../hsa relative to abs_path
|
||||
# of this script). Used on AMD platforms only.
|
||||
# HIP_ROCCLR_HOME : Path to HIP/ROCclr directory. Used on AMD platforms only.
|
||||
# HIP_CLANG_PATH : Path to HIP-Clang (default to ../../llvm/bin relative to this
|
||||
# script's abs_path). Used on AMD platforms only.
|
||||
@@ -122,7 +120,6 @@ $CUDA_PATH = $hipvars::CUDA_PATH;
|
||||
$HIP_PATH = $hipvars::HIP_PATH;
|
||||
$ROCM_PATH = $hipvars::ROCM_PATH;
|
||||
$HIP_VERSION = $hipvars::HIP_VERSION;
|
||||
$HSA_PATH = $hipvars::HSA_PATH;
|
||||
$HIP_ROCCLR_HOME = $hipvars::HIP_ROCCLR_HOME;
|
||||
|
||||
if ($HIP_PLATFORM eq "amd") {
|
||||
@@ -210,13 +207,6 @@ if ($HIP_PLATFORM eq "amd") {
|
||||
## Allow __fp16 as function parameter and return type.
|
||||
$HIPCXXFLAGS .= " -Xclang -fallow-half-arguments-and-returns -D__HIP_HCC_COMPAT_MODE__=1";
|
||||
}
|
||||
|
||||
if (not $isWindows) {
|
||||
$HSA_PATH=$ENV{'HSA_PATH'} // "$ROCM_PATH/hsa";
|
||||
$HIPCXXFLAGS .= " -isystem $HSA_PATH/include";
|
||||
$HIPCFLAGS .= " -isystem $HSA_PATH/include";
|
||||
}
|
||||
|
||||
} elsif ($HIP_PLATFORM eq "nvidia") {
|
||||
$CUDA_PATH=$ENV{'CUDA_PATH'} // '/usr/local/cuda';
|
||||
$HIP_INCLUDE_PATH = "$HIP_PATH/include";
|
||||
|
||||
+3
-4
@@ -74,15 +74,14 @@ $isWindows = ($^O eq 'MSWin32' or $^O eq 'msys');
|
||||
# ROCM_PATH is defined relative to HIP_PATH else it is hardcoded to /opt/rocm.
|
||||
#
|
||||
$HIP_PATH=$ENV{'HIP_PATH'} // dirname(Cwd::abs_path("$0/../")); # use parent directory of hipcc
|
||||
if (-e "$HIP_PATH/../bin/rocm_agent_enumerator") {
|
||||
$ROCM_PATH=$ENV{'ROCM_PATH'} // dirname("$HIP_PATH"); # use parent directory of HIP_PATH ,FILE_REORG
|
||||
}elsif (-e "$HIP_PATH/bin/rocm_agent_enumerator") {
|
||||
if (-e "$HIP_PATH/bin/rocm_agent_enumerator") {
|
||||
$ROCM_PATH=$ENV{'ROCM_PATH'} // "$HIP_PATH"; # use HIP_PATH
|
||||
}elsif (-e "$HIP_PATH/../bin/rocm_agent_enumerator") { # case for backward compatibility
|
||||
$ROCM_PATH=$ENV{'ROCM_PATH'} // dirname("$HIP_PATH"); # use parent directory of HIP_PATH
|
||||
} else {
|
||||
$ROCM_PATH=$ENV{'ROCM_PATH'} // "/opt/rocm";
|
||||
}
|
||||
$CUDA_PATH=$ENV{'CUDA_PATH'} // '/usr/local/cuda';
|
||||
$HSA_PATH=$ENV{'HSA_PATH'} // "$ROCM_PATH/hsa";
|
||||
|
||||
# Windows has a different structure, all binaries are inside hip/bin
|
||||
if ($isWindows) {
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário