char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
aee56b3ab
char/aliceai-t5-moe
1#include "../node_context.h" 2#include "../op_table.h" 3#include "../utils.h" 4 5#include <openvino/op/constant.hpp> 6#include <openvino/op/cum_sum.hpp> 7 8namespace ov { 9namespace frontend { 10namespace ggml { 11namespace 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). 16OutputVector translate_cumsum (const NodeContext & context ) { 17num_inputs_check (context ,1 ,1 ); 18 19auto x = context .get_input (0 ); 20auto axis = ov::op::v0::Constant ::create (ov::element::i64 , {}, {3 }); 21auto res = std::make_shared < ov::op::v0::CumSum > (x ,axis ); 22 23return rename_outputs_with_suffix ({res },context .get_name ()); 24} 25 26}// namespace op 27}// namespace ggml 28}// namespace frontend 29}// namespace ov