Unsupported Node in onnxruntime with vsi npu

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Unsupported Node in onnxruntime with vsi npu

1,288件の閲覧回数
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??

ラベル(1)
0 件の賞賛
10 返答(返信)

1,274件の閲覧回数
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 件の賞賛

1,270件の閲覧回数
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 件の賞賛

1,268件の閲覧回数
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 件の賞賛

1,266件の閲覧回数
phillin702
Contributor I

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

0 件の賞賛

1,260件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

I will test the lastest version and reply here.

0 件の賞賛

1,257件の閲覧回数
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 件の賞賛

1,214件の閲覧回数
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 件の賞賛

1,170件の閲覧回数
phillin702
Contributor I

Hello, do you have any new progress?

0 件の賞賛

1,168件の閲覧回数
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 件の賞賛

1,187件の閲覧回数
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 件の賞賛