char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
511f9c137
char/aliceai-t5-moe
1#include "../node_context.h" 2#include "../op_table.h" 3#include "../utils.h" 4 5#include <openvino/op/roll.hpp> 6#include <openvino/op/constant.hpp> 7 8namespace ov { 9namespace frontend { 10namespace ggml { 11namespace op { 12 13OutputVector translate_roll (const NodeContext & context ) { 14num_inputs_check (context ,1 ,1 ); 15const int32_t * params = context .get_output_op_params (); 16 17int64_t s0 = params [0 ]; 18int64_t s1 = params [1 ]; 19int64_t s2 = params [2 ]; 20int64_t s3 = params [3 ]; 21 22auto input = context .get_input (0 ); 23 24auto shift = ov::op::v0::Constant ::create ( 25 ov::element::i64 , ov::Shape {4 }, std::vector < int64_t > {s3 ,s2 ,s1 ,s0 }); 26auto axes = ov::op::v0::Constant ::create ( 27 ov::element::i64 , ov::Shape {4 }, std::vector < int64_t > {0 ,1 ,2 ,3 }); 28 29auto roll = std::make_shared < ov::op::v7::Roll > (input ,shift ,axes ); 30return rename_outputs_with_suffix ({roll },context .get_name ()); 31} 32 33}// namespace op 34}// namespace ggml 35}// namespace frontend 36}// namespace ov