From 266fbb040e2248fd666ffcd9380a78c64a4328ac Mon Sep 17 00:00:00 2001 From: sladro Date: Tue, 6 Jan 2026 17:53:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=80=A7=E8=83=BD=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0npu=E4=BD=BF=E7=94=A8=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ai_scheduler.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ai_scheduler.cpp b/src/ai_scheduler.cpp index 54fa5c1..89591aa 100644 --- a/src/ai_scheduler.cpp +++ b/src/ai_scheduler.cpp @@ -99,6 +99,13 @@ ModelHandle AiScheduler::LoadModel(const std::string& model_path, std::string& e return kInvalidModelHandle; } + // Prefer using all NPU cores (RK3588). + // This does not change the shared-context behavior; it only hints RKNN runtime scheduling. + ret = rknn_set_core_mask(ctx->ctx, RKNN_NPU_CORE_0_1_2); + if (ret < 0) { + LogWarn("[AiScheduler] rknn_set_core_mask failed: " + std::to_string(ret)); + } + // Query input/output info rknn_input_output_num io_num; ret = rknn_query(ctx->ctx, RKNN_QUERY_IN_OUT_NUM, &io_num, sizeof(io_num));