Removed warnings suppressions for extra modukes (#16479)

This commit is contained in:
Ilya Lavrenov 2023-09-15 06:53:32 +04:00 committed by GitHub
parent ba67db66ae
commit db395155b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 34 additions and 20 deletions

View File

@ -228,7 +228,7 @@ macro(ov_add_frontend)
# protobuf generated code emits -Wsuggest-override error # protobuf generated code emits -Wsuggest-override error
if(SUGGEST_OVERRIDE_SUPPORTED) if(SUGGEST_OVERRIDE_SUPPORTED)
target_compile_options(${TARGET_NAME} PRIVATE -Wno-suggest-override) target_compile_options(${TARGET_NAME} PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-Wno-suggest-override>)
endif() endif()
# install protobuf if it is not installed yet # install protobuf if it is not installed yet

View File

@ -132,12 +132,6 @@ endif()\n")
ov_dev_package_no_errors() ov_dev_package_no_errors()
ov_deprecated_no_errors() ov_deprecated_no_errors()
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# 'argument': conversion from 'size_t' to 'int', possible loss of data
ov_add_compiler_flags(/wd4267)
ov_add_compiler_flags(/wd4244)
endif()
# add each extra module # add each extra module
foreach(module_path IN LISTS extra_modules) foreach(module_path IN LISTS extra_modules)
if(module_path) if(module_path)

View File

@ -2,12 +2,12 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
if(SUGGEST_OVERRIDE_SUPPORTED)
ov_add_compiler_flags(-Wno-suggest-override)
endif()
set(TARGET_NAME ov_inference_functional_tests) set(TARGET_NAME ov_inference_functional_tests)
if(SUGGEST_OVERRIDE_SUPPORTED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-suggest-override")
endif()
set(DEPENDENCIES set(DEPENDENCIES
mock_engine mock_engine
template_extension template_extension

View File

@ -4,6 +4,10 @@
set(TARGET_NAME ov_inference_unit_tests) set(TARGET_NAME ov_inference_unit_tests)
if(SUGGEST_OVERRIDE_SUPPORTED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-suggest-override")
endif()
ov_add_test_target( ov_add_test_target(
NAME ${TARGET_NAME} NAME ${TARGET_NAME}
ROOT ${CMAKE_CURRENT_SOURCE_DIR} ROOT ${CMAKE_CURRENT_SOURCE_DIR}
@ -15,8 +19,3 @@ ov_add_test_target(
LABELS LABELS
OV OV
) )
check_cxx_compiler_flag(-Wno-suggest-override SUPPORT_WNO_SUGGEST_OVERRIDE)
if(SUPPORT_WNO_SUGGEST_OVERRIDE)
ov_add_compiler_flags(-Wno-suggest-override)
endif()

View File

@ -10,6 +10,7 @@ set(TARGET_NAME "openvino_intel_cpu_plugin")
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# C4267, 4244 issues from oneDNN headers conversion from 'XXX' to 'YYY', possible loss of data # C4267, 4244 issues from oneDNN headers conversion from 'XXX' to 'YYY', possible loss of data
ov_add_compiler_flags(/wd4018)
ov_add_compiler_flags(/wd4267) ov_add_compiler_flags(/wd4267)
ov_add_compiler_flags(/wd4244) ov_add_compiler_flags(/wd4244)
# mkldnn headers: '<<': result of 32-bit shift implicitly converted to 64 bits # mkldnn headers: '<<': result of 32-bit shift implicitly converted to 64 bits

View File

@ -22,7 +22,10 @@ layout broadcast_inst::calc_output_layout(broadcast_node const& node, kernel_imp
auto desc = impl_param.typed_desc<broadcast>(); auto desc = impl_param.typed_desc<broadcast>();
if (!desc->target_shape.empty()) { if (!desc->target_shape.empty()) {
std::vector<tensor::value_type> dims_converted(desc->target_shape.begin(), desc->target_shape.end()); std::vector<tensor::value_type> dims_converted(desc->target_shape.size());
std::transform(desc->target_shape.begin(), desc->target_shape.end(), dims_converted.begin(), [](size_t value) {
return static_cast<tensor::value_type>(value);
});
for (size_t i = dims_converted.size(); i < 4; i++) for (size_t i = dims_converted.size(); i < 4; i++)
dims_converted.push_back(1); // extend shape to 4d dims_converted.push_back(1); // extend shape to 4d

View File

@ -14,7 +14,13 @@ layout dft_inst::calc_output_layout(const dft_node& node, const kernel_impl_para
const auto primitive = impl_param.typed_desc<dft>(); const auto primitive = impl_param.typed_desc<dft>();
const auto input_layout = impl_param.get_input_layout(); const auto input_layout = impl_param.get_input_layout();
std::vector<tensor::value_type> dims_converted(primitive->output_shape.begin(), primitive->output_shape.end()); std::vector<tensor::value_type> dims_converted(primitive->output_shape.size());
std::transform(primitive->output_shape.begin(),
primitive->output_shape.end(),
dims_converted.begin(),
[](size_t value) {
return static_cast<int>(value);
});
// Extend shape to 4d by pushing ones at the end (needed to support less than 4d cases) // Extend shape to 4d by pushing ones at the end (needed to support less than 4d cases)
for (auto i = dims_converted.size(); i < 4; ++i) { for (auto i = dims_converted.size(); i < 4; ++i) {

View File

@ -32,8 +32,9 @@ protected:
int input_idx = DNNL_ARG_FROM; int input_idx = DNNL_ARG_FROM;
for (size_t i = 0; i < instance.inputs_memory_count(); i++) { for (size_t i = 0; i < instance.inputs_memory_count(); i++) {
auto& input = instance.input_memory(i); auto& input = instance.input_memory(i);
auto offset = onednn::get_offset(instance.get_input_layout(i), _pd.dnnl::primitive_desc_base::src_desc(i)); auto offset = onednn::get_offset(instance.get_input_layout(i),
args.insert({input_idx++, input.get_onednn_memory(_pd.dnnl::primitive_desc_base::src_desc(i), offset)}); _pd.dnnl::primitive_desc_base::src_desc(static_cast<int>(i)));
args.insert({input_idx++, input.get_onednn_memory(_pd.dnnl::primitive_desc_base::src_desc(static_cast<int>(i)), offset)});
} }
{ {

View File

@ -11,6 +11,12 @@ using namespace reference_tests;
using namespace ov; using namespace ov;
namespace { namespace {
#ifdef _MSC_VER
# pragma warning(push)
# pragma warning(disable : 4244)
#endif
struct ReorgYoloParams { struct ReorgYoloParams {
template <class IT> template <class IT>
ReorgYoloParams(const ov::Strides& stride, ReorgYoloParams(const ov::Strides& stride,
@ -38,6 +44,10 @@ struct ReorgYoloParams {
std::string testcaseName; std::string testcaseName;
}; };
#ifdef _MSC_VER
# pragma warning(pop)
#endif
class ReferenceReorgYoloLayerTest : public testing::TestWithParam<ReorgYoloParams>, public CommonReferenceTest { class ReferenceReorgYoloLayerTest : public testing::TestWithParam<ReorgYoloParams>, public CommonReferenceTest {
public: public:
void SetUp() override { void SetUp() override {