Tencent / TNN

TNN: developed by Tencent Youtu Lab and Guangying Lab, a uniform deep learning inference framework for mobile、desktop and server. TNN is distinguished by several outstanding features, including its cross-platform capability, high performance, model compression and code pruning. Based on ncnn and Rapidnet, TNN further strengthens the support and performance optimization for mobile devices, and also draws on the advantages of good extensibility and high performance from existed open source efforts. TNN has been deployed in multiple Apps from Tencent, such as Mobile QQ, Weishi, Pitu, etc. Contributions are welcome to work in collaborative with us and make TNN a better framework.
Other
4.38k stars 766 forks source link

HW NOVA7 HomenyOS 3.0.0 NPU not working #1923

Open hitfec opened 1 year ago

hitfec commented 1 year ago

when run Android demo, use device_type: DEVICE_HUAWEI_NPU , network_type: NETWORK_TYPE_HUAWEI_NPU. demo can not run correctly, checkNPU always return error code 0xE002(TNNERR_NPU_HIAI_API_ERROR). I don't know why.

any help will be appreciated, thank you.

prerequisites: 1: Android device: HuaWei NOVA 7. 5G 2: OS: HomenyOS 3.0.0 3: DDK Version: 100.516.020.100 4: vital log: full log as attachment.

04-12 15:58:50.626 1219 8591 E AI_FMK : node_walker.cpp InDataNode(33)::"peerAnchor" "null, return nullptr." 04-12 15:58:50.626 1219 8591 W AI_NPUCL: graph_build_optimizer.cc Optimize(313)::"TuningStrategy is 0!" 04-12 15:58:50.627 1219 8591 W AI_NPUCL: opt_rule_manager.cc Run(33)::"Graph Optimize run, sub store stage 101 not found." 04-12 15:58:50.631 1219 8591 W AI_NPUCL: converter_util.cc CreateReshapeOps(580)::"Inserted reshape op's dim sizes are not support:0" 04-12 15:58:50.644 1219 8591 E AI_NPUCL: GetOutputDesc(245)::all input must have the same dim value except concat_axis, out_desc.dim(2):3600,input_desc(1).dim(2):600 Error Code:0xFFFFFFFF() 04-12 15:58:50.644 1219 8591 E AI_NPUCL: Build(141)::"Get output descriptors" failed. Node: 374. 04-12 15:58:50.644 1219 8591 E AI_NPUCL: optimize_assistant.cc GraphBuild(608)::"Op Build4NPU failed. Node: 374." 04-12 15:58:50.644 1219 8591 E AI_NPUCL: graph_build_optimizer.cc Optimize(340)::"Failed to build npu sub graph: graph_sub_graph_0" 04-12 15:58:50.644 1219 8591 E AI_FMK : model_optimizer.cpp operator()(297)::"optimizer_presave in cl NPUCL failed !" 04-12 15:58:50.644 1219 8591 E AI_FMK : general_model_compiler.cpp Compile(196)::" PreGraphSaveOptimize failed!" 04-12 15:58:50.644 1219 8591 E AI_FMK : model_util.cpp BuildIRModel2OM(440)::"Generate om graph failed, error code: 1" 04-12 15:58:50.646 3000 3035 W HwLauncher: LauncherDeviceManagerService getCachedLocalDevice: device Manager did not complete initialization 04-12 15:58:50.646 3000 3035 W HwLauncher: LauncherDeviceManagerService getCachedLocalDevice: device Manager did not complete initialization 04-12 15:58:50.646 1219 8591 E AI_FMK : ai_model_manager_impl.cpp BuildModel(1674)::"after build, model data is null" 04-12 15:58:50.646 8102 8102 E AI_FMK : ai_model_manager_client_hidl.cpp BuildModel(667)::LOG_AI_MODEL_MANAGER_CLIENT_HIDL 04-12 15:58:50.646 8102 8102 E AI_FMK : ai_model_manager.cpp HIAI_ModelManager_buildModel(1909)::"AI_ModelManager_buildModel Build model failed!" 04-12 15:58:50.646 8102 8102 I aiclient: AiModelManagerClient: Delete model manager client successed! 04-12 15:58:50.646 1219 8591 E AI_FMK : ai_model_manager_service_hidl.cpp BuildModel(845)::LOG_AI_MODEL_MANAGER_SERVICE_HIDL 04-12 15:58:50.646 8102 8102 I aiclient: Delete model manager client! 04-12 15:58:50.647 1219 1401 I AI_FMK : ai_model_manager_service_hidl.cpp UnInit(306)::LOG_AI_MODEL_MANAGER_SERVICE_HIDL 04-12 15:58:50.647 1219 1401 I AI_FMK : ai_model_manager_service_hidl.cpp RemoveService(862)::LOG_AI_MODEL_MANAGER_SERVICE_HIDL 04-12 15:58:50.647 1219 1401 I AI_FMK : ai_model_manager_impl.cpp ~AIModelManagerImpl(164)::"Begin destroy AIModelManager!" 04-12 15:58:50.647 1219 1401 I AI_FMK : ai_model_manager_impl.cpp UnInit(400)::"Begin AIModelManagerImpl::UnInit!" 04-12 15:58:50.647 1219 1401 I AI_FMK : ai_model_manager_impl.cpp UnInit(407)::"CancelModelCompute : success !" 04-12 15:58:50.647 1219 1401 I AI_FMK : ai_model_manager_impl.cpp UnInit(414)::"WaitAsyncTask : success !" 04-12 15:58:50.647 1219 1401 I AI_FMK : ai_model_manager_impl.cpp UnInit(417)::"UnloadModels : completed !" 04-12 15:58:50.647 1219 1401 I AI_FMK : ai_model_manager_service_hidl.cpp RemoveService(907)::LOG_AI_MODEL_MANAGER_SERVICE_HIDL 04-12 15:58:50.647 8102 8102 I AI_FMK : ai_model_manager_client_hidl.cpp ~AIMODELHIDLListener(64)::LOG_AI_MODEL_MANAGER_CLIENT_HIDL 04-12 15:58:50.647 8102 8102 E AI_FMK : ai_model_manager.cpp HIAI_ModelManager_buildModel_v2(1849)::"BuildModel_V2 failed" 04-12 15:58:50.647 1219 1401 I AI_FMK : ai_model_mngr_service.cpp unregisterInstance(372)::"AiModelMngrService::unregisterInstance pid = 8102001" 04-12 15:58:50.647 1219 1401 I AI_FMK : ai_model_mngr_service_nn.cpp cleanResource(208)::"enter AiModelMngrService::cleanResource pid = 8102001" 04-12 15:58:50.647 1219 1401 W AI_FMK : ai_model_mngr_service_nn.cpp cleanResource(213)::"cleanResource service 8102001 is not create" 04-12 15:58:50.647 8102 8102 I AI_FMK : AiModelManagerImpl.cpp Unregister(460)::"AiModelManagerImpl::Unregister: total client num:1" 04-12 15:58:50.647 8102 8102 E HIAI_IR_BUILD: BuildIRModel build failed.