char-fork/llama.cpp

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

Zijun YuOpenVINO: Update OV to 2026.3.1, whisper.cpp support, Qwen3.5 on NPU, and new ops (#27843)511f9c137

char/aliceai-t5-moe
1001 B36 linesraw
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) {
14    num_inputs_check(context, 1, 1);
15    const int32_t * params = context.get_output_op_params();
16
17    int64_t s0 = params[0];
18    int64_t s1 = params[1];
19    int64_t s2 = params[2];
20    int64_t s3 = params[3];
21
22    auto input = context.get_input(0);
23
24    auto shift = ov::op::v0::Constant::create(
25        ov::element::i64, ov::Shape{4}, std::vector<int64_t>{s3, s2, s1, s0});
26    auto axes  = ov::op::v0::Constant::create(
27        ov::element::i64, ov::Shape{4}, std::vector<int64_t>{0, 1, 2, 3});
28
29    auto roll = std::make_shared<ov::op::v7::Roll>(input, shift, axes);
30    return rename_outputs_with_suffix({roll}, context.get_name());
31}
32
33}  // namespace op
34}  // namespace ggml
35}  // namespace frontend
36}  // namespace ov