Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/ggml/blob/master/src/ggml-cpu/spacemit/spine_mem_pool.h # ggml [Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685) Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `ggml / src / ggml-cpu / spacemit / spine_mem_pool.h` 32 lines ยท 920 bytes Raw Blame History 1 #pragma once 2 3 #include 4 #include 5 6 namespace ggml::cpu::riscv64_spacemit { 7 8 enum class spine_mem_pool_backend : uint8_t { 9 none, 10 posix_memalign, 11 transparent_hugepage, 12 hugetlb_1g, 13 }; 14 15 struct spine_mem_pool_tcm_info { 16 bool available{ false }; 17 size_t blk_size{ 0 }; 18 size_t blk_num{ 0 }; 19 bool is_fake_tcm{ false }; 20 }; 21 22 bool spine_mem_pool_tcm_init(spine_mem_pool_tcm_info * info) noexcept; 23 void * spine_mem_pool_tcm_mem_get(int cpu_id) noexcept; 24 void * spine_mem_pool_tcm_mem_wait(int cpu_id) noexcept; 25 int spine_mem_pool_tcm_mem_release(int cpu_id) noexcept; 26 27 void * spine_mem_pool_alloc(size_t size, size_t alignment) noexcept; 28 void * spine_mem_pool_shared_mem_alloc(size_t size, size_t alignment) noexcept; 29 void spine_mem_pool_free(void * base) noexcept; 30 void spine_mem_pool_shared_mem_free(void * base) noexcept; 31 32 } // namespace ggml::cpu::riscv64_spacemit