llama : factor out ggml-alloc from graph graph build functions

ggml-ci
This commit is contained in:
Georgi Gerganov 2023-10-28 19:54:28 +03:00
parent ff3bad83e2
commit 8b2420d249
No known key found for this signature in database
GPG key ID: 449E073F9DC10735
2 changed files with 215 additions and 342 deletions

2
ggml.h
View file

@ -709,7 +709,7 @@ extern "C" {
// Context tensor enumeration and lookup
GGML_API struct ggml_tensor * ggml_get_first_tensor(struct ggml_context * ctx);
GGML_API struct ggml_tensor * ggml_get_next_tensor (struct ggml_context * ctx, struct ggml_tensor * tensor);
GGML_API struct ggml_tensor * ggml_get_tensor(struct ggml_context * ctx, const char * name);
GGML_API struct ggml_tensor * ggml_get_tensor (struct ggml_context * ctx, const char * name);
GGML_API struct ggml_tensor * ggml_set_zero(struct ggml_tensor * tensor);
GGML_API struct ggml_tensor * ggml_set_i32 (struct ggml_tensor * tensor, int32_t value);