Fixed compilation on CI (#15787)

This commit is contained in:
Ilya Lavrenov 2023-02-17 22:28:48 +04:00 committed by GitHub
parent 04f300e187
commit ed5fa69b41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 27 additions and 29 deletions

View File

@ -109,7 +109,7 @@ jobs:
- script: |
set -e
sudo -E $(REPO_DIR)/install_build_dependencies.sh
# 'clang' compiler is to check that samples can be built using it
# 'clang' is used as a default compiler
sudo apt --assume-yes install clang
sudo apt --assume-yes install --no-install-recommends libopencv-imgproc-dev libopencv-imgcodecs-dev
# For opencv-python: python3-setuptools and pip upgrade
@ -165,6 +165,8 @@ jobs:
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_LINKER_LAUNCHER=ccache
-DCMAKE_C_LINKER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_C_COMPILER=clang
-DCPACK_GENERATOR=DEB
-S $(REPO_DIR)
-B $(BUILD_DIR)
@ -285,12 +287,6 @@ jobs:
- script: $(SAMPLES_INSTALL_DIR)/cpp/build_samples.sh -i $(INSTALL_DIR)
displayName: 'Build cpp samples'
- script: $(SAMPLES_INSTALL_DIR)/cpp/build_samples.sh -i $(INSTALL_DIR)
env:
CC: clang
CXX: clang++
displayName: 'Build cpp samples - clang'
- script: $(SAMPLES_INSTALL_DIR)/c/build_samples.sh -i $(INSTALL_DIR)
displayName: 'Build c samples'

View File

@ -143,9 +143,6 @@ jobs:
-DBUILD_nvidia_plugin=OFF \
-S $(REPO_DIR) \
-B $(BUILD_DIR)
env:
CC: gcc
CXX: g++
displayName: 'CMake OpenVINO'
- script: ls -alR $(REPO_DIR)/temp/

View File

@ -412,11 +412,6 @@ else()
# Warn if an undefined identifier is evaluated in an #if directive. Such identifiers are replaced with zero.
ie_add_compiler_flags(-Wundef)
check_cxx_compiler_flag("-Wsuggest-override" SUGGEST_OVERRIDE_SUPPORTED)
if(SUGGEST_OVERRIDE_SUPPORTED)
set(CMAKE_CXX_FLAGS "-Wsuggest-override ${CMAKE_CXX_FLAGS}")
endif()
#
# Warnings as errors
#
@ -468,6 +463,13 @@ if(OV_COMPILER_IS_CLANG)
ie_add_compiler_flags(-Wno-delete-non-abstract-non-virtual-dtor)
endif()
check_cxx_compiler_flag("-Wsuggest-override" SUGGEST_OVERRIDE_SUPPORTED)
if(SUGGEST_OVERRIDE_SUPPORTED)
set(CMAKE_CXX_FLAGS "-Wsuggest-override ${CMAKE_CXX_FLAGS}")
endif()
check_cxx_compiler_flag("-Wunused-but-set-variable" UNUSED_BUT_SET_VARIABLE_SUPPORTED)
#
# link_system_libraries(target <PUBLIC | PRIVATE | INTERFACE> <lib1 [lib2 lib3 ...]>)
#

View File

@ -10,9 +10,9 @@ endif()
if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG)
ie_add_compiler_flags(-Wno-unused-variable)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0)
ie_add_compiler_flags(-Wno-unused-variable -Wno-unused-but-set-variable)
endif()
endif()
if(UNUSED_BUT_SET_VARIABLE_SUPPORTED)
ie_add_compiler_flags(-Wno-unused-but-set-variable)
endif()
file(GLOB SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp"

View File

@ -69,7 +69,13 @@ if(APPLE)
set(CMAKE_MACOSX_RPATH ON)
endif()
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm.*|ARM.*)" AND NOT (CMAKE_CROSSCOMPILING OR CMAKE_CXX_COMPILER_ID STREQUAL "MSVC"))
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm64.*|aarch64.*|AARCH64.*)")
set(AARCH64 ON)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm.*|ARM.*)")
set(ARM ON)
endif()
if(ARM AND NOT (CMAKE_CROSSCOMPILING OR CMAKE_CXX_COMPILER_ID STREQUAL "MSVC"))
add_compile_options(-march=armv7-a+fp)
endif()

View File

@ -21,7 +21,8 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# 'argument': conversion from 'size_t' to 'int', possible loss of data
ie_add_compiler_flags(/wd4267)
ie_add_compiler_flags(/wd4244)
elseif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0)
endif()
if(UNUSED_BUT_SET_VARIABLE_SUPPORTED)
ie_add_compiler_flags(-Wno-unused-but-set-variable)
endif()

View File

@ -33,9 +33,9 @@ elseif(SELECTIVE_BUILD STREQUAL "ON")
-Wno-unused-variable
-Wno-unused-parameter
-Wno-unused-local-typedefs)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0)
target_compile_options(${TARGET_NAME} INTERFACE -Wno-unused-but-set-variable)
endif()
if(UNUSED_BUT_SET_VARIABLE_SUPPORTED)
target_compile_options(${TARGET_NAME} INTERFACE -Wno-unused-but-set-variable)
endif()
set(GENERATED_HEADER ${CMAKE_CURRENT_BINARY_DIR}/conditional_compilation_gen.h CACHE FILEPATH "")

View File

@ -26,7 +26,6 @@ public:
: InternalOperation(decoder, OutputVector{}, 1),
m_component_types(component_types),
m_shapes(shapes),
m_capacity(capacity),
m_container(container),
m_shared_name(shared_name) {
validate_and_infer_types();
@ -47,7 +46,6 @@ public:
private:
std::vector<ov::element::Type> m_component_types;
std::vector<ov::PartialShape> m_shapes;
int64_t m_capacity;
std::string m_container;
std::string m_shared_name;
};

View File

@ -22,7 +22,6 @@ static constexpr const char* kGnaTarget3_0 = "GNA_TARGET_3_0";
static constexpr const char* kGnaTarget3_1 = "GNA_TARGET_3_1";
static constexpr const char* kGnaTarget3_5 = "GNA_TARGET_3_5";
static constexpr const char* kGnaTarget3_5_e = "GNA_TARGET_3_5_E";
static constexpr const char* kGnaDefaultTarget = kGnaTarget3_0;
static const std::unordered_map<HWGeneration, DeviceVersion> HWGenerationDeviceMap{
{HWGeneration::GNA_2_0, DeviceVersion::GNA2_0},

View File

@ -34,7 +34,7 @@ KernelsData RangeKernelRef::GetKernelsData(const Params &params, const optional_
auto jit_constants = MakeBaseParamsJitConstants(prim_params);
auto jit = CreateJit(kernelName, jit_constants, entry_point);
kernel_data.update_dispatch_data_func = [this](const Params& params, KernelData& kd) {
kernel_data.update_dispatch_data_func = [](const Params& params, KernelData& kd) {
const auto& prim_params = static_cast<const range_params&>(params);
auto dispatchData = SetDefault(prim_params);
OPENVINO_ASSERT(kd.kernels.size() == 1, "[GPU] Invalid kernels size for update dispatch data func");

View File

@ -20,7 +20,6 @@ extern size_t bbox_pred_data_size;
extern float proposal_ref[];
extern size_t proposal_ref_size;
const float epsilon = 0.00025f;
const float epsilon_fp16 = 0.125f;
// !!!!!!!!

View File

@ -254,7 +254,7 @@ if(ENABLE_GAPI_PREPROCESSING)
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 11)
target_compile_options(fluid PRIVATE "-Wno-maybe-uninitialized")
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0)
if(UNUSED_BUT_SET_VARIABLE_SUPPORTED)
target_compile_options(fluid PRIVATE "-Wno-unused-but-set-variable")
endif()