From 08db1e991e4b3d10d365908be57676ec20260aab Mon Sep 17 00:00:00 2001 From: YuChuXi Date: Thu, 4 Apr 2024 20:05:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E9=99=A4=E8=B0=83=E8=AF=95=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rwkv_graph.inc | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/rwkv_graph.inc b/rwkv_graph.inc index b6a53df..1528958 100644 --- a/rwkv_graph.inc +++ b/rwkv_graph.inc @@ -1,5 +1,3 @@ -#include "ggml.h" -#include // View tensors of a state of a single layer. struct rwkv_layer_state { struct ggml_tensor * ffn_xx; @@ -305,26 +303,6 @@ static struct ggml_tensor * rwkv_att_v5( return ggml_mul_mat(ctx, layer.att_output, x); } -static inline bool ggml_can_mul_mat(const struct ggml_tensor * t0, const struct ggml_tensor * t1) { - static_assert(GGML_MAX_DIMS == 4, "GGML_MAX_DIMS is not 4 - update this function"); - - return (t0->ne[0] == t1->ne[0]) && - (t1->ne[2]%t0->ne[2] == 0) && // verify t0 is broadcastable - (t1->ne[3]%t0->ne[3] == 0); -} - - -static inline void print_shape(const char * echo,const struct ggml_tensor * t){ - printf(echo); - printf(" (%ld, %ld, %ld, %ld)\n", t->ne[0], t->ne[1], t->ne[2], t->ne[3]); -} - -static inline void pppp(const char * echo){ - printf(echo); - printf("\n"); -} - - static struct ggml_tensor * rwkv_att_v6( struct ggml_context * ctx, struct ggml_tensor * x,