MNN icon indicating copy to clipboard operation
MNN copied to clipboard

在Windows ARM64设备上跑"llm_demo.exe", 在推理时CPU频率维持在40%左右。

Open quic-zhanweiw opened this issue 9 months ago • 1 comments

在Windows ARM64设备上跑"llm_demo.exe", 是12核的CPU,将thread_num设置成10,但在推理时CPU频率维持在40%左右,拉不上去是什么原因?

编译命令:

cmake .. -G Ninja -DCMAKE_C_COMPILER="C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\ARM64\bin\clang.exe" -DCMAKE_CXX_COMPILER="C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\ARM64\bin\clang++.exe"  -DCMAKE_LINKER="C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\ARM64\bin\lld.exe" -DMNN_LOW_MEMORY=true -DMNN_CPU_WEIGHT_DEQUANT_GEMM=true -DMNN_BUILD_LLM=true -DMNN_SUPPORT_TRANSFORMER_FUSE=true -DCMAKE_BUILD_TYPE=Release

ninja -j10 

配置文件:

{
    "llm_model": "llm.mnn",
    "llm_weight": "llm.mnn.weight",
    "backend_type": "cpu",
    "thread_num": 10,
    "precision": "low",
    "memory": "low",
    "power": "high"
}

运行命令:

llm_demo "models\MNN\QwQ-32B-MNN\config.json" prompt.txt

quic-zhanweiw avatar Mar 29 '25 09:03 quic-zhanweiw

即使设置成20个线程,也是一样的结果。

quic-zhanweiw avatar Mar 29 '25 09:03 quic-zhanweiw

Marking as stale. No activity in 60 days.

github-actions[bot] avatar Jun 08 '25 09:06 github-actions[bot]