ggml
[Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685)
Brought by drakestapleton
ggml / src / ggml-openvino / openvino / op / mean.cpp
| 1 | #include "../node_context.h" |
| 2 | #include "../op_table.h" |
| 3 | #include "../utils.h" |
| 4 | |
| 5 | #include <memory> |
| 6 | #include <openvino/op/constant.hpp> |
| 7 | #include <openvino/op/reduce_mean.hpp> |
| 8 | |
| 9 | namespace ov { |
| 10 | namespace frontend { |
| 11 | namespace ggml { |
| 12 | namespace op { |
| 13 | |
| 14 | OutputVector translate_mean(const NodeContext & context) { |
| 15 | num_inputs_check(context, 1, 1); |
| 16 | |
| 17 | auto input = process_view_input_new(context, 0); |
| 18 | auto axis = ov::op::v0::Constant::create(ov::element::i64, ov::Shape{1}, {-1}); |
| 19 | auto res = std::make_shared<ov::op::v1::ReduceMean>(input, axis, true); |
| 20 | |
| 21 | return rename_outputs_with_suffix({res}, context.get_name()); |
| 22 | } |
| 23 | |
| 24 | } // namespace op |
| 25 | } // namespace ggml |
| 26 | } // namespace frontend |
| 27 | } // namespace ov |