From f5fcf4828efe6b86d0200c41ed9846691721976f Mon Sep 17 00:00:00 2001 From: ZIFENG278 Date: Mon, 9 Mar 2026 11:31:31 +0800 Subject: [PATCH] docs: fix armv9 llama.cpp compile issue Signed-off-by: ZIFENG278 --- .typos.toml | 3 ++- docs/common/ai/_llama_cpp.mdx | 13 ++++++++----- .../current/common/ai/_llama_cpp.mdx | 11 +++++++---- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.typos.toml b/.typos.toml index 2b5850bbc..d73a98895 100644 --- a/.typos.toml +++ b/.typos.toml @@ -8,7 +8,8 @@ extend-ignore-identifiers-re = [ "noe", "NOE", "BA", - "lin2-rin2" + "lin2-rin2", + "SME" ] extend-ignore-re = [ "lin2-rin2", diff --git a/docs/common/ai/_llama_cpp.mdx b/docs/common/ai/_llama_cpp.mdx index 8ab8197aa..a46f40122 100644 --- a/docs/common/ai/_llama_cpp.mdx +++ b/docs/common/ai/_llama_cpp.mdx @@ -11,7 +11,7 @@ llama.cpp 是一个基于纯 C/C++ 实现的高性能大模型推理框架,它 ```bash -git clone https://github.com/ggml-org/llama.cpp.git +git clone https://github.com/ggml-org/llama.cpp.git && cd llama.cpp ``` @@ -23,7 +23,7 @@ git clone https://github.com/ggml-org/llama.cpp.git ```bash -sudo apt install cmake gcc g++ +sudo apt install cmake gcc g++ libcurl4-openssl-dev ``` @@ -39,15 +39,18 @@ cmake --build build --config Release -j$(nproc) -:::info[KleidiAI] +:::info[ARMv9] 对于采用 ARM-v9 架构的 [瑞莎星睿 O6 / O6N](/orion/o6) 设备,可以开启 armv9-a 和 KleidiAI 编译选项进行硬件级优化。 + +**请使用 `4aced7a` commit** ::: ```bash +git checkout 4aced7a cmake -B build -DGGML_NATIVE=OFF -DGGML_CPU_ARM_ARCH=armv9-a+i8mm+dotprod -DGGML_CPU_KLEIDIAI=ON -cmake --build build --config Release +cmake --build build --config Release -j$(nproc) ``` @@ -60,7 +63,7 @@ Llama.cpp 已集成 Arm KleidiAI 库,该库针对 SME、I8MM 及点积加速 ```bash cmake -B build -DGGML_CPU_KLEIDIAI=ON -cmake --build build --config Release +cmake --build build --config Release -j$(nproc) ``` diff --git a/i18n/en/docusaurus-plugin-content-docs/current/common/ai/_llama_cpp.mdx b/i18n/en/docusaurus-plugin-content-docs/current/common/ai/_llama_cpp.mdx index 2e14bbcdb..25191231f 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/common/ai/_llama_cpp.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/common/ai/_llama_cpp.mdx @@ -23,7 +23,7 @@ git clone https://github.com/ggml-org/llama.cpp.git ```bash -sudo apt install cmake gcc g++ +sudo apt install cmake gcc g++ libcurl4-openssl-dev ``` @@ -39,15 +39,18 @@ cmake --build build --config Release -j$(nproc) -:::info[KleidiAI] +:::info[ARMv9] On devices using the ARMv9 architecture, such as [Radxa Orion O6 / O6N](/orion/o6), you can enable the `armv9-a` and KleidiAI build options for hardware-level optimization. + +**Please use `4aced7a` commit**. ::: ```bash +git checkout 4aced7a cmake -B build -DGGML_NATIVE=OFF -DGGML_CPU_ARM_ARCH=armv9-a+i8mm+dotprod -DGGML_CPU_KLEIDIAI=ON -cmake --build build --config Release +cmake --build build --config Release -j$(nproc) ``` @@ -60,7 +63,7 @@ llama.cpp integrates the Arm KleidiAI library, which provides highly optimized m ```bash cmake -B build -DGGML_CPU_KLEIDIAI=ON -cmake --build build --config Release +cmake --build build --config Release -j$(nproc) ```