char-fork/llama.cpp

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

Titaniumtownsycl: fuse the gated-delta-net state writeback cpy (#26643)3d9388535

char/aliceai-t5-moe
839 B19 linesraw
1#pragma once
2
3#include <sycl/sycl.hpp>
4#include "dpct/helper.hpp"
5#include "common.hpp"
6#include "ggml.h"
7
8// fused-kernel recurrent-state output; strides in elements (per-seq stride is always D, set in-kernel)
9struct ggml_sycl_gated_delta_net_fused_cache {
10    float * data;        // rollback slot 0
11    int64_t slot_stride; // between rollback slots (0 when K==1)
12};
13
14void ggml_sycl_op_gated_delta_net(ggml_backend_sycl_context & ctx, ggml_tensor * dst);
15void ggml_sycl_gated_delta_net(ggml_backend_sycl_context & ctx, ggml_tensor * dst);
16
17// same op, but writes the snapshot(s) into the cache instead of dst (see ggml_sycl_try_gdn_cache_fusion)
18void ggml_sycl_op_gated_delta_net_fused_cache(ggml_backend_sycl_context & ctx, ggml_tensor * dst,
19                                              ggml_sycl_gated_delta_net_fused_cache cache);