Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ONNX FE] Fix Windows warnings #16141

Merged
merged 41 commits into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
0a1d89c
[ONNX FE] Remove ignoring win warnings
Mar 7, 2023
de61864
Merge branch 'master' into mbencer/FixWinWarnings
Mar 10, 2023
daf2201
fix win warnings
Mar 14, 2023
1e523ec
removed test code
Mar 14, 2023
f7c96f2
Merge branch 'mbencer/FixWinWarnings' of github.com:mbencer/openvino …
Mar 14, 2023
05bd49e
Merge remote-tracking branch 'upstream/master' into mbencer/FixWinWar…
Mar 14, 2023
226d29e
add additional static__cast
Mar 14, 2023
c6b3e1a
fix warning in tests
Mar 14, 2023
6b47a95
fix next warning in tests
Mar 14, 2023
2f0b6f3
fixed floats in reshape tests
Mar 14, 2023
9c561a0
Merge remote-tracking branch 'upstream/master' into mbencer/FixWinWar…
Mar 14, 2023
5ab34e0
fix float conversion for const folding tests
Mar 14, 2023
15a88c4
fixed float in controlflow
Mar 15, 2023
ba1ade4
fixed double->float cast for microsoft tests
Mar 15, 2023
7dfb440
fixed float cast for onnx import tests
Mar 15, 2023
ebecd53
Merge remote-tracking branch 'upstream/master' into mbencer/FixWinWar…
Mar 15, 2023
b94123d
fixed next float casting
Mar 15, 2023
3767224
fixed next float casts
Mar 16, 2023
faf8f29
fix float cast in iota
Mar 16, 2023
a763edb
Merge remote-tracking branch 'upstream/master' into mbencer/FixWinWar…
Mar 16, 2023
ea93097
fixed next float casts
Mar 16, 2023
99cde74
fix float cast
Mar 20, 2023
15a60c2
Merge remote-tracking branch 'upstream/master' into mbencer/FixWinWar…
Mar 20, 2023
7a562ae
styles
Mar 20, 2023
4704275
fixed test
Mar 20, 2023
a1b8b2d
float cast ...
Mar 20, 2023
c249cb9
Merge branch 'master' into mbencer/FixWinWarnings
Mar 20, 2023
74a0d04
Merge branch 'master' into mbencer/FixWinWarnings
Mar 20, 2023
0571980
fix float cast
Mar 20, 2023
9c025b4
fix float cast in iota
Mar 21, 2023
635cb08
float cast
Mar 21, 2023
e891da0
Merge branch 'master' into mbencer/FixWinWarnings
Mar 21, 2023
17639b2
Merge branch 'master' into mbencer/FixWinWarnings
Mar 21, 2023
6647d92
fix float cast
Mar 21, 2023
06f70e7
Merge remote-tracking branch 'upstream/master' into mbencer/FixWinWar…
Mar 21, 2023
cb2f176
fix size_t cast
Mar 22, 2023
795bc65
Merge remote-tracking branch 'upstream/master' into mbencer/FixWinWar…
Mar 22, 2023
8c041e9
float cast
Mar 22, 2023
09818a0
cast in run_with_tolerance_as_fp
Mar 22, 2023
03ed691
fix run_with_tolerance_as_fp cast
Mar 22, 2023
a5924c7
size_t -> int cast
Mar 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/frontends/onnx/frontend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
# SPDX-License-Identifier: Apache-2.0
#

if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
ie_add_compiler_flags(/wd4267)
ie_add_compiler_flags(/wd4018)
ie_add_compiler_flags(/wd4244)
endif()

ov_add_frontend(NAME onnx
LINKABLE_FRONTEND
PROTOBUF_LITE
Expand Down
9 changes: 5 additions & 4 deletions src/frontends/onnx/frontend/src/core/graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ std::shared_ptr<Function> Graph::create_function() {
const auto& onnx_outputs = m_model->get_graph().output();
for (std::size_t i{0}; i < function->get_output_size(); ++i) {
const auto& result_node = function->get_output_op(i);
const std::string onnx_output_name = onnx_outputs.Get(i).name();
const std::string onnx_output_name = onnx_outputs.Get(static_cast<int>(i)).name();
result_node->set_friendly_name(onnx_output_name + "/sink_port_0");
const auto& previous_operation = result_node->get_input_node_shared_ptr(0);
previous_operation->set_friendly_name(onnx_output_name);
Expand Down Expand Up @@ -386,7 +386,7 @@ OutputVector Graph::make_ng_nodes(const Node& onnx_node) {

const size_t outputs_size = std::accumulate(std::begin(ng_subgraph_outputs),
std::end(ng_subgraph_outputs),
0,
static_cast<size_t>(0),
[](const size_t lhs, const Output<ov::Node>& rhs) {
return lhs + rhs.get_node()->get_output_size();
});
Expand Down Expand Up @@ -420,10 +420,11 @@ void Graph::set_friendly_names(const Node& onnx_node, const OutputVector& ng_sub

const auto common_node = detail::common_node_for_all_outputs(ng_subgraph_outputs);

for (size_t i = 0; i < ng_subgraph_outputs.size(); ++i) {
const auto ng_subgraph_output_size = static_cast<int>(ng_subgraph_outputs.size());
for (int i = 0; i < ng_subgraph_output_size; ++i) {
// Trailing optional outputs may not be specified in the ONNX model.
// Other optional outputs should have name set to an empty string.
if (i >= onnx_node.get_outputs_size()) {
if (i >= static_cast<int>(onnx_node.get_outputs_size())) {
break;
}

Expand Down
5 changes: 3 additions & 2 deletions src/frontends/onnx/frontend/src/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,10 @@ void graph_topological_sort(GraphProto* graph) {
std::multimap<std::string, const NodeProto*> output_name_to_node;
GraphProto result;

for (int i = 0; i < graph->node().size(); ++i) {
const auto nodes_number = static_cast<int>(graph->node().size());
for (int i = 0; i < nodes_number; ++i) {
for (const auto& output_name : graph->node(i).output()) {
output_name_to_node.emplace(output_name, graph->mutable_node(static_cast<int>(i)));
output_name_to_node.emplace(output_name, graph->mutable_node(i));
}
}
auto get_node_by_out_name = [&output_name_to_node](const std::string& out_name) -> const NodeProto* {
Expand Down
6 changes: 3 additions & 3 deletions src/frontends/onnx/frontend/src/op/roi_align.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ OutputVector roi_align(const Node& node) {
return {std::make_shared<opset9::ROIAlign>(data,
rois,
num_rois,
pooled_h,
pooled_w,
sampling_ratio,
static_cast<int>(pooled_h),
static_cast<int>(pooled_w),
static_cast<int>(sampling_ratio),
spatial_scale,
pooling_mode,
aligned_mode)};
Expand Down
4 changes: 2 additions & 2 deletions src/frontends/onnx/frontend/src/place.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ ov::frontend::Place::Ptr PlaceOp::get_input_port(const std::string& input_name)

std::vector<ov::frontend::Place::Ptr> PlaceOp::get_consuming_ports() const {
std::vector<ov::frontend::Place::Ptr> consuming_ports;
const auto out_ports_number = m_editor->get_output_ports(m_node).size();
for (size_t out_idx = 0; out_idx < out_ports_number; ++out_idx) {
const auto out_ports_number = static_cast<int>(m_editor->get_output_ports(m_node).size());
for (int out_idx = 0; out_idx < out_ports_number; ++out_idx) {
auto consuming_ops_out = get_output_port(out_idx)->get_consuming_ports();
consuming_ports.insert(consuming_ports.end(), consuming_ops_out.begin(), consuming_ops_out.end());
}
Expand Down
7 changes: 0 additions & 7 deletions src/frontends/onnx/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE OFF)

ov_try_use_gold_linker()

if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
ie_add_compiler_flags(/wd4244)
ie_add_compiler_flags(/wd4267)
ie_add_compiler_flags(/wd4305)
ie_add_compiler_flags(/wd4756)
endif()

message(STATUS "ONNX frontend test enabled")

add_compile_definitions(
Expand Down
Loading