forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ONNX] Extend ONNX Frontend with BitwiseOr-18 operator (openvinotoolk…
…it#21755) * Create bitwise_or.hpp * Update ops_bridge.cpp * Added protobuf(.prototxt) files via upload. * Update onnx_import.in.cpp * Update test_backend.py * Skip "test_bitwise_or_ui64_bcast_3v1d_cpu"
- Loading branch information
Showing
8 changed files
with
182 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (C) 2018-2023 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include "op/bitwise_or.hpp" | ||
OPENVINO_SUPPRESS_DEPRECATED_START | ||
|
||
#include "default_opset.hpp" | ||
|
||
using namespace ov::op; | ||
|
||
namespace ngraph { | ||
namespace onnx_import { | ||
namespace op { | ||
namespace set_1 { | ||
OutputVector bitwise_or(const Node& node) { | ||
const auto inputs = node.get_ng_inputs(); | ||
OPENVINO_ASSERT(inputs.size() == 2); | ||
return {std::make_shared<v13::BitwiseOr>(inputs[0], inputs[1])}; | ||
} | ||
} // namespace set_1 | ||
} // namespace op | ||
} // namespace onnx_import | ||
} // namespace ngraph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (C) 2018-2023 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#pragma once | ||
|
||
#include "openvino/core/deprecated.hpp" | ||
OPENVINO_SUPPRESS_DEPRECATED_START | ||
|
||
#include "ngraph/node.hpp" | ||
#include "onnx_import/core/node.hpp" | ||
|
||
namespace ngraph { | ||
namespace onnx_import { | ||
namespace op { | ||
namespace set_1 { | ||
OutputVector bitwise_or(const Node& node); | ||
|
||
} // namespace set_1 | ||
} // namespace op | ||
|
||
} // namespace onnx_import | ||
|
||
} // namespace ngraph | ||
OPENVINO_SUPPRESS_DEPRECATED_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
ir_version: 7 | ||
graph { | ||
node { | ||
input: "a" | ||
input: "b" | ||
output: "output" | ||
op_type: "BitwiseOr" | ||
} | ||
name: "BitwiseOrGraph" | ||
input { | ||
name: "a" | ||
type { | ||
tensor_type { | ||
elem_type: 6 | ||
shape { | ||
dim { | ||
dim_value: 5 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
input { | ||
name: "b" | ||
type { | ||
tensor_type { | ||
elem_type:6 | ||
shape { | ||
dim { | ||
dim_value: 5 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
output { | ||
name: "output" | ||
type { | ||
tensor_type { | ||
elem_type: 6 | ||
shape { | ||
dim { | ||
dim_value: 5 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
opset_import { | ||
domain: "" | ||
version: 16 | ||
} |
53 changes: 53 additions & 0 deletions
53
src/frontends/onnx/tests/models/bitwise_or_broadcast_condition.prototxt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
ir_version: 7 | ||
graph { | ||
node { | ||
input: "a" | ||
input: "b" | ||
output: "output" | ||
op_type: "BitwiseOr" | ||
} | ||
name: "BitwiseOrGraph" | ||
input { | ||
name: "a" | ||
type { | ||
tensor_type { | ||
elem_type: 6 | ||
shape { | ||
dim { | ||
dim_value: 5 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
input { | ||
name: "b" | ||
type { | ||
tensor_type { | ||
elem_type: 6 | ||
shape { | ||
dim { | ||
dim_value: 1 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
output { | ||
name: "output" | ||
type { | ||
tensor_type { | ||
elem_type: 6 | ||
shape { | ||
dim { | ||
dim_value: 5 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
opset_import { | ||
domain: "" | ||
version: 16 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters