char-fork/llama.cpp

git clone https://git.t4t.associates/char-fork/llama.cpp

Zijun Yuopenvino: OV 2026.2, context-shift, Q5_1 support, gemma4 dense/embedding, and -fa off (#24503)890f1a27e

char/aliceai-t5-moe
931 B33 linesraw
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) {
14    num_inputs_check(context, 1, 1);
15
16    auto input = process_view_input_new(context, 0);
17
18    const int32_t * op_params = context.get_output_op_params();
19    FRONT_END_CHECK_IMPLEMENTED(op_params != nullptr, "CLAMP requires output op params");
20
21    float min;
22    float 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
26    auto res = std::make_shared<ov::op::v0::Clamp>(input, min, max);
27    return rename_outputs_with_suffix({res}, context.get_name());
28}
29
30}  // namespace op
31}  // namespace ggml
32}  // namespace frontend
33}  // namespace ov