Ports fixes to 2022.3.1 LTS (#17951)

* Fix config mapping for runtime and frontend targets for RelWithDebugInfo config (#17312)

* Fix samples RelWithDebugInfo config binding

* Fix1:

* Add default config map for openvino::runtime

* Fix2

* Fix3

* Fix4

* Added cmake_policy call to allow IN_LIST in if() (#17916)

* Ported https://github.com/openvinotoolkit/openvino/pull/17900

* Fixed compilation with clang

---------

Co-authored-by: Oleg Pipikin <oleg.pipikin@intel.com>
This commit is contained in:
Ilya Lavrenov 2023-06-09 00:55:09 +04:00 committed by GitHub
parent 83fadb96ad
commit b10cf93e7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 35 additions and 11 deletions

View File

@ -274,6 +274,14 @@ endfunction()
# OpenVINO config
#
cmake_policy(PUSH)
# we need CMP0057 to allow IN_LIST in if() command
if(POLICY CMP0057)
cmake_policy(SET CMP0057 NEW)
else()
message(FATAL_ERROR "OpenVINO requires CMake 3.3 or newer")
endif()
# need to store current PACKAGE_PREFIX_DIR, because it's overwritten by sub-package one
set(_ov_package_prefix_dir "${PACKAGE_PREFIX_DIR}")
@ -289,10 +297,30 @@ _ov_find_dependency(Threads)
unset(_OV_ENABLE_OPENVINO_BUILD_SHARED)
set(RUNTIME_AND_FRONTEND_TARGETS openvino::runtime openvino::runtime::c
openvino::frontend::onnx openvino::frontend::paddle
openvino::frontend::tensorflow)
if(NOT TARGET openvino)
set(_ov_as_external_package ON)
include("${CMAKE_CURRENT_LIST_DIR}/OpenVINOTargets.cmake")
foreach(target ${RUNTIME_AND_FRONTEND_TARGETS})
if(TARGET ${target})
get_target_property(ORIGINAL_NAME ${target} ALIASED_TARGET)
if (ORIGINAL_NAME MATCHES "ORIGINAL_NAME-NOTFOUND")
set (ORIGINAL_NAME ${target})
endif()
get_target_property(imported_configs ${target} IMPORTED_CONFIGURATIONS)
if(RELWITHDEBINFO IN_LIST imported_configs)
set (MAP_CONFIG RELWITHDEBINFO)
else()
set (MAP_CONFIG RELEASE)
endif()
set_property(TARGET ${ORIGINAL_NAME} PROPERTY MAP_IMPORTED_CONFIG_RELWITHDEBINFO ${MAP_CONFIG})
endif()
endforeach()
# WA for cmake version < 3.16 which does not export
# IMPORTED_LINK_DEPENDENT_LIBRARIES_** properties if no PUBLIC dependencies for the library
if((THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO") AND TBB_FOUND)
@ -332,8 +360,7 @@ endif()
# Apply common functions
#
foreach(target openvino::runtime openvino::runtime::c
openvino::frontend::onnx openvino::frontend::paddle openvino::frontend::tensorflow)
foreach(target ${RUNTIME_AND_FRONTEND_TARGETS})
if(TARGET ${target} AND _ov_as_external_package)
_ov_target_no_deprecation_error(${target})
endif()
@ -351,7 +378,10 @@ if(_need_package_name_reset)
unset(_need_package_name_reset)
endif()
unset(RUNTIME_AND_FRONTEND_TARGETS)
unset(${CMAKE_FIND_PACKAGE_NAME}_IR_FOUND)
unset(${CMAKE_FIND_PACKAGE_NAME}_Paddle_FOUND)
unset(${CMAKE_FIND_PACKAGE_NAME}_ONNX_FOUND)
unset(${CMAKE_FIND_PACKAGE_NAME}_TensorFlow_FOUND)
cmake_policy(POP)

View File

@ -6,7 +6,7 @@
@setlocal
SETLOCAL EnableDelayedExpansion
set "ROOT_DIR=%~dp0"
FOR /F "delims=\" %%i IN ("%ROOT_DIR%") DO set SAMPLES_TYPE=%%~nxi
FOR %%i IN ("%ROOT_DIR%\.") DO set SAMPLES_TYPE=%%~nxi
set "SAMPLE_BUILD_DIR=%USERPROFILE%\Documents\Intel\OpenVINO\openvino_%SAMPLES_TYPE%_samples_build"
set SAMPLE_INSTALL_DIR=
@ -49,7 +49,7 @@ if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
if exist "%SAMPLE_BUILD_DIR%\CMakeCache.txt" del "%SAMPLE_BUILD_DIR%\CMakeCache.txt"
cd /d "%ROOT_DIR%" && cmake -E make_directory "%SAMPLE_BUILD_DIR%" && cd /d "%SAMPLE_BUILD_DIR%" && cmake -G "Visual Studio 16 2019" -A %PLATFORM% "%ROOT_DIR%"
cd /d "%ROOT_DIR%" && cmake -E make_directory "%SAMPLE_BUILD_DIR%" && cd /d "%SAMPLE_BUILD_DIR%" && cmake -A %PLATFORM% "%ROOT_DIR%"
if ERRORLEVEL 1 GOTO errorHandling
echo.

View File

@ -57,7 +57,6 @@ public:
}
static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) {
const auto& primitive = impl_param.typed_desc<crop>();
auto params = get_default_params<kernel_selector::eltwise_params>(impl_param, 1);
auto optional_params = get_default_optional_params<kernel_selector::eltwise_optional_params>(impl_param.get_program());

View File

@ -27,7 +27,6 @@ struct gather_tree_impl : typed_primitive_impl_ocl<gather_tree> {
}
static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) {
const auto& primitive = impl_param.typed_desc<gather_tree>();
auto params = get_default_params<kernel_selector::gather_tree_params>(impl_param, 1);
auto optional_params = get_default_optional_params<kernel_selector::gather_tree_optional_params>(impl_param.get_program());

View File

@ -26,7 +26,6 @@ struct range_impl : typed_primitive_impl_ocl<range> {
}
static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) {
const auto& primitive = impl_param.typed_desc<range>();
auto params = get_default_params<kernel_selector::range_params>(impl_param);
for (int i : {1, 2})
params.inputs.push_back(convert_data_tensor(impl_param.get_input_layout(i)));

View File

@ -61,7 +61,6 @@ protected:
public:
static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) {
const auto& primitive = impl_param.typed_desc<roi_align>();
const auto& input_layout = impl_param.get_input_layout(0);
const auto& rois_layout = impl_param.get_input_layout(1);
const auto& batches_layout = impl_param.get_input_layout(2);

View File

@ -26,7 +26,6 @@ struct select_impl : typed_primitive_impl_ocl<select> {
}
static kernel_params_t get_kernel_params(const kernel_impl_params& impl_param) {
const auto& primitive = impl_param.typed_desc<select>();
auto params = get_default_params<kernel_selector::select_params>(impl_param);
auto optional_params = get_default_optional_params<kernel_selector::select_optional_params>(impl_param.get_program());

View File

@ -159,7 +159,7 @@ select_inst::typed_primitive_inst(network& network, select_node const& node) : p
}
}
} else {
CLDNN_ERROR_MESSAGE(node.id(), "Unsupported broadcast_type: " + static_cast<int>(node.get_primitive()->broadcast_spec.m_type));
CLDNN_ERROR_MESSAGE(node.id(), "Unsupported broadcast_type: " + std::to_string(static_cast<int>(node.get_primitive()->broadcast_spec.m_type)));
}
}
} // namespace cldnn

View File

@ -23,7 +23,6 @@ using namespace InferenceEngine;
namespace {
const char str_device_input_unsupported_blob[] = "Device input is of an unsupported blob type.";
const char str_device_output_unsupported_blob[] = "Device output is of an unsupported blob type.";
const char str_input_not_allocated[] = "Input data was not allocated.";
const char str_output_not_allocated[] = "Output data was not allocated.";