Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/ggml/blob/master/src/ggml-openvino/openvino/op/roll.cpp # ggml [Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685) Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `ggml / src / ggml-openvino / openvino / op / roll.cpp` 36 lines ยท 1001 bytes Raw Blame History 1 #include "../node_context.h" 2 #include "../op_table.h" 3 #include "../utils.h" 4 5 #include 6 #include 7 8 namespace ov { 9 namespace frontend { 10 namespace ggml { 11 namespace op { 12 13 OutputVector 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{s3, s2, s1, s0}); 26 auto axes = ov::op::v0::Constant::create( 27 ov::element::i64, ov::Shape{4}, std::vector{0, 1, 2, 3}); 28 29 auto roll = std::make_shared(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