Fix warnings for Paddle Frontend (#19476)
* Fixed warnings for Paddle Frontend * fix CI linux-gnu-9 build fail issue
This commit is contained in:
parent
9b10ef6f6f
commit
6b57360c55
@ -55,6 +55,9 @@ public:
|
|||||||
|
|
||||||
/// \brief Get the type of the operation
|
/// \brief Get the type of the operation
|
||||||
virtual std::string get_op_type() const = 0;
|
virtual std::string get_op_type() const = 0;
|
||||||
|
|
||||||
|
/// \brief Destructor
|
||||||
|
virtual ~DecoderBase();
|
||||||
};
|
};
|
||||||
} // namespace paddle
|
} // namespace paddle
|
||||||
} // namespace frontend
|
} // namespace frontend
|
||||||
|
@ -2,12 +2,6 @@
|
|||||||
# SPDX-License-Identifier: Apache-2.0
|
# 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
|
ov_add_frontend(NAME paddle
|
||||||
LINKABLE_FRONTEND
|
LINKABLE_FRONTEND
|
||||||
PROTOBUF_LITE
|
PROTOBUF_LITE
|
||||||
|
9
src/frontends/paddle/src/decoder.cpp
Normal file
9
src/frontends/paddle/src/decoder.cpp
Normal file
@ -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;
|
@ -23,12 +23,12 @@ NamedOutputs generate_proposals_v2(const NodeContext& node) {
|
|||||||
|
|
||||||
// attribute
|
// attribute
|
||||||
ov::op::v9::GenerateProposals::Attributes attrs;
|
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.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.pre_nms_count = node.get_attribute<int>("pre_nms_topN", 6000);
|
||||||
attrs.post_nms_count = node.get_attribute<int>("post_nms_topN", 1000);
|
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");
|
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);
|
attrs.normalized = !node.get_attribute<bool>("pixel_offset", true);
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ Output<ov::Node> reshape_channel_shaped_node_to_nchw(const Output<ov::Node>& nod
|
|||||||
NamedOutputs group_norm(const NodeContext& node) {
|
NamedOutputs group_norm(const NodeContext& node) {
|
||||||
auto data = node.get_input("X");
|
auto data = node.get_input("X");
|
||||||
size_t num_groups = static_cast<size_t>(node.get_attribute<int32_t>("groups"));
|
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");
|
auto data_layout = node.get_attribute<std::string>("data_layout", "NCHW");
|
||||||
|
|
||||||
const auto& pshape = data.get_partial_shape();
|
const auto& pshape = data.get_partial_shape();
|
||||||
|
Loading…
Reference in New Issue
Block a user