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.
Add eltwise types resolving. Support big int constants. (openvinotool…
…kit#15415) * Add eltwise types resolving. Support big int constants. * Update src/bindings/python/src/openvino/frontend/pytorch/decoder.py * Small fix * Fix some cases * Add tests for add in different types * Add tests for mul * Add tests for sub and div * Small fixes * Return list handling (needed for empty lists) * Add test for empty list * Update src/frontends/pytorch/src/op/mul.cpp Co-authored-by: Roman Kazantsev <[email protected]> * Use refs instead of ptrs * Apply suggestions from code review Co-authored-by: Roman Kazantsev <[email protected]> * Apply code review suggestions * Fix code style * Add more eltwise ops --------- Co-authored-by: Roman Kazantsev <[email protected]>
- Loading branch information
Showing
15 changed files
with
1,009 additions
and
132 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
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 | ||
// | ||
|
||
#include "openvino/frontend/pytorch/node_context.hpp" | ||
#include "openvino/op/power.hpp" | ||
#include "utils.hpp" | ||
|
||
namespace ov { | ||
namespace frontend { | ||
namespace pytorch { | ||
namespace op { | ||
|
||
OutputVector translate_pow(NodeContext& context) { | ||
num_inputs_check(context, 1, 2); | ||
auto lhs = context.get_input(0); | ||
auto rhs = context.get_input(1); | ||
align_eltwise_input_types(context, lhs, rhs, true); | ||
return {context.mark_node(std::make_shared<ov::op::v1::Power>(lhs, rhs))}; | ||
} | ||
|
||
} // namespace op | ||
} // namespace pytorch | ||
} // 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
Oops, something went wrong.