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/ime_env.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 / ime_env.h` 55 lines ยท 1810 bytes Raw Blame History 1 #pragma once 2 3 #include "spine_barrier.h" 4 #include "spine_mem_pool.h" 5 6 #include 7 #include 8 #include 9 10 namespace ggml::cpu::riscv64_spacemit { 11 12 constexpr uint64_t spine_invalid_core_id = 0xFFFFFFFF; 13 constexpr size_t spine_init_barrier_count = 16; 14 15 enum class spine_core_arch_id : uint16_t { 16 core_arch_none = 0, 17 core_arch_x60 = 0x503C, 18 core_arch_x100 = 0x5064, 19 core_arch_x200 = 0x50C8, 20 core_arch_a60 = 0xA03C, 21 core_arch_a100 = 0xA064, 22 core_arch_a200 = 0xA0C8, 23 }; 24 25 struct spine_core_info { 26 uint64_t core_id{ spine_invalid_core_id }; 27 spine_core_arch_id arch_id{ spine_core_arch_id::core_arch_none }; 28 29 static bool get_spine_core_info(std::vector & result); 30 }; 31 32 struct spine_env_info { 33 std::vector core_info_list; 34 std::vector perfer_core_ids; 35 int aicpu_id_offset{ 0 }; 36 int num_cores{ 0 }; 37 int num_perfer_cores{ 0 }; 38 spine_core_arch_id perfer_core_arch_id{ spine_core_arch_id::core_arch_none }; 39 bool exclude_main_thread{ false }; 40 bool use_ime2{ false }; 41 bool use_ime1{ false }; 42 bool use_tcm{ false }; 43 spine_mem_pool_backend mem_backend{ spine_mem_pool_backend::transparent_hugepage }; 44 uint64_t tcm_blk_size{ 0 }; 45 uint64_t cpu_mask{ 0 }; 46 spine_barrier_t * init_barrier{ nullptr }; 47 bool init_barrier_is_shared_mem{ false }; 48 49 spine_env_info(); 50 ~spine_env_info(); 51 }; 52 53 extern spine_env_info global_spine_env_info; 54 55 } // namespace ggml::cpu::riscv64_spacemit