aboutsummaryrefslogtreecommitdiff
path: root/ggml.h
diff options
context:
space:
mode:
authorslaren <slarengh@gmail.com>2023-07-23 14:36:02 +0200
committerGitHub <noreply@github.com>2023-07-23 14:36:02 +0200
commit95a6c595e7ca8dbe47ccf8824e04213e10357f9a (patch)
treead7033d08dfa22a77dee88a4f5f3f872e6d93f7c /ggml.h
parente76d630df17e235e6b9ef416c45996765d2e36fb (diff)
ggml: move op parameters from tensors to ggml_tensor::op_params (#2333)
* ggml: move op parameters from tensors to ggml_tensor::op_params * alibi: use memcpy for float params * remove `src[1] = NULL` in ops
Diffstat (limited to 'ggml.h')
-rw-r--r--ggml.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/ggml.h b/ggml.h
index 5023b16..871c85a 100644
--- a/ggml.h
+++ b/ggml.h
@@ -199,6 +199,7 @@
#define GGML_MAX_CONTEXTS 64
#define GGML_MAX_SRC 6
#define GGML_MAX_NAME 48
+#define GGML_MAX_OP_PARAMS 32
#define GGML_DEFAULT_N_THREADS 4
@@ -418,6 +419,9 @@ extern "C" {
// compute data
enum ggml_op op;
+ // op params - allocated as int32_t for alignment
+ int32_t op_params[GGML_MAX_OP_PARAMS / sizeof(uint32_t)];
+
bool is_param;
struct ggml_tensor * grad;