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.
Merge branch 'master' into an/acl_scheduler_fix
- Loading branch information
Showing
21 changed files
with
184 additions
and
154 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
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,43 @@ | ||
// Copyright (C) 2018-2023 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include "common_op_table.hpp" | ||
#include "openvino/op/constant.hpp" | ||
#include "openvino/op/convert_like.hpp" | ||
#include "openvino/op/equal.hpp" | ||
#include "openvino/op/log.hpp" | ||
#include "openvino/op/multiply.hpp" | ||
#include "openvino/op/select.hpp" | ||
|
||
using namespace std; | ||
using namespace ov::opset10; | ||
|
||
namespace ov { | ||
namespace frontend { | ||
namespace tensorflow { | ||
namespace op { | ||
OutputVector translate_xlogy_op(const NodeContext& node) { | ||
default_op_checks(node, 2, {"Xlogy"}); | ||
auto x = node.get_input(0); | ||
auto y = node.get_input(1); | ||
|
||
// prepare auxiliary zero constant of the same type as the input | ||
auto zero = create_same_type_const_scalar<int32_t>(x, 0); | ||
|
||
// compute a mask to identify where x is equal to 0 | ||
auto is_zero = make_shared<Equal>(x, zero); | ||
|
||
// compute x * log(y) elementwise | ||
auto xlog_y = make_shared<Multiply>(x, make_shared<Log>(y)); | ||
|
||
// create the output tensor using Select to handle the x == 0 condition | ||
auto result = make_shared<Select>(is_zero, zero, xlog_y); | ||
|
||
set_node_name(node.get_name(), result); | ||
return result->outputs(); | ||
} | ||
} // namespace op | ||
} // namespace tensorflow | ||
} // namespace frontend | ||
} // namespace ov |
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
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
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
Oops, something went wrong.