diff options
author | Shouzheng Liu <lshzh.hi@gmail.com> | 2023-08-16 16:08:28 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-16 23:08:28 +0300 |
commit | fc8ef549e50087762a0b4f901cd74b2defcc6ae3 (patch) | |
tree | d15489f213ea892ecb03ca646dcca989584bcfdc /ggml-alloc.h | |
parent | bf83bff6742c0f1795b4c18695a13a34ac7adf62 (diff) |
metal : enable ggml-alloc (#2627)
* metal: enable ggml-alloc
Make ggml-alloc work with concurrently dispatch.
* style-fix
Co-authored-by: slaren <slarengh@gmail.com>
---------
Co-authored-by: slaren <slarengh@gmail.com>
Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
Diffstat (limited to 'ggml-alloc.h')
-rw-r--r-- | ggml-alloc.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ggml-alloc.h b/ggml-alloc.h index a5ec8f87..14a4350a 100644 --- a/ggml-alloc.h +++ b/ggml-alloc.h @@ -10,6 +10,10 @@ extern "C" { GGML_API struct ggml_allocr * ggml_allocr_new(void * data, size_t size, size_t alignment); GGML_API struct ggml_allocr * ggml_allocr_new_measure(size_t alignment); +// tell the allocator to parse nodes following the order described in the list +// you should call this if your graph are optimized to execute out-of-order +GGML_API void ggml_allocr_set_parse_seq(struct ggml_allocr * alloc, int * list, int n); + GGML_API void ggml_allocr_free(struct ggml_allocr * alloc); GGML_API bool ggml_allocr_is_measure(struct ggml_allocr * alloc); GGML_API void ggml_allocr_reset(struct ggml_allocr * alloc); |