char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
890f1a27e
char/aliceai-t5-moe
1#include "../node_context.h" 2#include "../op_table.h" 3#include "../utils.h" 4 5#include <cstring> 6#include <openvino/op/clamp.hpp> 7 8namespace ov { 9namespace frontend { 10namespace ggml { 11namespace op { 12 13OutputVector translate_clamp (const NodeContext & context ) { 14num_inputs_check (context ,1 ,1 ); 15 16auto input = process_view_input_new (context ,0 ); 17 18const int32_t * op_params = context .get_output_op_params (); 19FRONT_END_CHECK_IMPLEMENTED (op_params != nullptr ,"CLAMP requires output op params" ); 20 21float min ; 22float max ; 23 std::memcpy (& min ,reinterpret_cast < const float *> (op_params )+ 0 ,sizeof (float )); 24 std::memcpy (& max ,reinterpret_cast < const float *> (op_params )+ 1 ,sizeof (float )); 25 26auto res = std::make_shared < ov::op::v0::Clamp > (input ,min ,max ); 27return rename_outputs_with_suffix ({res },context .get_name ()); 28} 29 30}// namespace op 31}// namespace ggml 32}// namespace frontend 33}// namespace ov