-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Torch Compile - New Op Support (#23310)
New op support for: - torch.export updates - benchmarking model support - chatglm2 support --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: ynimmaga <yamini.nimmagadda@intel.com> Co-authored-by: Maxim Vafin <maxim.vafin@intel.com> Co-authored-by: suryasidd <surya.siddharth.pemmaraju@intel.com>
- Loading branch information
1 parent
82021a3
commit 09a388f
Showing
57 changed files
with
759 additions
and
75 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,38 @@ | ||
// Copyright (C) 2018-2023 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include "openvino/frontend/pytorch/node_context.hpp" | ||
#include "openvino/op/constant.hpp" | ||
#include "openvino/op/not_equal.hpp" | ||
#include "openvino/op/range.hpp" | ||
#include "openvino/op/reduce_logical_or.hpp" | ||
#include "openvino/op/reshape.hpp" | ||
#include "utils.hpp" | ||
|
||
namespace ov { | ||
namespace frontend { | ||
namespace pytorch { | ||
namespace op { | ||
|
||
OutputVector translate_any_fx(const NodeContext& context) { | ||
num_inputs_check(context, 1, 3); | ||
auto x = context.get_input(0); | ||
|
||
Output<Node> dims; | ||
if (!context.input_is_none(1)) { | ||
dims = context.get_input(1); | ||
} else { | ||
dims = get_axes_range(context, 0); | ||
} | ||
bool keep_dims = false; | ||
if (!context.input_is_none(2)) | ||
keep_dims = context.const_input<bool>(2); | ||
auto any = context.mark_node(std::make_shared<ov::op::v1::ReduceLogicalOr>(x, dims, keep_dims)); | ||
return {any}; | ||
}; | ||
|
||
} // 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
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.