Fixed Warnings in reference implementations (#16559)
* Fixed Warnings in reference implementations * Removed suppression from shape_inference
This commit is contained in:
parent
167bf7e16a
commit
5dff012233
@ -4,10 +4,6 @@
|
||||
|
||||
set(TARGET_NAME "ngraph_reference")
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
ie_add_compiler_flags(/wd4267)
|
||||
endif()
|
||||
|
||||
file(GLOB_RECURSE LIBRARY_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
|
||||
file(GLOB_RECURSE PUBLIC_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/include/*.hpp)
|
||||
|
||||
|
@ -124,16 +124,16 @@ std::unordered_map<std::string, ov::TensorLabel> compute_label_dim_map(const Ran
|
||||
if (label == ellipsis) {
|
||||
ov::TensorLabel label_dims;
|
||||
for (size_t ind = 0; ind < num_broadcasted_dims; ++ind) {
|
||||
label_dims.push_back(current_dim + ind);
|
||||
label_dims.push_back(static_cast<ov::label_t>(current_dim + ind));
|
||||
}
|
||||
resulted_map[label] = label_dims;
|
||||
current_dim += num_broadcasted_dims;
|
||||
} else if (resulted_map.find(label) != resulted_map.end()) {
|
||||
resulted_map[label].push_back(current_dim);
|
||||
resulted_map[label].push_back(static_cast<ov::label_t>(current_dim));
|
||||
++current_dim;
|
||||
} else {
|
||||
ov::TensorLabel label_dims;
|
||||
label_dims.push_back(current_dim);
|
||||
label_dims.push_back(static_cast<ov::label_t>(current_dim));
|
||||
resulted_map[label] = label_dims;
|
||||
++current_dim;
|
||||
}
|
||||
|
@ -325,11 +325,11 @@ void generate_proposals(const std::vector<float>& im_info,
|
||||
std::vector<float>& output_scores,
|
||||
std::vector<int64_t>& num_rois) {
|
||||
const auto im_info_size =
|
||||
std::accumulate(im_info_shape.begin() + 1, im_info_shape.end(), 1, std::multiplies<size_t>());
|
||||
std::accumulate(im_info_shape.begin() + 1, im_info_shape.end(), size_t(1), std::multiplies<size_t>());
|
||||
const auto deltas_size =
|
||||
std::accumulate(deltas_shape.begin() + 1, deltas_shape.end(), 1, std::multiplies<size_t>());
|
||||
std::accumulate(deltas_shape.begin() + 1, deltas_shape.end(), size_t(1), std::multiplies<size_t>());
|
||||
const auto scores_size =
|
||||
std::accumulate(scores_shape.begin() + 1, scores_shape.end(), 1, std::multiplies<size_t>());
|
||||
std::accumulate(scores_shape.begin() + 1, scores_shape.end(), size_t(1), std::multiplies<size_t>());
|
||||
for (size_t i = 0; i < im_info_shape[0]; i++) {
|
||||
std::vector<float> cur_im_info(im_info.begin() + i * im_info_size,
|
||||
im_info.begin() + i * im_info_size + im_info_size);
|
||||
|
@ -4,10 +4,6 @@
|
||||
|
||||
set(TARGET_NAME "ov_shape_inference")
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
ie_add_compiler_flags(/wd4018)
|
||||
endif()
|
||||
|
||||
file(GLOB_RECURSE LIBRARY_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
|
||||
file(GLOB_RECURSE PUBLIC_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/include/*.hpp)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user