Removed dependencies scripts (#7569)

This commit is contained in:
Ilya Lavrenov 2021-09-22 12:17:41 +03:00 committed by GitHub
parent f5e7c9646d
commit 538d492a70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 0 additions and 240 deletions

View File

@ -83,7 +83,6 @@ if(THREADING STREQUAL "OMP")
message(FATAL_ERROR "Intel OMP is not available on current platform")
endif()
update_deps_cache(OMP "${OMP}" "Path to OMP root folder")
log_rpath_from_dir(OMP "${OMP}/lib")
debug_message(STATUS "intel_omp=" ${OMP})
ie_cpack_add_component(omp REQUIRED)
@ -146,12 +145,6 @@ if(THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO")
update_deps_cache(TBB_DIR "${TBB}/cmake" "Path to TBB cmake folder")
update_deps_cache(TBBBIND_2_4_DIR "${TBBBIND_2_4}/cmake" "Path to TBBBIND_2_4 cmake folder")
if(WIN32)
log_rpath_from_dir(TBB "${TBB}/bin")
else ()
log_rpath_from_dir(TBB "${TBB}/lib")
endif()
debug_message(STATUS "tbb=" ${TBB})
endif()
@ -242,14 +235,6 @@ if(ENABLE_OPENCV)
endif()
update_deps_cache(OpenCV_DIR "${ocv_cmake_path}" "Path to OpenCV package folder")
if(WIN32)
log_rpath_from_dir(OPENCV "${OpenCV_DIR}/../bin")
elseif(ANDROID)
log_rpath_from_dir(OPENCV "${OpenCV_DIR}/../../../lib")
else()
log_rpath_from_dir(OPENCV "${OpenCV_DIR}/../lib")
endif()
debug_message(STATUS "opencv=" ${OPENCV})
else()
reset_deps_cache(OpenCV_DIR)

View File

@ -15,59 +15,3 @@ function(clean_message type)
message (FATAL_ERROR)
endif()
endfunction()
file(REMOVE ${CMAKE_BINARY_DIR}/ld_library_rpath_64.txt)
# log relative path to shared library that has to be used in LD_LIBRARY_PATH
function (log_rpath_remove_top component component_remove_top lib lib_remove_top)
set(top_lib_dir ${${component}})
set(lib_dir ${lib})
# debug_message(STATUS "LIB-IN=${lib} ")
# debug_message(STATUS "TOPLIB-IN=${top_lib_dir} ")
get_filename_component(top_lib_dir "${${component}}" DIRECTORY)
if (${component_remove_top} AND ${component})
else()
get_filename_component(add_name "${${component}}" NAME)
set(top_lib_dir "${top_lib_dir}/${add_name}")
endif()
if (${lib_remove_top} AND lib)
get_filename_component(lib_dir ${lib} DIRECTORY)
endif()
string (REPLACE "//" "/" top_lib_dir "${top_lib_dir}")
string (REPLACE "//" "/" lib_dir "${lib_dir}")
string (REPLACE "\\\\" "/" top_lib_dir "${top_lib_dir}")
string (REPLACE "\\\\" "/" lib_dir "${lib_dir}")
# debug_message(STATUS "LIB-OUT=${lib_dir}")
# debug_message(STATUS "TOPLIB-OUT=${top_lib_dir}")
if (WIN32)
string (TOLOWER "${top_lib_dir}" top_lib_dir)
string (TOLOWER "${lib_dir}" lib_dir)
endif()
string (REPLACE "${top_lib_dir}" "" component_dir "${lib_dir}")
set(RPATH_INFO "${component}=${component_dir}")
debug_message(STATUS "LD_LIBRARY_RPATH: ${RPATH_INFO}")
file(APPEND ${CMAKE_BINARY_DIR}/ld_library_rpath_64.txt "${RPATH_INFO}\n")
endfunction()
function (log_rpath_from_dir component lib_dir)
log_rpath_remove_top("${component}" TRUE "${lib_dir}" FALSE)
endfunction()
function (log_rpath component lib_path)
log_rpath_remove_top(${component} TRUE ${lib_path} TRUE)
endfunction()
# Just wrapping of the original message() function to make this macro known during IE build.
# This macro is redefined (with additional checks) within the InferenceEngineConfig.cmake file.
macro(ext_message TRACE_LEVEL)
message(${TRACE_LEVEL} "${ARGN}")
endmacro()

View File

@ -110,8 +110,6 @@ if(ANDROID)
set(LIBUSB_INCLUDE_DIR "${LIBUSB}/include")
set(LIBUSB_LIBRARY "${LIBUSB}/libs/${ANDROID_ABI}/libusb1.0.so")
log_rpath_from_dir(LIBUSB "${LIBUSB}/libs/${ANDROID_ABI}")
endif()
#

View File

@ -1,96 +0,0 @@
@echo off
:: Copyright (C) 2018-2021 Intel Corporation
:: SPDX-License-Identifier: Apache-2.0
setlocal enabledelayedexpansion
for /f "delims=" %%x in (dependencies_64.txt) do (set "%%x")
for %%A in ("%MKL%") do set MKL_FILENAME=%%~nxA
for %%A in ("%OMP%") do set OMP_FILENAME=%%~nxA
for %%A in ("%MYRIAD%") do set MYRIAD_FILENAME=%%~nxA
for %%A in ("%GNA%") do set GNA_FILENAME=%%~nxA
for %%A in ("%OPENCV%") do set OPENCV_FILENAME=%%~nxA
for %%A in ("%HDDL%") do set HDDL_FILENAME=%%~nxA
for %%A in ("%VPU_FIRMWARE_MA2X8X%") do set VPU_FIRMWARE_MA2X8X_FILENAME=%%~nxA
for %%A in ("%TBB%") do set TBB_FILENAME=%%~nxA
call :DownloadFile MKL %MKL%
call :DownloadFile OMP %OMP%
call :DownloadFile MYRIAD %MYRIAD%
call :DownloadFile GNA %GNA%
call :DownloadFile OPENCV %OPENCV%
call :DownloadFile HDDL %HDDL%
call :DownloadFile VPU_FIRMWARE_MA2X8X %VPU_FIRMWARE_MA2X8X%
call :DownloadFile TBB %TBB%
for /f "delims=" %%x in (ld_library_rpath_64.txt) do (set "%%x")
set PATH=%DL_SDK_TEMP%\test_dependencies\MYRIAD\%MYRIAD_FILENAME%%MYRIAD%;%PATH%
set PATH=%DL_SDK_TEMP%\test_dependencies\MKL\%MKL_FILENAME%%MKL%;%PATH%
set PATH=%DL_SDK_TEMP%\test_dependencies\OMP\%OMP_FILENAME%%OMP%;%PATH%
set PATH=%DL_SDK_TEMP%\test_dependencies\GNA\%GNA_FILENAME%%GNA%;%PATH%
set PATH=%DL_SDK_TEMP%\test_dependencies\OPENCV\%OPENCV_FILENAME%%OPENCV%;%PATH%
set PATH=%DL_SDK_TEMP%\test_dependencies\TBB\%TBB_FILENAME%%TBB%;%PATH%
set PATH=%DL_SDK_TEMP%\test_dependencies\MYRIAD\%MYRIAD_FILENAME%%MYRIAD%;%PATH%
if not "%MYRIAD%"=="" (
if exist "%DL_SDK_TEMP%\test_dependencies\MYRIAD\%MYRIAD_FILENAME%%MYRIAD%\mvnc" (
echo xcopy.exe "%DL_SDK_TEMP%\test_dependencies\MYRIAD\%MYRIAD_FILENAME%%MYRIAD%" intel64 /S /I /Y /R
xcopy.exe "%DL_SDK_TEMP%\test_dependencies\MYRIAD\%MYRIAD_FILENAME%%MYRIAD%" intel64 /S /I /Y /R
)
if exist "%DL_SDK_TEMP%\test_dependencies\MYRIAD\%MYRIAD_FILENAME%%MYRIAD%\..\bin\mvnc" (
echo xcopy.exe "%DL_SDK_TEMP%\test_dependencies\MYRIAD\%MYRIAD_FILENAME%%MYRIAD%\..\bin\*" intel64 /S /I /Y /R
xcopy.exe "%DL_SDK_TEMP%\test_dependencies\MYRIAD\%MYRIAD_FILENAME%%MYRIAD%\..\bin\*" intel64 /S /I /Y /R
)
)
if not "%VPU_FIRMWARE_MA2X8X%"=="" (
if exist "%DL_SDK_TEMP%\test_dependencies\VPU\%VPU_FIRMWARE_MA2X8X_FILENAME%" (
echo xcopy.exe "%DL_SDK_TEMP%\test_dependencies\VPU\%VPU_FIRMWARE_MA2X8X_FILENAME%\*" intel64 /S /I /Y /R
xcopy.exe "%DL_SDK_TEMP%\test_dependencies\VPU\%VPU_FIRMWARE_MA2X8X_FILENAME%\*" intel64 /S /I /Y /R
)
)
set PATH=%DL_SDK_TEMP%\test_dependencies\HDDL\%HDDL_FILENAME%%HDDL%\..\bin;%PATH%
if not "%HDDL%"=="" (
set HDDL_INSTALL_DIR=%DL_SDK_TEMP%\test_dependencies\HDDL\%HDDL_FILENAME%%HDDL%\..
if exist "%DL_SDK_TEMP%\test_dependencies\VPU\%VPU_FIRMWARE_MA2X8X_FILENAME%" (
echo xcopy.exe "%DL_SDK_TEMP%\test_dependencies\VPU\%VPU_FIRMWARE_MA2X8X_FILENAME%\*" %HDDL_INSTALL_DIR%\lib /S /I /Y /R
xcopy.exe "%DL_SDK_TEMP%\test_dependencies\VPU\%VPU_FIRMWARE_MA2X8X_FILENAME%\*" "%HDDL_INSTALL_DIR%\lib" /S /I /Y /R
)
)
echo PATH=%PATH%
endlocal & set PATH=%PATH%
exit /B %ERRORLEVEL%
:DownloadFile
set DEPENDENCY=%~1
set DEPENDENCY_URL=%~2
set DEPENDENCY_FILE=%~nx2
set DEPENDENCY_EXT=%~x2
if not "%DEPENDENCY_URL%"=="" (
if not exist "%DL_SDK_TEMP%\test_dependencies\%DEPENDENCY%\%DEPENDENCY_FILE%" (
mkdir "%DL_SDK_TEMP%\test_dependencies\%DEPENDENCY%\%DEPENDENCY_FILE%"
for /L %%a in (1,1,10) do (
powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iwr -outf '%DL_SDK_TEMP%\test_dependencies\%DEPENDENCY%\_%DEPENDENCY_FILE%' %DEPENDENCY_URL%"
call "C:\Program Files\7-Zip\7z.exe" x -y %DL_SDK_TEMP%\test_dependencies\%DEPENDENCY%\_%DEPENDENCY_FILE% -o%DL_SDK_TEMP%\test_dependencies\%DEPENDENCY%\%DEPENDENCY_FILE%
if !ERRORLEVEL! equ 0 goto :DownloadFileContinue
timeout /T 15
)
)
)
goto:eof
:DownloadFileContinue
if "%DEPENDENCY_EXT%" == ".txz" call "C:\Program Files\7-Zip\7z.exe" x -y %DL_SDK_TEMP%\test_dependencies\%DEPENDENCY%\%DEPENDENCY_FILE%\_%DEPENDENCY_FILE:txz=tar% -o%DL_SDK_TEMP%\test_dependencies\%DEPENDENCY%\%DEPENDENCY_FILE%
del "%DL_SDK_TEMP%\test_dependencies\%DEPENDENCY%\_%DEPENDENCY_FILE%" /F /Q
goto:eof

View File

@ -1,68 +0,0 @@
#!/bin/bash
# Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
if [ "$1" = "" ]; then
dep_arch=64
else
dep_arch=$1
fi
item_path=""
add_path() {
component=$1
item_path=""
echo "Read file: dependencies_${dep_arch}.txt"
grep_component="\b${component}\b"
if [[ $(grep -m 1 "$grep_component" "dependencies_${dep_arch}.txt") ]];then
archive_path=$(grep -m 1 "$grep_component" "dependencies_${dep_arch}.txt" | sed -E "s/${component}=//g")
library_rpath=$(grep -m 1 "$grep_component" "ld_library_rpath_${dep_arch}.txt" | sed -E "s/${component}=//g")
filename=$(basename "$archive_path")
if [[ (! -d "$DL_SDK_TEMP/test_dependencies/$component/$filename") ||
(-d "$DL_SDK_TEMP/test_dependencies/$component/$filename" &&
! $(ls -A "$DL_SDK_TEMP/test_dependencies/$component/$filename")) ]]; then
mkdir -p "$DL_SDK_TEMP/test_dependencies/$component/$filename"
wget -q "$archive_path" -O "$DL_SDK_TEMP/test_dependencies/$filename"
if [[ $filename == *.zip ]]; then
unzip "$DL_SDK_TEMP/test_dependencies/$filename" -d "$DL_SDK_TEMP/test_dependencies/$component/$filename"
elif [[ $filename == *.7z ]]; then
7za x -y "$DL_SDK_TEMP/test_dependencies/$filename" -o "$DL_SDK_TEMP/test_dependencies/$component/$filename"
else
tar xf "$DL_SDK_TEMP/test_dependencies/$filename" -C "$DL_SDK_TEMP/test_dependencies/$component/$filename"
fi
rm "$DL_SDK_TEMP/test_dependencies/$filename"
fi
item_path=$component/$filename/$library_rpath
fi
}
runtimes=(MKL CLDNN MYRIAD GNA DLIA OPENCV VPU_FIRMWARE_USB-MA2X8X HDDL OMP TBB AOCL_RTE LIBUSB)
export_library_path() {
export LD_LIBRARY_PATH=$DL_SDK_TEMP/test_dependencies/$1:$LD_LIBRARY_PATH
}
export_env_variable() {
export "$2"="$DL_SDK_TEMP/test_dependencies/$1"
}
ma2480_path=""
for i in "${runtimes[@]}"
do
add_path "$i"
export_library_path "$item_path"
if [ "$i" == "VPU_FIRMWARE_USB-MA2X8X" ]
then
ma2480_path="$item_path"
fi
if [ "$i" == "HDDL" ]
then
cp -r "$DL_SDK_TEMP/test_dependencies/$ma2480_path/"* "$DL_SDK_TEMP/test_dependencies/$item_path"
export HDDL_INSTALL_DIR="$DL_SDK_TEMP/test_dependencies/$item_path/.."
fi
done
echo DATA_PATH="$DATA_PATH"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:lib:/usr/local/lib

View File

@ -38,9 +38,6 @@ ie_add_plugin(NAME ${TARGET_NAME}
# Enable support of CC for the plugin
ie_mark_target_as_cc(${TARGET_NAME})
# saving rpath to GNA shared library be used by CI
log_rpath_from_dir(GNA ${libGNA_LIBRARIES_BASE_PATH})
target_link_libraries(${TARGET_NAME} PRIVATE inference_engine inference_engine_legacy inference_engine_transformations
Threads::Threads libGNA)
target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})