Skip to content

Commit

Permalink
Fix warnings for Paddle Frontend (openvinotoolkit#19476)
Browse files Browse the repository at this point in the history
* Fixed warnings for Paddle Frontend

* fix CI linux-gnu-9 build fail issue
  • Loading branch information
liubo-intel authored Aug 30, 2023
1 parent 9b10ef6 commit 6b57360
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ class DecoderBase {

/// \brief Get the type of the operation
virtual std::string get_op_type() const = 0;

/// \brief Destructor
virtual ~DecoderBase();
};
} // namespace paddle
} // namespace frontend
Expand Down
6 changes: 0 additions & 6 deletions src/frontends/paddle/src/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(/wd4305)
elseif(OV_COMPILER_IS_CLANG)
ie_add_compiler_flags(-Wno-delete-non-abstract-non-virtual-dtor)
endif()

ov_add_frontend(NAME paddle
LINKABLE_FRONTEND
PROTOBUF_LITE
Expand Down
9 changes: 9 additions & 0 deletions src/frontends/paddle/src/decoder.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright (C) 2018-2023 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//

#include "openvino/frontend/paddle/decoder.hpp"

using namespace ov::frontend::paddle;

DecoderBase::~DecoderBase() = default;
6 changes: 3 additions & 3 deletions src/frontends/paddle/src/op/generate_proposals_v2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ NamedOutputs generate_proposals_v2(const NodeContext& node) {

// attribute
ov::op::v9::GenerateProposals::Attributes attrs;
float min_size = node.get_attribute<float>("min_size", 0.1);
float min_size = node.get_attribute<float>("min_size", 0.1f);
attrs.min_size = min_size < 1.0f ? 1.0f : min_size;
attrs.nms_threshold = node.get_attribute<float>("nms_thresh", 0.5);
attrs.nms_threshold = node.get_attribute<float>("nms_thresh", 0.5f);
attrs.pre_nms_count = node.get_attribute<int>("pre_nms_topN", 6000);
attrs.post_nms_count = node.get_attribute<int>("post_nms_topN", 1000);
attrs.nms_eta = node.get_attribute<float>("eta", 1.0);
attrs.nms_eta = node.get_attribute<float>("eta", 1.0f);
PADDLE_OP_CHECK(node, (attrs.nms_eta == 1.0), "Only support case of eta == 1.0 currently");
attrs.normalized = !node.get_attribute<bool>("pixel_offset", true);

Expand Down
2 changes: 1 addition & 1 deletion src/frontends/paddle/src/op/group_norm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Output<ov::Node> reshape_channel_shaped_node_to_nchw(const Output<ov::Node>& nod
NamedOutputs group_norm(const NodeContext& node) {
auto data = node.get_input("X");
size_t num_groups = static_cast<size_t>(node.get_attribute<int32_t>("groups"));
auto epsilon = node.get_attribute<float>("epsilon", 1e-5);
auto epsilon = node.get_attribute<float>("epsilon", 1e-5f);
auto data_layout = node.get_attribute<std::string>("data_layout", "NCHW");

const auto& pshape = data.get_partial_shape();
Expand Down

0 comments on commit 6b57360

Please sign in to comment.