ggml
[Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685)
Brought by drakestapleton
ggml / src / ggml-openvino / openvino / op / gather_matmul.hpp
| 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 | |
| 18 | namespace ov::op::internal { |
| 19 | |
| 20 | class OPENVINO_API GatherMatmul : public ov::op::Op { |
| 21 | public: |
| 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 | |
| 37 | private: |
| 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 |