char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
890f1a27e
char/aliceai-t5-moe
1 2#include "../node_context.h" 3#include "../op_table.h" 4#include "../utils.h" 5 6#include <climits> 7#include <cstdint> 8#include <memory> 9#include <openvino/op/reshape.hpp> 10#include <openvino/op/slice.hpp> 11#include <vector> 12 13namespace ov { 14namespace frontend { 15namespace ggml { 16namespace op { 17 18OutputVector translate_cont (const NodeContext & context ) { 19num_inputs_check (context ,1 ,1 ); 20 21auto src_shape = context .get_input_shape (0 ).to_shape (); 22auto dst_shape = context .get_output_shape ().to_shape (); 23 24if (context .get_op_dynamic_dim ()!= -1 ) { 25dst_shape [3 - context .get_op_dynamic_dim ()]= -1 ; 26 } 27 28auto input = process_view_input_new (context ,0 ); 29 30 ov::Output < Node > res ; 31res = std::make_shared < ov::op::v1::Reshape > ( 32input , ov::op::v0::Constant ::create (ov::element::i64 , {dst_shape .size ()},dst_shape ), false); 33 34return rename_outputs_with_suffix ({res },context .get_name ()); 35} 36 37}// namespace op 38}// namespace ggml 39}// namespace frontend 40}// namespace ov