Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/ggml/blob/master/src/ggml-openvino/openvino/op/cumsum.cpp # ggml [Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685) Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `ggml / src / ggml-openvino / openvino / op / cumsum.cpp` 29 lines · 869 bytes Raw Blame History 1 #include "../node_context.h" 2 #include "../op_table.h" 3 #include "../utils.h" 4 5 #include 6 #include 7 8 namespace ov { 9 namespace frontend { 10 namespace ggml { 11 namespace op { 12 13 // GGML cumsum computes prefix sum along dim 0 (the innermost/fastest dimension). 14 // In OV layout the dims are reversed: ggml [ne0, ne1, ne2, ne3] → OV [ne3, ne2, ne1, ne0], 15 // so ggml dim 0 maps to OV axis 3 (last axis). 16 OutputVector translate_cumsum(const NodeContext & context) { 17 num_inputs_check(context, 1, 1); 18 19 auto x = context.get_input(0); 20 auto axis = ov::op::v0::Constant::create(ov::element::i64, {}, {3}); 21 auto res = std::make_shared(x, axis); 22 23 return rename_outputs_with_suffix({res}, context.get_name()); 24 } 25 26 } // namespace op 27 } // namespace ggml 28 } // namespace frontend 29 } // namespace ov