Tips When Importing Custom Models into MCX eIQ Neutron NPU SDK Examples

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Tips When Importing Custom Models into MCX eIQ Neutron NPU SDK Examples

Tips When Importing Custom Models into MCX eIQ Neutron NPU SDK Examples

When deploying a custom built model to replace the default models in MCUXpresso SDK examples, there are several modifications that need to be made as described in the eIQ Neutron NPU hands-on labs.

Here are some common issues and error messages that you might encounter when using a new custom model with the SDK examples and how to solve them. If there is an issue not covered here, then please make a new thread to discuss that issue. 

 


“Didn't find op for builtin opcode ‘<operator_name>’”

  • Need to add that operator to MODEL_GetOpsResolver function found in source\model\model_name_ops_npu.cpp
  • A full list of operators used by a model that can be copy-and-pasted into that file is automatically generated by Neutron Converter Tool with the --dump-header-file-output option at the top of the resulting header file. 
  • Make sure to also increase the size of the static array s_microOpResolver to match the number of operators

 

“resolver size is too small”

  • Need to increase the size of the static array s_microOpResolver in MODEL_GetOpsResolver function found in source\model\model_name_ops_npu.cpp to match the number of operators

 

 

“Failed to resize buffer”

  • The scratch memory buffer for the model is too small for the model and needs to be increased. The size of the memory buffer is set with the kTensorArenaSize variable found in the model data header file
  • The size of this buffer can be estimated when running the Neutron Converter tool in the "Total data" field but this estimate is often slightly smaller than the actual amount used.
  • The actual TensorArenaSize buffer required can be determined when running the model by calling s_interpreter->arena_used_bytes(); which is printed out to the serial terminal in the eIQ MCUXpresso SDK examples. The recommendation is to use the estimation but increase by ~10%, run the model, and then use the arena_used_bytes API to determine the true amount of scratch memory required.

 

“Internal Neutron NPU driver error 281b in model prepare!” or “Incompatible Neutron NPU microcode and driver versions!”

  • Ensure the version of the eIQ Neutron Converter Tool used to convert the model is the correct one that is compatible with the NPU libraries used by the SDK project. 
  • See this Community Post for how to update the eIQ Neutron libraries.

 

 

Camera colors are incorrect on FRDM-MCXN947 board

          anthony_huereca_0-1709071420874.png
  • This modification will disable Ethernet functionality on the board due to a signal conflict with EZH D0 and ENET_TXCLK. If your project needs both camera and Ethernet functionality, then only move SJ16 and SJ26 to the left (dashed line side) and then connect a wire from P1_4 (J9 pin to the left side of R58. Then in the pin_mux.c file in the project, instead of using PORT1_PCR4 for EZH_Camera_D0, use PORT3_PCR0. 

         anthony_huereca_1-1709071421059.png

 

 

         

 

标签 (2)
%3CLINGO-SUB%20id%3D%22lingo-sub-1816870%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9C%A8%E5%B0%86%E8%87%AA%E5%AE%9A%E4%B9%89%E6%A8%A1%E5%9E%8B%E5%AF%BC%E5%85%A5MCX%20eIQ%20Neutron%20NPU%20SDK%E7%A4%BA%E4%BE%8B%E6%97%B6%E7%9A%84%E6%8F%90%E7%A4%BA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1816870%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%0A%3CP%3E%E5%9C%A8%20MCUXpresso%20SDK%20%E7%A4%BA%E4%BE%8B%E4%B8%AD%E9%83%A8%E7%BD%B2%E8%87%AA%E5%AE%9A%E4%B9%89%E6%A8%A1%E5%9E%8B%E4%BB%A5%E6%9B%BF%E6%8D%A2%E9%BB%98%E8%AE%A4%E6%A8%A1%E5%9E%8B%E6%97%B6%EF%BC%8C%E9%9C%80%E8%A6%81%E8%BF%9B%E8%A1%8C%E5%A4%9A%E9%A1%B9%E4%BF%AE%E6%94%B9%EF%BC%8C%E5%A6%82%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FMCX-Microcontrollers-Knowledge%2FeIQ-Neutron-NPU-Lab-Guides%2Fta-p%2F1799233%22%20target%3D%22_blank%22%3EeIQ%20Neutron%20NPU%20%E5%AE%9E%E8%B7%B5%E5%AE%9E%E9%AA%8C%E5%AE%A4%3C%2FA%3E%E4%B8%AD%E6%89%80%E8%BF%B0%E3%80%82%E4%BB%A5%E4%B8%8B%E6%98%AF%E4%BD%BF%E7%94%A8%20SDK%20%E7%A4%BA%E4%BE%8B%E6%90%AD%E9%85%8D%E6%96%B0%E8%87%AA%E5%AE%9A%E4%B9%89%E6%A8%A1%E5%9E%8B%E6%97%B6%E5%8F%AF%E8%83%BD%E9%81%87%E5%88%B0%E7%9A%84%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98%E5%92%8C%E9%94%99%E8%AF%AF%E6%B6%88%E6%81%AF%E5%8F%8A%E5%85%B6%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%95%E3%80%82%E5%A6%82%E6%9E%9C%E9%81%87%E5%88%B0%E6%AD%A4%E5%A4%84%E6%9C%AA%E6%B6%B5%E7%9B%96%E7%9A%84%E9%97%AE%E9%A2%98%EF%BC%8C%E8%AF%B7%E6%96%B0%E5%BB%BA%E8%AE%A8%E8%AE%BA%E5%B8%96%E8%BF%9B%E8%A1%8C%E4%BA%A4%E6%B5%81%E3%80%82%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20size%3D%225%22%3E%E2%80%9C%E6%9C%AA%E6%89%BE%E5%88%B0%E5%86%85%E7%BD%AE%E6%93%8D%E4%BD%9C%E7%A0%81%E2%80%98%3COPERATOR_NAME%3E%E2%80%99%E7%9A%84%E6%93%8D%E4%BD%9C%E2%80%9D%3C%2FOPERATOR_NAME%3E%3C%2FFONT%3E%20%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%E9%9C%80%E8%A6%81%E5%9C%A8%20%3CSTRONG%3EMODEL_GetOpsResolver%20%3C%2FSTRONG%3E%E5%87%BD%E6%95%B0%E4%B8%AD%E6%B7%BB%E5%8A%A0%E8%AF%A5%E7%AE%97%E5%AD%90%EF%BC%8C%E8%AF%A5%E5%87%BD%E6%95%B0%E4%BD%8D%E4%BA%8E%20%3CSTRONG%3Esource%5Cmodel%5Cmodel_name_ops_npu.cpp%20%3C%2FSTRONG%3E%E6%96%87%E4%BB%B6%E4%B8%AD%E3%80%82%3C%2FLI%3E%0A%3CLI%3E%E9%80%9A%E8%BF%87%20Neutron%20Converter%20Tool%20%E7%9A%84%20%3CSTRONG%3Edump-header-file%3C%2FSTRONG%3E%20%E9%80%89%E9%A1%B9%E5%8F%AF%E8%87%AA%E5%8A%A8%E7%94%9F%E6%88%90%E6%A8%A1%E5%9E%8B%E4%BD%BF%E7%94%A8%E7%9A%84%E5%AE%8C%E6%95%B4%E7%AE%97%E5%AD%90%E5%88%97%E8%A1%A8%EF%BC%8C%E5%8F%AF%E7%9B%B4%E6%8E%A5%E5%A4%8D%E5%88%B6%E7%B2%98%E8%B4%B4%E5%88%B0%E8%AF%A5%E6%96%87%E4%BB%B6%E4%B8%AD%E3%80%82%3C%2FLI%3E%0A%3CLI%3E%E5%90%8C%E6%97%B6%E9%9C%80%E7%A1%AE%E4%BF%9D%E9%9D%99%E6%80%81%E6%95%B0%E7%BB%84%20%3CSTRONG%3Es_microOpResolver%3C%2FSTRONG%3E%20%E7%9A%84%E5%A4%A7%E5%B0%8F%E4%B8%8E%E7%AE%97%E5%AD%90%E6%95%B0%E9%87%8F%E5%8C%B9%E9%85%8D%E3%80%82%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3E%3CSTRONG%3E%E2%80%9C%E8%A7%A3%E6%9E%90%E5%99%A8%E5%B0%BA%E5%AF%B8%E5%A4%AA%E5%B0%8F%E2%80%9D%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%E9%9C%80%E8%A6%81%E5%A2%9E%E5%A4%A7%20%3CSTRONG%3EMODEL_GetOpsResolver%3C%2FSTRONG%3E%20%E5%87%BD%E6%95%B0%E4%B8%AD%E7%9A%84%E9%9D%99%E6%80%81%E6%95%B0%E7%BB%84%20%3CSTRONG%3Es_microOpResolver%3C%2FSTRONG%3E%20%E7%9A%84%E5%A4%A7%E5%B0%8F%EF%BC%88%E4%BD%8D%E4%BA%8E%20%3CSTRONG%3Esource%5Cmodel%5Cmodel_name_ops_npu.cpp%3C%2FSTRONG%3E%20%E6%96%87%E4%BB%B6%EF%BC%89%EF%BC%8C%E4%BB%A5%E5%8C%B9%E9%85%8D%E7%AE%97%E5%AD%90%E6%95%B0%E9%87%8F%E3%80%82%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3E%3CSTRONG%3E%E2%80%9C%E6%97%A0%E6%B3%95%E8%B0%83%E6%95%B4%E7%BC%93%E5%86%B2%E5%8C%BA%E5%A4%A7%E5%B0%8F%E2%80%9D%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%E6%A8%A1%E5%9E%8B%E7%9A%84%E6%9A%82%E5%AD%98%E5%86%85%E5%AD%98%E7%BC%93%E5%86%B2%E5%8C%BA%E8%BF%87%E5%B0%8F%EF%BC%8C%E9%9C%80%E8%A6%81%E5%A2%9E%E5%A4%A7%E3%80%82%3C%2FLI%3E%0A%3CLI%3E%E5%86%85%E5%AD%98%E7%BC%93%E5%86%B2%E5%8C%BA%E5%A4%A7%E5%B0%8F%E9%80%9A%E8%BF%87%E6%A8%A1%E5%9E%8B%E6%95%B0%E6%8D%AE%E5%A4%B4%E6%96%87%E4%BB%B6%E4%B8%AD%E7%9A%84%20%3CSTRONG%3EkTensorArenaSize%3C%2FSTRONG%3E%20%E5%8F%98%E9%87%8F%E8%AE%BE%E7%BD%AE%E3%80%82%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3E%3CSTRONG%3E%E2%80%9C%E5%86%85%E9%83%A8%20Neutron%20NPU%20%E9%A9%B1%E5%8A%A8%E7%A8%8B%E5%BA%8F%E9%94%99%E8%AF%AF%20281b%20%E5%9C%A8%E6%A8%A1%E5%9E%8B%E5%87%86%E5%A4%87%E8%BF%87%E7%A8%8B%E4%B8%AD%E5%8F%91%E7%94%9F%EF%BC%81%E2%80%9D%E6%88%96%E2%80%9CNeutron%20NPU%20%E5%BE%AE%E4%BB%A3%E7%A0%81%E4%B8%8E%E9%A9%B1%E5%8A%A8%E7%A8%8B%E5%BA%8F%E7%89%88%E6%9C%AC%E4%B8%8D%E5%85%BC%E5%AE%B9%EF%BC%81%E2%80%9D%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%E7%A1%AE%E4%BF%9D%E7%94%A8%E4%BA%8E%E8%BD%AC%E6%8D%A2%E6%A8%A1%E5%9E%8B%E7%9A%84eIQ%20Neutron%20Converter%20Tool%E7%9A%84%E7%89%88%E6%9C%AC%E6%98%AF%E6%AD%A3%E7%A1%AE%E7%9A%84%EF%BC%8C%E5%B9%B6%E4%B8%94%E4%B8%8ESDK%E9%A1%B9%E7%9B%AE%E6%89%80%E4%BD%BF%E7%94%A8%E7%9A%84NPU%E5%BA%93%E5%85%BC%E5%AE%B9%E3%80%82%3C%2FLI%3E%0A%3CLI%3EeIQ%20Toolkit%20v1.10.0%20%E5%BA%94%E4%B8%8E%20MCXUpresso%20SDK%20for%20MCX%20N%202.14.0%20%E4%B8%80%E8%B5%B7%E4%BD%BF%E7%94%A8%E3%80%82Neutron%20Converter%20Tool%20%E7%89%88%E6%9C%AC%E6%98%AF%201.2.0%2B0X84d37e1f%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3E%3CSTRONG%3EFRDM-MCXN947%20%E6%9D%BF%E4%B8%8A%E7%9A%84%E7%9B%B8%E6%9C%BA%E9%A2%9C%E8%89%B2%E4%B8%8D%E6%AD%A3%E7%A1%AE%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%E4%BF%AE%E6%94%B9%E7%94%B5%E8%B7%AF%E6%9D%BF%E8%83%8C%E9%9D%A2%E7%9A%84%E7%84%8A%E9%94%A1%E8%B7%B3%E7%BA%BF%3CSTRONG%3ESJ16%3C%2FSTRONG%3E%E3%80%81%3CSTRONG%3ESJ26%3C%2FSTRONG%3E%E5%92%8C%3CSTRONG%3ESJ27%3C%2FSTRONG%3E%EF%BC%8C%E5%B0%86%E5%AE%83%E4%BB%AC%E5%90%91%E5%B7%A6%E7%A7%BB%E5%8A%A8%EF%BC%88%E8%99%9A%E7%BA%BF%E4%B8%80%E4%BE%A7%EF%BC%89%EF%BC%8C%E4%BB%A5%E6%AD%A3%E7%A1%AE%E8%BF%9E%E6%8E%A5%E6%91%84%E5%83%8F%E5%A4%B4%E4%BF%A1%E5%8F%B7%E3%80%82%3C%2FLI%3E%0A%3C%2FUL%3E%0A%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22anthony_huereca_0-1709071420874.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22anthony_huereca_0-1709071420874.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F265379i838026D928CD0420%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22anthony_huereca_0-1709071420874.png%22%20alt%3D%22anthony_huereca_0-1709071420874.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CUL%3E%0A%3CLI%3E%E6%AD%A4%E4%BF%AE%E6%94%B9%E5%B0%86%E7%A6%81%E7%94%A8%E7%94%B5%E8%B7%AF%E6%9D%BF%E4%B8%8A%E7%9A%84%E4%BB%A5%E5%A4%AA%E7%BD%91%E5%8A%9F%E8%83%BD%EF%BC%8C%E5%9B%A0%E4%B8%BAEZH%20D0%E4%B8%8EENET_TXCLK%E4%BF%A1%E5%8F%B7%E5%86%B2%E7%AA%81%E3%80%82%E5%A6%82%E6%9E%9C%E6%82%A8%E7%9A%84%E9%A1%B9%E7%9B%AE%E9%9C%80%E8%A6%81%E5%90%8C%E6%97%B6%E6%94%AF%E6%8C%81%E6%91%84%E5%83%8F%E5%A4%B4%E5%92%8C%E4%BB%A5%E5%A4%AA%E7%BD%91%E5%8A%9F%E8%83%BD%EF%BC%8C%E5%88%99%E5%8F%AA%E9%9C%80%E5%B0%86SJ16%E5%92%8CSJ26%E5%90%91%E5%B7%A6%E7%A7%BB%E5%8A%A8%EF%BC%88%E8%99%9A%E7%BA%BF%E4%B8%80%E4%BE%A7%EF%BC%89%EF%BC%8C%E7%84%B6%E5%90%8E%E4%BB%8EP1_4%EF%BC%88J9%E5%BC%95%E8%84%9A%EF%BC%89%E8%BF%9E%E6%8E%A5%E4%B8%80%E6%A0%B9%E5%AF%BC%E7%BA%BF%E3%80%82%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%20%E5%9C%A8%20R58%20%E7%9A%84%E5%B7%A6%E4%BE%A7%E3%80%82%E7%84%B6%E5%90%8E%E5%9C%A8%E9%A1%B9%E7%9B%AE%E7%9A%84%20pin_mux.c%E6%96%87%E4%BB%B6%E4%B8%AD%EF%BC%8C%E5%B0%86%20EZH_Camera_D0%20%E7%9A%84%20PORT1_PCR4%20%E6%9B%BF%E6%8D%A2%E4%B8%BA%20PORT3_PCR0%E3%80%82%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22anthony_huereca_1-1709071421059.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22anthony_huereca_1-1709071421059.png%22%20style%3D%22width%3A%20399px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F265378iAC928E14DC4636CA%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22anthony_huereca_1-1709071421059.png%22%20alt%3D%22anthony_huereca_1-1709071421059.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1816870%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EMCXN%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ENPU%7CML%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
100% 有帮助 (1/1)
版本历史
最后更新:
‎02-24-2026 11:53 AM
更新人: