char-fork/llama.cpp

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

Zijun YuOpenVINO: Qwen3.5, memory optimization, and test-recurrent-state-rollback (#26952)aee56b3ab

char/aliceai-t5-moe
1.4 KiB43 linesraw
1// Copyright (C) 2018-2026 Intel Corporation
2// SPDX-License-Identifier: Apache-2.0
3//
4// Local mirror of OpenVINO's internal ov::op::internal::GatherMatmul op.
5//
6// The op class body (validate_and_infer_types / clone_with_new_inputs) is
7// provided by the linked libopenvino.so; only the declaration is needed here so
8// the backend can construct the node directly (same approach as GatedDeltaNet).
9// The class layout must stay in sync with
10//   openvino/src/common/transformations/include/ov_ops/gather_matmul.hpp
11//
12// \note GatherMatmul op class is under development and subject to change.
13
14#pragma once
15
16#include "openvino/op/op.hpp"
17
18namespace ov::op::internal {
19
20class OPENVINO_API GatherMatmul : public ov::op::Op {
21public:
22    OPENVINO_OP("GatherMatmul")
23
24    GatherMatmul() = default;
25
26    GatherMatmul(const ov::Output<Node>& A,
27                 const ov::Output<Node>& B,
28                 const ov::Output<Node>& indices,
29                 const ov::Output<Node>& bias);
30
31    GatherMatmul(const ov::Output<Node>& A, const ov::Output<Node>& B, const ov::Output<Node>& indices);
32
33    std::shared_ptr<Node> clone_with_new_inputs(const ov::OutputVector& new_args) const override;
34
35    void validate_and_infer_types() override;
36
37private:
38    // the weights matrix B is expected to have the transposed form [group, N, K]
39    static constexpr bool transp_a = false;
40    static constexpr bool transp_b = true;
41};
42
43}  // namespace ov::op::internal