Unsupported Node in onnxruntime with vsi npu

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unsupported Node in onnxruntime with vsi npu

1,275 Views
phillin702
Contributor I

I am using IMX 8M Plus,and deploying the model in NPU with onnxruntime. My code is download from https://source.codeaurora.org/external/imx/onnxruntime-imx/tree/csharp/test/Microsoft.ML.OnnxRuntime... .

When I set execution_provider to CPU,it works fine, as shown below.

cpu.png

when I set execution_provider to vsi_npu, it works very slowly, and flag some unsupported nodes, as shown below.

npu.png

Is this because nodes which are not supported switch from NPU to CPU ??

Or is there something wrong with our operation??

0 Kudos
10 Replies

1,261 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

PRelu is not in VSI NPU node support list , that log shows that this operation node has been switched to CPU. 

0 Kudos

1,257 Views
phillin702
Contributor I

Thank you for your reply , But  Appendix C Neural network API reference in 《i.MX Machine Learning User's Guide》,it show that the prelu operation is supported,Didn't it mean NPU support?

0 Kudos

1,255 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @phillin702 

The npu driver and onnxruntime driver is also updating in each BSP release,the hardware supports it but the driver hasn't. 

0 Kudos

1,253 Views
phillin702
Contributor I

Thank you for your reply. Does this mean I have an incorrect driver version and need to update the driver?

0 Kudos

1,247 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

I will test the lastest version and reply here.

0 Kudos

1,244 Views
phillin702
Contributor I

Thank you for your reply. In addition, are other operations such as BN and Flatten also not supported? Do you have a list of operators supported by ONNX NPU?

0 Kudos

1,201 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Have you include the npu provider when you compile this source code?

Qmiller_0-1666577755374.png

Test on lasteset BSP[L5.15.52] with vsi_npu:

root@imx8mpevk:~# ./onnxruntime_sample
WARNING: Since openmp is enabled in this build, this API cannot be used to configure intra op num threads. Please use the openmp environment variables to control the number of threads.
Using Onnxruntime C API
Number of inputs = 1
Input 0 : name=data_0
Input 0 : type=1
Input 0 : num_dims=4
Input 0 : dim 0=1
Input 0 : dim 1=3
Input 0 : dim 2=224
Input 0 : dim 3=224
Score for class [0] = 0.000045
Score for class [1] = 0.003846
Score for class [2] = 0.000125
Score for class [3] = 0.001180
Score for class [4] = 0.001317
Done!

0 Kudos

1,157 Views
phillin702
Contributor I

Hello, do you have any new progress?

0 Kudos

1,155 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Previous reply contains my test log under VSI NPU with L5.15.52

The NPU test can pass with Prelu.

0 Kudos

1,174 Views
phillin702
Contributor I

Thank you for your reply. Yes, we had include the npu provider when we compile this source code.

1.png2.png3.png

0 Kudos