mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-07 17:41:52 +08:00
[Bug Fix] Fix the bug reported by RK3568 Runtime under the latest driver (#1311)
* 更新rkyolo runtime 在rk3568最新驱动下报错的问题 * 删除debug代码
This commit is contained in:
@@ -67,6 +67,7 @@ bool RKNPU2Backend::GetSDKAndDeviceVersion() {
|
|||||||
***************************************************************/
|
***************************************************************/
|
||||||
void RKNPU2Backend::BuildOption(const RKNPU2BackendOption& option) {
|
void RKNPU2Backend::BuildOption(const RKNPU2BackendOption& option) {
|
||||||
this->option_ = option;
|
this->option_ = option;
|
||||||
|
|
||||||
// save cpu_name
|
// save cpu_name
|
||||||
this->option_.cpu_name = option.cpu_name;
|
this->option_.cpu_name = option.cpu_name;
|
||||||
|
|
||||||
@@ -123,7 +124,7 @@ bool RKNPU2Backend::InitFromRKNN(const std::string& model_file,
|
|||||||
* @return bool
|
* @return bool
|
||||||
* @note Only support RK3588
|
* @note Only support RK3588
|
||||||
***************************************************************/
|
***************************************************************/
|
||||||
bool RKNPU2Backend::SetCoreMask(rknpu2::CoreMask& core_mask) const {
|
bool RKNPU2Backend::SetCoreMask(const rknpu2::CoreMask& core_mask) {
|
||||||
int ret = rknn_set_core_mask(ctx, static_cast<rknn_core_mask>(core_mask));
|
int ret = rknn_set_core_mask(ctx, static_cast<rknn_core_mask>(core_mask));
|
||||||
if (ret != RKNN_SUCC) {
|
if (ret != RKNN_SUCC) {
|
||||||
FDERROR << "rknn_set_core_mask fail! ret=" << ret << std::endl;
|
FDERROR << "rknn_set_core_mask fail! ret=" << ret << std::endl;
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
namespace fastdeploy {
|
namespace fastdeploy {
|
||||||
struct RKNPU2BackendOption {
|
struct RKNPU2BackendOption {
|
||||||
rknpu2::CpuName cpu_name = rknpu2::CpuName::RK3588;
|
rknpu2::CpuName cpu_name = rknpu2::CpuName::RK356X;
|
||||||
|
|
||||||
// The specification of NPU core setting.It has the following choices :
|
// The specification of NPU core setting.It has the following choices :
|
||||||
// RKNN_NPU_CORE_AUTO : Referring to automatic mode, meaning that it will
|
// RKNN_NPU_CORE_AUTO : Referring to automatic mode, meaning that it will
|
||||||
@@ -49,7 +49,7 @@ class RKNPU2Backend : public BaseBackend {
|
|||||||
|
|
||||||
bool GetSDKAndDeviceVersion();
|
bool GetSDKAndDeviceVersion();
|
||||||
|
|
||||||
bool SetCoreMask(rknpu2::CoreMask& core_mask) const;
|
bool SetCoreMask(const rknpu2::CoreMask& core_mask);
|
||||||
|
|
||||||
bool GetModelInputOutputInfos();
|
bool GetModelInputOutputInfos();
|
||||||
|
|
||||||
|
@@ -71,9 +71,9 @@ struct FASTDEPLOY_DECL RuntimeOption {
|
|||||||
void UseGpu(int gpu_id = 0);
|
void UseGpu(int gpu_id = 0);
|
||||||
/// Use RKNPU2 e.g RK3588/RK356X to inference
|
/// Use RKNPU2 e.g RK3588/RK356X to inference
|
||||||
void UseRKNPU2(fastdeploy::rknpu2::CpuName rknpu2_name =
|
void UseRKNPU2(fastdeploy::rknpu2::CpuName rknpu2_name =
|
||||||
fastdeploy::rknpu2::CpuName::RK3588,
|
fastdeploy::rknpu2::CpuName::RK356X,
|
||||||
fastdeploy::rknpu2::CoreMask rknpu2_core =
|
fastdeploy::rknpu2::CoreMask rknpu2_core =
|
||||||
fastdeploy::rknpu2::CoreMask::RKNN_NPU_CORE_0);
|
fastdeploy::rknpu2::CoreMask::RKNN_NPU_CORE_AUTO);
|
||||||
/// Use TimVX e.g RV1126/A311D to inference
|
/// Use TimVX e.g RV1126/A311D to inference
|
||||||
void UseTimVX();
|
void UseTimVX();
|
||||||
/// Use Huawei Ascend to inference
|
/// Use Huawei Ascend to inference
|
||||||
|
Reference in New Issue
Block a user