ggml
[Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685)
Brought by drakestapleton
ggml / src / ggml-sycl / dmmv.hpp
| 1 | // |
| 2 | // MIT license |
| 3 | // Copyright (C) 2024 Intel Corporation |
| 4 | // SPDX-License-Identifier: MIT |
| 5 | // |
| 6 | |
| 7 | // |
| 8 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 9 | // See https://llvm.org/LICENSE.txt for license information. |
| 10 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 11 | // |
| 12 | |
| 13 | #ifndef GGML_SYCL_DMMV_HPP |
| 14 | #define GGML_SYCL_DMMV_HPP |
| 15 | |
| 16 | #include "common.hpp" |
| 17 | |
| 18 | |
| 19 | void ggml_sycl_op_dequantize_mul_mat_vec( |
| 20 | ggml_backend_sycl_context & ctx, |
| 21 | const ggml_tensor *src0, const ggml_tensor *src1, ggml_tensor *dst, |
| 22 | const char *src0_dd_i, const float *src1_ddf_i, const char *src1_ddq_i, |
| 23 | float *dst_dd_i, const int64_t row_low, const int64_t row_high, |
| 24 | const int64_t src1_ncols, const int64_t src1_padded_row_size, |
| 25 | const dpct::queue_ptr &stream); |
| 26 | |
| 27 | // Fused dense-FFN mat-vec: writes glu(gate . y, up . y) for same-type reordered |
| 28 | // weights (Q2_K..Q6_K, Q8_0) and a single F32 activation column, using the ESIMD DMMV kernels. |
| 29 | // vx is the up weight, vgate the gate weight. Only defined when GGML_SYCL_DMMV_HAS_ESIMD; |
| 30 | // returns false if the type is unhandled. |
| 31 | bool ggml_sycl_dequantize_mul_mat_vec_glu_reorder_esimd( |
| 32 | enum ggml_type src0_type, enum ggml_glu_op glu_op, |
| 33 | const void * vx, const void * vgate, const float * y, |
| 34 | float * dst, int ncols, int nrows, dpct::queue_ptr stream); |
| 35 | |
| 36 | #endif // GGML_SYCL_DMMV_HPP |