HIP:Break dependency to rocm-dev package

Check for rocm_agent_enumerator instead of rocminfo or
.info/version.

Change-Id: I1718bd4f70b3e527ea3afe19c1a685ab7ed70808


[ROCm/hip commit: 863082c528]
Этот коммит содержится в:
Freddy Paul
2020-09-23 17:14:04 -07:00
коммит произвёл Freddy Paul
родитель 81b6ad7d35
Коммит 4adc690374
2 изменённых файлов: 3 добавлений и 3 удалений
+2 -2
Просмотреть файл
@@ -73,11 +73,11 @@ $HIPCC_LINK_FLAGS_APPEND=$ENV{'HIPCC_LINK_FLAGS_APPEND'};
# derive HIP_PATH, as dirname $0 could be /opt/rocm/bin or /opt/rocm/hip/bin
# depending on how it gets invoked.
# ROCM_PATH which points to <rocm_install_dir> is determined based on whether
# we find bin/rocminfo in the parent of HIP_PATH or not. If it is found,
# we find bin/rocm_agent_enumerator in the parent of HIP_PATH or not. If it is found,
# 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/rocminfo") {
if (-e "$HIP_PATH/../bin/rocm_agent_enumerator") {
$ROCM_PATH=$ENV{'ROCM_PATH'} // dirname("$HIP_PATH"); # use parent directory of HIP_PATH
} else {
$ROCM_PATH=$ENV{'ROCM_PATH'} // "/opt/rocm";
+1 -1
Просмотреть файл
@@ -80,7 +80,7 @@ sub can_run {
# Define HIP_PATH based on location of the script. Same as hipcc.
# Derive ROCM_PATH same as hipcc does. Others are relative to ROCM_PATH.
$HIP_PATH=$ENV{'HIP_PATH'} // dirname(Cwd::abs_path("$0/../")); # use parent directory of hipcc
if (-e "$HIP_PATH/../.info/version") {
if (-e "$HIP_PATH/../bin/rocm_agent_enumerator") {
$ROCM_PATH=$ENV{'ROCM_PATH'} // dirname("$HIP_PATH"); # use parent directory of HIP_PATH
} else {
$ROCM_PATH=$ENV{'ROCM_PATH'} // "/opt/rocm";