forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b1705e8
commit 76e3f96
Showing
6 changed files
with
237 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright (C) 2018-2023 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include "op/greater_or_equal.hpp" | ||
|
||
#include <memory> | ||
|
||
#include "default_opset.hpp" | ||
#include "utils/common.hpp" | ||
#define _USE_MATH_DEFINES | ||
#include <math.h> | ||
|
||
OPENVINO_SUPPRESS_DEPRECATED_START | ||
namespace ngraph { | ||
namespace onnx_import { | ||
namespace op { | ||
namespace set_1 { | ||
OutputVector greater_or_equal(const Node& node) { | ||
const auto A = node.get_ng_inputs().at(0); | ||
const auto B = node.get_ng_inputs().at(1); | ||
|
||
const auto C = std::make_shared<default_opset::GreaterEqual>(A, B); | ||
|
||
return {C}; | ||
} | ||
} // namespace set_1 | ||
|
||
namespace set_12 { | ||
OutputVector greater_or_equal(const Node& node) { | ||
const auto A = node.get_ng_inputs().at(0); | ||
const auto B = node.get_ng_inputs().at(1); | ||
|
||
const auto C = std::make_shared<default_opset::GreaterEqual>(A, B); | ||
|
||
return {C}; | ||
} | ||
} // namespace set_12 | ||
} // 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// 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 greater_or_equal(const Node& node); | ||
|
||
} // namespace set_1 | ||
|
||
namespace set_12 { | ||
OutputVector greater_or_equal(const Node& node); | ||
|
||
} // namespace set_12 | ||
} // 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
53 changes: 53 additions & 0 deletions
53
src/frontends/onnx/tests/models/greater_or_equal_float.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 | ||
producer_name: "nGraph ONNX Importer" | ||
graph { | ||
node { | ||
input: "A" | ||
input: "B" | ||
output: "C" | ||
op_type: "Greater_Or_Equal" | ||
} | ||
name: "test_greater_or_equal_float" | ||
input { | ||
name: "A" | ||
type { | ||
tensor_type { | ||
elem_type: 1 | ||
shape { | ||
dim { | ||
dim_value: 2 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
input { | ||
name: "B" | ||
type { | ||
tensor_type { | ||
elem_type: 1 | ||
shape { | ||
dim { | ||
dim_value: 2 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
output { | ||
name: "C" | ||
type { | ||
tensor_type { | ||
elem_type: 2 | ||
shape { | ||
dim { | ||
dim_value: 2 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
opset_import { | ||
version: 16 | ||
} |
53 changes: 53 additions & 0 deletions
53
src/frontends/onnx/tests/models/greater_or_equal_int.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 | ||
producer_name: "nGraph ONNX Importer" | ||
graph { | ||
node { | ||
input: "A" | ||
input: "B" | ||
output: "C" | ||
op_type: "Greater_Or_Equal" | ||
} | ||
name: "test_greater_or_equal_int" | ||
input { | ||
name: "A" | ||
type { | ||
tensor_type { | ||
elem_type: 7 | ||
shape { | ||
dim { | ||
dim_value: 2 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
input { | ||
name: "B" | ||
type { | ||
tensor_type { | ||
elem_type: 7 | ||
shape { | ||
dim { | ||
dim_value: 2 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
output { | ||
name: "C" | ||
type { | ||
tensor_type { | ||
elem_type: 2 | ||
shape { | ||
dim { | ||
dim_value: 2 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
opset_import { | ||
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