interplane.Get Omega
Read in your language

ggml

[Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685)

Brought by drakestapleton

branch master Branches Tags History

ggml / src / ggml-openvino / openvino / op / sum.cpp

30 lines · 813 bytes Raw Blame History
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/range.hpp>
8#include <openvino/op/reduce_sum.hpp>
9#include <openvino/op/reshape.hpp>
10#include <openvino/op/shape_of.hpp>
11
12namespace ov {
13namespace frontend {
14namespace ggml {
15namespace op {
16
17OutputVector translate_sum(const NodeContext & context) {
18 num_inputs_check(context, 1, 1);
19
20 auto input = process_view_input_new(context, 0);
21 auto axes = ov::op::v0::Constant::create(ov::element::i64, ov::Shape{4}, {0, 1, 2, 3});
22 auto res = std::make_shared<ov::op::v1::ReduceSum>(input, axes, true);
23
24 return rename_outputs_with_suffix({res}, context.get_name());
25}
26
27} // namespace op
28} // namespace ggml
29} // namespace frontend
30} // namespace ov