aboutsummaryrefslogtreecommitdiff
path: root/ggml.h
diff options
context:
space:
mode:
authorslaren <slarengh@gmail.com>2023-07-30 15:58:01 +0200
committerGitHub <noreply@github.com>2023-07-30 15:58:01 +0200
commita113689571420fb4d6540f1a324d12965781356a (patch)
tree7ae5da392644f6c72e49aa88137a77875239dfe8 /ggml.h
parent11f3ca06b8c66b0427aab0a472479da22553b472 (diff)
ggml : add graph tensor allocator (#2411)
* ggml : add graph tensor allocator * ggml : don't calculate data pointer of unallocated tensors when creating a view with an offset * ggml : refactor ggml_view_Nd into ggml_view_tensor_offset
Diffstat (limited to 'ggml.h')
-rw-r--r--ggml.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/ggml.h b/ggml.h
index 9919cce..aba9248 100644
--- a/ggml.h
+++ b/ggml.h
@@ -1170,7 +1170,18 @@ extern "C" {
int mode,
int n_ctx);
- // custom RoPE, in-place, returns view(a)
+ // custom RoPE
+ GGML_API struct ggml_tensor * ggml_rope_custom(
+ struct ggml_context * ctx,
+ struct ggml_tensor * a,
+ int n_past,
+ int n_dims,
+ int mode,
+ int n_ctx,
+ float freq_base,
+ float freq_scale);
+
+ // in-place, returns view(a)
GGML_API struct ggml_tensor * ggml_rope_custom_inplace(
struct ggml_context * ctx,
struct ggml_tensor * a,