imx9352 npu not working

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

imx9352 npu not working

Jump to solution
2,992 Views
Ethane
Contributor II

I get a system error using npu on imx9352, I don't know how to go about using npu on imx9352.I would like to ask if there is a history of imx9352 using npu's.

My device tree configuration:

ethosu_mem: ethosu_region@C0000000 {
  compatible = "shared-dma-pool";
  reg = <0x0 0xC0000000 0x0 0x10000000>;
  no-map;
};

ethosu {
  compatible = "arm,ethosu";
  fsl,cm33-proc = <&cm33>;
  memory-region = <&ethosu_mem>;
  power-domains = <&mlmix>;
};

I use the process as follows:

root@ok-mx93:~# cd /usr/bin/ethosu/examples/
root@ok-mx93:/usr/bin/ethosu/examples# cp ../../tensorflow-lite-2.11.1/examples/labels.txt ./
root@ok-mx93:/usr/bin/ethosu/examples# cp ../../tensorflow-lite-2.11.1/examples/grace_hopper.bmp ./
root@ok-mx93:/usr/bin/ethosu/examples# vela ../../tensorflow-lite-2.11.1/examples/mobilenet_v1_1.0_224_quant.tflite

Network summary for mobilenet_v1_1.0_224_quant
Accelerator configuration Ethos_U65_256
System configuration internal-default
Memory mode internal-default
Accelerator clock 1000 MHz
Design peak SRAM bandwidth 16.00 GB/s
Design peak DRAM bandwidth 3.75 GB/s

Total SRAM used 370.91 KiB
Total DRAM used 3621.95 KiB

CPU operators = 0 (0.0%)
NPU operators = 60 (100.0%)

Average SRAM bandwidth 4.73 GB/s
Input SRAM bandwidth 11.96 MB/batch
Weight SRAM bandwidth 9.70 MB/batch
Output SRAM bandwidth 0.00 MB/batch
Total SRAM bandwidth 21.76 MB/batch
Total SRAM bandwidth per input 21.76 MB/inference (batch size 1)

Average DRAM bandwidth 2.13 GB/s
Input DRAM bandwidth 1.52 MB/batch
Weight DRAM bandwidth 3.23 MB/batch
Output DRAM bandwidth 5.06 MB/batch
Total DRAM bandwidth 9.82 MB/batch
Total DRAM bandwidth per input 9.82 MB/inference (batch size 1)

Neural network macs 572406226 MACs/batch
Network Tops/s 0.25 Tops/s

NPU cycles 3889054 cycles/batch
SRAM Access cycles 1019891 cycles/batch
DRAM Access cycles 1676662 cycles/batch
On-chip Flash Access cycles 0 cycles/batch
Off-chip Flash Access cycles 0 cycles/batch
Total cycles 4602254 cycles/batch

Batch Inference time 4.60 ms, 217.28 inferences/s (batch size 1)
root@ok-mx93:/usr/bin/ethosu/examples# ./inference_runner -n ./output/mobilenet_v1_1.0_224_quant_vela.tflite -i grace_hopper.bmp -l labels.txt -o output.txt
[ 301.631293] remoteproc remoteproc0: powering up imx-rproc
[ 301.638391] remoteproc remoteproc0: Booting fw image ethosu_firmware, size 242424
[ 302.179088] rproc-virtio rproc-virtio.0.auto: assigned reserved memory node vdevbuffer@a4020000
[ 302.188504] virtio_rpmsg_bus virtio0: rpmsg host is online
[ 302.196141] rproc-virtio rproc-virtio.0.auto: registered virtio0 (type 7)
[ 302.203734] rproc-virtio rproc-virtio.1.auto: assigned reserved memory node vdevbuffer@a4020000
[ 302.223392] virtio_rpmsg_bus virtio1: rpmsg host is online
[ 302.225441] virtio_rpmsg_bus virtio1: creating channel rpmsg-ethosu-channel addr 0x1e
[ 302.229006] rproc-virtio rproc-virtio.1.auto: registered virtio1 (type 7)
[ 302.246805] remoteproc remoteproc0: remote processor imx-rproc is now up
Send Ping
Send version request
Send cap[ 302.257522] SError Interrupt on CPU1, code 0x00000000be000011 -- SError
[ 302.257538] CPU: 1 PID: 807 Comm: inference_runne Tainted: G WC 6.1.36 #1
[ 302.257544] Hardware name: Forlinx OK-MX93-C board (DT)
[ 302.257547] pstate: 20400009 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 302.257552] pc : __memset+0x170/0x188
[ 302.257566] lr : dma_alloc_from_dev_coherent+0xc4/0x154
[ 302.257574] sp : ffff80000ad4bc60
[ 302.257576] x29: ffff80000ad4bc60 x28: ffff000005e51d80 x27: 0000000000000000
[ 302.257585] x26: ffff000004a87900 x25: 000000000000000a x24: 0000000000000000
[ 302.257591] x23: ffff000004a87928 x22: ffff00000908cec0 x21: ffff80000ad4bcf0
[ 302.257597] x20: 0000000000333fc0 x19: ffff800010000000 x18: 0000000000000000
[ 302.257603] x17: 0000000000000000 x16: 0000000000000000 x15: 0000ffffeb1ffee0
[ 302.257608] x14: 0000000000000000 x13: ffff0000043e2008 x12: 0000000000000010
[ 302.257614] x11: 0000000000000400 x10: ffffffffffffffff x9 : 0000000000000000
[ 302.257619] x8 : ffff8000100006c0 x7 : 0000000000000000 x6 : 000000000000003f
[ 302.257624] x5 : 0000000000000040 x4 : 0000000000000000 x3 : 0000000000000004
[ 302.257630] x2 : 00000000003338c0 x1 : 0000000000000000 x0 : ffff800010000000
[ 302.257638] Kernel panic - not syncing: Asynchronous SError Interrupt
[ 302.257640] CPU: 1 PID: 807 Comm: inference_runne Tainted: G WC 6.1.36 #1
[ 302.257644] Hardware name: Forlinx OK-MX93-C board (DT)
[ 302.257646] Call trace:
[ 302.257649] dump_backtrace.part.0+0xe0/0xf0
[ 302.257658] show_stack+0x18/0x30
[ 302.257663] dump_stack_lvl+0x64/0x80
[ 302.257669] dump_stack+0x18/0x34
[ 302.257673] panic+0x180/0x338
[ 302.257677] nmi_panic+0xac/0xb0
[ 302.257682] arm64_serror_panic+0x6c/0x7c
[ 302.257686] do_serror+0x0/0x5c
[ 302.257689] do_serror+0x34/0x5c
[ 302.257693] el1h_64_error_handler+0x30/0x4c
[ 302.257698] el1h_64_error+0x64/0x68
[ 302.257702] __memset+0x170/0x188
[ 302.257707] dma_alloc_attrs+0x5c/0xe4
[ 302.257712] ethosu_buffer_create+0x74/0x2a0
[ 302.257719] ethosu_ioctl+0x1d0/0x280
[ 302.257723] __arm64_sys_ioctl+0xac/0xf0
[ 302.257729] invoke_syscall+0x48/0x114
[ 302.257735] el0_svc_common.constprop.0+0xcc/0xec
[ 302.257740] do_el0_svc+0x2c/0xd0
[ 302.257744] el0_svc+0x2c/0x84
[ 302.257749] el0t_64_sync_handler+0xf4/0x120
[ 302.257754] el0t_64_sync+0x18c/0x190
[ 302.257759] SMP: stopping secondary CPUs
[ 302.257770] Kernel Offset: disabled
[ 302.257771] CPU features: 0x30000,000400a4,6600721b
[ 302.257775] Memory Limit: none

 

0 Kudos
Reply
1 Solution
2,955 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Your dts node is same as EVK, but EVK has 2GB RAM, i don't know the DDR size on your board.

If your board has 1GB DDR, you can use smaller shared memory pool under NPU.

View solution in original post

0 Kudos
Reply
6 Replies
2,965 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @Ethane 

Can't reproduce this issue on NXP i.MX93 EVK.

root@imx93evk:/usr/bin/ethosu/examples# cp ../../tensorflow-lite-2.11.1/examples/labels.txt ./
root@imx93evk:/usr/bin/ethosu/examples#  cp ../../tensorflow-lite-2.11.1/examples/grace_hopper.bmp ./
root@imx93evk:/usr/bin/ethosu/examples#  vela ../../tensorflow-lite-2.11.1/examples/mobilenet_v1_1.0_224_quant.tflite

Network summary for mobilenet_v1_1.0_224_quant
Accelerator configuration               Ethos_U65_256
System configuration                 internal-default
Memory mode                          internal-default
Accelerator clock                                1000 MHz
Design peak SRAM bandwidth                      16.00 GB/s
Design peak DRAM bandwidth                       3.75 GB/s

Total SRAM used                                370.91 KiB
Total DRAM used                               3621.95 KiB

CPU operators = 0 (0.0%)
NPU operators = 60 (100.0%)

Average SRAM bandwidth                           4.73 GB/s
Input   SRAM bandwidth                          11.96 MB/batch
Weight  SRAM bandwidth                           9.70 MB/batch
Output  SRAM bandwidth                           0.00 MB/batch
Total   SRAM bandwidth                          21.76 MB/batch
Total   SRAM bandwidth            per input     21.76 MB/inference (batch size 1)

Average DRAM bandwidth                           2.13 GB/s
Input   DRAM bandwidth                           1.52 MB/batch
Weight  DRAM bandwidth                           3.23 MB/batch
Output  DRAM bandwidth                           5.06 MB/batch
Total   DRAM bandwidth                           9.82 MB/batch
Total   DRAM bandwidth            per input      9.82 MB/inference (batch size 1)

Neural network macs                         572406226 MACs/batch
Network Tops/s                                   0.25 Tops/s

NPU cycles                                    3889054 cycles/batch
SRAM Access cycles                            1019891 cycles/batch
DRAM Access cycles                            1676662 cycles/batch
On-chip Flash Access cycles                         0 cycles/batch
Off-chip Flash Access cycles                        0 cycles/batch
Total cycles                                  4602254 cycles/batch

Batch Inference time                 4.60 ms,  217.28 inferences/s (batch size 1)

root@imx93evk:/usr/bin/ethosu/examples# uname -a
Linux imx93evk 6.1.36+g04b05c5527e9 #1 SMP PREEMPT Mon Sep  4 21:11:15 UTC 2023 aarch64 GNU/Linux
root@imx93evk:/usr/bin/ethosu/examples# ./inference_runner -n ./output/mobilenet_v1_1.0_224_quant_vela.tflite -i grace_hopper.bmp -l labels.txt -o output.txt
[   85.674752] remoteproc remoteproc0: powering up imx-rproc
[   85.681704] remoteproc remoteproc0: Booting fw image ethosu_firmware, size 242424
[   86.198711] rproc-virtio rproc-virtio.3.auto: assigned reserved memory node vdevbuffer@a4020000
[   86.208987] virtio_rpmsg_bus virtio0: rpmsg host is online
[   86.214955] rproc-virtio rproc-virtio.3.auto: registered virtio0 (type 7)
[   86.221865] rproc-virtio rproc-virtio.4.auto: assigned reserved memory node vdevbuffer@a4020000
[   86.235500] virtio_rpmsg_bus virtio1: rpmsg host is online
[   86.241084] virtio_rpmsg_bus virtio1: creating channel rpmsg-ethosu-channel addr 0x1e
[   86.257988] rproc-virtio rproc-virtio.4.auto: registered virtio1 (type 7)
[   86.264856] remoteproc remoteproc0: remote processor imx-rproc is now up
Send Ping
Send version request
Send capabilities request
Capabilities:
        version_status:1
        version:{ major=0, minor=0, patch=0 }
        product:{ major=6, minor=0, patch=0 }
        architecture:{ major=1, minor=0, patch=6 }
        driver:{ major=0, minor=16, patch=0 }
        macs_per_cc:8
        cmd_stream_version:0
        custom_dma:false
Create network
Create inference
Wait for inferences
Inference status: running
Wait for inference
Inference status: ok
OFM size: 1001

Detected: military uniform, confidence:70
root@imx93evk:/usr/bin/ethosu/examples#

 

0 Kudos
Reply
2,960 Views
Ethane
Contributor II
I would like to ask if there is something wrong with my device tree configuration?
0 Kudos
Reply
2,956 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Your dts node is same as EVK, but EVK has 2GB RAM, i don't know the DDR size on your board.

If your board has 1GB DDR, you can use smaller shared memory pool under NPU.

0 Kudos
Reply
2,833 Views
Ethane
Contributor II

My board is a 1g ddr, after I set the shared memory pool for the npu to be smaller, it won't get stuck anymore, but it will report the following error, I think it's using evk's firmware, which is incompatible with my own 1g ddr board, what should I do about this?

 

root@ok-mx93:/usr/bin/ethosu/examples# ./inference_runner -n output/mobilenet_v1_1.0_224_quant_vela.tflite -i grace_hopper.bmp -l labels.txt -o output.txt
[ 58.063151] remoteproc remoteproc0: powering up imx-rproc
[ 58.070435] remoteproc remoteproc0: Booting fw image ethosu_firmware, size 242568
[ 58.080759] remoteproc remoteproc0: Registered carveout doesn't fit len request
[ 58.088171] rproc-virtio: probe of rproc-virtio.0.auto failed with error -12
[ 58.097200] remoteproc remoteproc0: Registered carveout doesn't fit len request
[ 58.105805] rproc-virtio: probe of rproc-virtio.1.auto failed with error -12
[ 58.630656] remoteproc remoteproc0: remote processor imx-rproc is now up

0 Kudos
Reply
2,826 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @Ethane 

You need download i.MX93 SDK from this page:

https://mcuxpresso.nxp.com/en/welcome

Then modify the vring base address refering your dts in boards/mcimx93evk/demo_apps/ethosu_apps_rpmsg/board.h. Below codes are from 2GB EVK board.

#define VDEV0_VRING_BASE (0xA4000000U)
#define VDEV1_VRING_BASE (0xA4010000U)

Compile new ethosu_firmware.

0 Kudos
Reply
2,810 Views
Ethane
Contributor II
Problem solved, thank you for your answer!
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1846744%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Eimx9352%20npu%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1846744%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20get%20a%20system%20error%20using%20npu%20on%20imx9352%2C%20I%20don't%20know%20how%20to%20go%20about%20using%20npu%20on%20imx9352.I%20would%20like%20to%20ask%20if%20there%20is%20a%20history%20of%20imx9352%20using%20npu's.%3C%2FP%3E%3CP%3EMy%20device%20tree%20configuration%EF%BC%9A%3C%2FP%3E%3CP%3Eethosu_mem%3A%20ethosu_region%40C0000000%20%7B%3CBR%20%2F%3E%26nbsp%3B%20compatible%20%3D%20%22shared-dma-pool%22%3B%3CBR%20%2F%3E%26nbsp%3B%20reg%20%3D%20%26lt%3B0x0%200xC0000000%200x0%200x10000000%26gt%3B%3B%3CBR%20%2F%3E%26nbsp%3B%20no-map%3B%3CBR%20%2F%3E%7D%3B%3CBR%20%2F%3E%3CBR%20%2F%3Eethosu%20%7B%3CBR%20%2F%3E%26nbsp%3B%20compatible%20%3D%20%22arm%2Cethosu%22%3B%3CBR%20%2F%3E%26nbsp%3B%20fsl%2Ccm33-proc%20%3D%20%26lt%3B%26amp%3Bcm33%26gt%3B%3B%3CBR%20%2F%3E%26nbsp%3B%20memory-region%20%3D%20%26lt%3B%26amp%3Bethosu_mem%26gt%3B%3B%3CBR%20%2F%3E%26nbsp%3B%20power-domains%20%3D%20%26lt%3B%26amp%3Bmlmix%26gt%3B%3B%3CBR%20%2F%3E%7D%3B%3C%2FP%3E%3CP%3EI%20use%20the%20process%20as%20follows%EF%BC%9A%3C%2FP%3E%3CP%3Eroot%40ok-mx93%3A~%23%20cd%20%2Fusr%2Fbin%2Fethosu%2Fexamples%2F%3CBR%20%2F%3Eroot%40ok-mx93%3A%2Fusr%2Fbin%2Fethosu%2Fexamples%23%20cp%20..%2F..%2Ftensorflow-lite-2.11.1%2Fexamples%2Flabels.txt%20.%2F%3CBR%20%2F%3Eroot%40ok-mx93%3A%2Fusr%2Fbin%2Fethosu%2Fexamples%23%20cp%20..%2F..%2Ftensorflow-lite-2.11.1%2Fexamples%2Fgrace_hopper.bmp%20.%2F%3CBR%20%2F%3Eroot%40ok-mx93%3A%2Fusr%2Fbin%2Fethosu%2Fexamples%23%20vela%20..%2F..%2Ftensorflow-lite-2.11.1%2Fexamples%2Fmobilenet_v1_1.0_224_quant.tflite%3C%2FP%3E%3CP%3ENetwork%20summary%20for%20mobilenet_v1_1.0_224_quant%3CBR%20%2F%3EAccelerator%20configuration%20Ethos_U65_256%3CBR%20%2F%3ESystem%20configuration%20internal-default%3CBR%20%2F%3EMemory%20mode%20internal-default%3CBR%20%2F%3EAccelerator%20clock%201000%20MHz%3CBR%20%2F%3EDesign%20peak%20SRAM%20bandwidth%2016.00%20GB%2Fs%3CBR%20%2F%3EDesign%20peak%20DRAM%20bandwidth%203.75%20GB%2Fs%3C%2FP%3E%3CP%3ETotal%20SRAM%20used%20370.91%20KiB%3CBR%20%2F%3ETotal%20DRAM%20used%203621.95%20KiB%3C%2FP%3E%3CP%3ECPU%20operators%20%3D%200%20(0.0%25)%3CBR%20%2F%3ENPU%20operators%20%3D%2060%20(100.0%25)%3C%2FP%3E%3CP%3EAverage%20SRAM%20bandwidth%204.73%20GB%2Fs%3CBR%20%2F%3EInput%20SRAM%20bandwidth%2011.96%20MB%2Fbatch%3CBR%20%2F%3EWeight%20SRAM%20bandwidth%209.70%20MB%2Fbatch%3CBR%20%2F%3EOutput%20SRAM%20bandwidth%200.00%20MB%2Fbatch%3CBR%20%2F%3ETotal%20SRAM%20bandwidth%2021.76%20MB%2Fbatch%3CBR%20%2F%3ETotal%20SRAM%20bandwidth%20per%20input%2021.76%20MB%2Finference%20(batch%20size%201)%3C%2FP%3E%3CP%3EAverage%20DRAM%20bandwidth%202.13%20GB%2Fs%3CBR%20%2F%3EInput%20DRAM%20bandwidth%201.52%20MB%2Fbatch%3CBR%20%2F%3EWeight%20DRAM%20bandwidth%203.23%20MB%2Fbatch%3CBR%20%2F%3EOutput%20DRAM%20bandwidth%205.06%20MB%2Fbatch%3CBR%20%2F%3ETotal%20DRAM%20bandwidth%209.82%20MB%2Fbatch%3CBR%20%2F%3ETotal%20DRAM%20bandwidth%20per%20input%209.82%20MB%2Finference%20(batch%20size%201)%3C%2FP%3E%3CP%3ENeural%20network%20macs%20572406226%20MACs%2Fbatch%3CBR%20%2F%3ENetwork%20Tops%2Fs%200.25%20Tops%2Fs%3C%2FP%3E%3CP%3ENPU%20cycles%203889054%20cycles%2Fbatch%3CBR%20%2F%3ESRAM%20Access%20cycles%201019891%20cycles%2Fbatch%3CBR%20%2F%3EDRAM%20Access%20cycles%201676662%20cycles%2Fbatch%3CBR%20%2F%3EOn-chip%20Flash%20Access%20cycles%200%20cycles%2Fbatch%3CBR%20%2F%3EOff-chip%20Flash%20Access%20cycles%200%20cycles%2Fbatch%3CBR%20%2F%3ETotal%20cycles%204602254%20cycles%2Fbatch%3C%2FP%3E%3CP%3EBatch%20Inference%20time%204.60%20ms%2C%20217.28%20inferences%2Fs%20(batch%20size%201)%3CBR%20%2F%3Eroot%40ok-mx93%3A%2Fusr%2Fbin%2Fethosu%2Fexamples%23%20.%2Finference_runner%20-n%20.%2Foutput%2Fmobilenet_v1_1.0_224_quant_vela.tflite%20-i%20grace_hopper.bmp%20-l%20labels.txt%20-o%20output.txt%3CBR%20%2F%3E%5B%20301.631293%5D%20remoteproc%20remoteproc0%3A%20powering%20up%20imx-rproc%3CBR%20%2F%3E%5B%20301.638391%5D%20remoteproc%20remoteproc0%3A%20Booting%20fw%20image%20ethosu_firmware%2C%20size%20242424%3CBR%20%2F%3E%5B%20302.179088%5D%20rproc-virtio%20rproc-virtio.0.auto%3A%20assigned%20reserved%20memory%20node%20vdevbuffer%40a4020000%3CBR%20%2F%3E%5B%20302.188504%5D%20virtio_rpmsg_bus%20virtio0%3A%20rpmsg%20host%20is%20online%3CBR%20%2F%3E%5B%20302.196141%5D%20rproc-virtio%20rproc-virtio.0.auto%3A%20registered%20virtio0%20(type%207)%3CBR%20%2F%3E%5B%20302.203734%5D%20rproc-virtio%20rproc-virtio.1.auto%3A%20assigned%20reserved%20memory%20node%20vdevbuffer%40a4020000%3CBR%20%2F%3E%5B%20302.223392%5D%20virtio_rpmsg_bus%20virtio1%3A%20rpmsg%20host%20is%20online%3CBR%20%2F%3E%5B%20302.225441%5D%20virtio_rpmsg_bus%20virtio1%3A%20creating%20channel%20rpmsg-ethosu-channel%20addr%200x1e%3CBR%20%2F%3E%5B%20302.229006%5D%20rproc-virtio%20rproc-virtio.1.auto%3A%20registered%20virtio1%20(type%207)%3CBR%20%2F%3E%5B%20302.246805%5D%20remoteproc%20remoteproc0%3A%20remote%20processor%20imx-rproc%20is%20now%20up%3CBR%20%2F%3ESend%20Ping%3CBR%20%2F%3ESend%20version%20request%3CBR%20%2F%3ESend%20cap%5B%20302.257522%5D%20SError%20Interrupt%20on%20CPU1%2C%20code%200x00000000be000011%20--%20SError%3CBR%20%2F%3E%5B%20302.257538%5D%20CPU%3A%201%20PID%3A%20807%20Comm%3A%20inference_runne%20Tainted%3A%20G%20WC%206.1.36%20%231%3CBR%20%2F%3E%5B%20302.257544%5D%20Hardware%20name%3A%20Forlinx%20OK-MX93-C%20board%20(DT)%3CBR%20%2F%3E%5B%20302.257547%5D%20pstate%3A%2020400009%20(nzCv%20daif%20%2BPAN%20-UAO%20-TCO%20-DIT%20-SSBS%20BTYPE%3D--)%3CBR%20%2F%3E%5B%20302.257552%5D%20pc%20%3A%20__memset%2B0x170%2F0x188%3CBR%20%2F%3E%5B%20302.257566%5D%20lr%20%3A%20dma_alloc_from_dev_coherent%2B0xc4%2F0x154%3CBR%20%2F%3E%5B%20302.257574%5D%20sp%20%3A%20ffff80000ad4bc60%3CBR%20%2F%3E%5B%20302.257576%5D%20x29%3A%20ffff80000ad4bc60%20x28%3A%20ffff000005e51d80%20x27%3A%200000000000000000%3CBR%20%2F%3E%5B%20302.257585%5D%20x26%3A%20ffff000004a87900%20x25%3A%20000000000000000a%20x24%3A%200000000000000000%3CBR%20%2F%3E%5B%20302.257591%5D%20x23%3A%20ffff000004a87928%20x22%3A%20ffff00000908cec0%20x21%3A%20ffff80000ad4bcf0%3CBR%20%2F%3E%5B%20302.257597%5D%20x20%3A%200000000000333fc0%20x19%3A%20ffff800010000000%20x18%3A%200000000000000000%3CBR%20%2F%3E%5B%20302.257603%5D%20x17%3A%200000000000000000%20x16%3A%200000000000000000%20x15%3A%200000ffffeb1ffee0%3CBR%20%2F%3E%5B%20302.257608%5D%20x14%3A%200000000000000000%20x13%3A%20ffff0000043e2008%20x12%3A%200000000000000010%3CBR%20%2F%3E%5B%20302.257614%5D%20x11%3A%200000000000000400%20x10%3A%20ffffffffffffffff%20x9%20%3A%200000000000000000%3CBR%20%2F%3E%5B%20302.257619%5D%20x8%20%3A%20ffff8000100006c0%20x7%20%3A%200000000000000000%20x6%20%3A%20000000000000003f%3CBR%20%2F%3E%5B%20302.257624%5D%20x5%20%3A%200000000000000040%20x4%20%3A%200000000000000000%20x3%20%3A%200000000000000004%3CBR%20%2F%3E%5B%20302.257630%5D%20x2%20%3A%2000000000003338c0%20x1%20%3A%200000000000000000%20x0%20%3A%20ffff800010000000%3CBR%20%2F%3E%5B%20302.257638%5D%20Kernel%20panic%20-%20not%20syncing%3A%20Asynchronous%20SError%20Interrupt%3CBR%20%2F%3E%5B%20302.257640%5D%20CPU%3A%201%20PID%3A%20807%20Comm%3A%20inference_runne%20Tainted%3A%20G%20WC%206.1.36%20%231%3CBR%20%2F%3E%5B%20302.257644%5D%20Hardware%20name%3A%20Forlinx%20OK-MX93-C%20board%20(DT)%3CBR%20%2F%3E%5B%20302.257646%5D%20Call%20trace%3A%3CBR%20%2F%3E%5B%20302.257649%5D%20dump_backtrace.part.0%2B0xe0%2F0xf0%3CBR%20%2F%3E%5B%20302.257658%5D%20show_stack%2B0x18%2F0x30%3CBR%20%2F%3E%5B%20302.257663%5D%20dump_stack_lvl%2B0x64%2F0x80%3CBR%20%2F%3E%5B%20302.257669%5D%20dump_stack%2B0x18%2F0x34%3CBR%20%2F%3E%5B%20302.257673%5D%20panic%2B0x180%2F0x338%3CBR%20%2F%3E%5B%20302.257677%5D%20nmi_panic%2B0xac%2F0xb0%3CBR%20%2F%3E%5B%20302.257682%5D%20arm64_serror_panic%2B0x6c%2F0x7c%3CBR%20%2F%3E%5B%20302.257686%5D%20do_serror%2B0x0%2F0x5c%3CBR%20%2F%3E%5B%20302.257689%5D%20do_serror%2B0x34%2F0x5c%3CBR%20%2F%3E%5B%20302.257693%5D%20el1h_64_error_handler%2B0x30%2F0x4c%3CBR%20%2F%3E%5B%20302.257698%5D%20el1h_64_error%2B0x64%2F0x68%3CBR%20%2F%3E%5B%20302.257702%5D%20__memset%2B0x170%2F0x188%3CBR%20%2F%3E%5B%20302.257707%5D%20dma_alloc_attrs%2B0x5c%2F0xe4%3CBR%20%2F%3E%5B%20302.257712%5D%20ethosu_buffer_create%2B0x74%2F0x2a0%3CBR%20%2F%3E%5B%20302.257719%5D%20ethosu_ioctl%2B0x1d0%2F0x280%3CBR%20%2F%3E%5B%20302.257723%5D%20__arm64_sys_ioctl%2B0xac%2F0xf0%3CBR%20%2F%3E%5B%20302.257729%5D%20invoke_syscall%2B0x48%2F0x114%3CBR%20%2F%3E%5B%20302.257735%5D%20el0_svc_common.constprop.0%2B0xcc%2F0xec%3CBR%20%2F%3E%5B%20302.257740%5D%20do_el0_svc%2B0x2c%2F0xd0%3CBR%20%2F%3E%5B%20302.257744%5D%20el0_svc%2B0x2c%2F0x84%3CBR%20%2F%3E%5B%20302.257749%5D%20el0t_64_sync_handler%2B0xf4%2F0x120%3CBR%20%2F%3E%5B%20302.257754%5D%20el0t_64_sync%2B0x18c%2F0x190%3CBR%20%2F%3E%5B%20302.257759%5D%20SMP%3A%20stopping%20secondary%20CPUs%3CBR%20%2F%3E%5B%20302.257770%5D%20Kernel%20Offset%3A%20disabled%3CBR%20%2F%3E%5B%20302.257771%5D%20CPU%20features%3A%200x30000%2C000400a4%2C6600721b%3CBR%20%2F%3E%5B%20302.257775%5D%20Memory%20Limit%3A%20none%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1862960%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20imx9352%20npu%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1862960%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EProblem%20solved%2C%20thank%20you%20for%20your%20answer%EF%BC%81%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1862419%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20imx9352%20npu%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1862419%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F230799%22%20target%3D%22_blank%22%3E%40Ethane%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20need%20download%20i.MX93%20SDK%20from%20this%20page%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fmcuxpresso.nxp.com%2Fen%2Fwelcome%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmcuxpresso.nxp.com%2Fen%2Fwelcome%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EThen%20modify%20the%20vring%20base%20address%20refering%20your%20dts%20in%26nbsp%3B%3CSPAN%3Eboards%2Fmcimx93evk%2Fdemo_apps%2Fethosu_apps_rpmsg%2Fboard.h.%20Below%20codes%20are%20from%202GB%20EVK%20board.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%23define%20VDEV0_VRING_BASE%20(0xA4000000U)%0A%23define%20VDEV1_VRING_BASE%20(0xA4010000U)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3ECompile%20new%20%3CSPAN%3Eethosu_firmware%3C%2FSPAN%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1862349%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20imx9352%20npu%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1862349%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EMy%20board%20is%20a%201g%20ddr%2C%20after%20I%20set%20the%20shared%20memory%20pool%20for%20the%20npu%20to%20be%20smaller%2C%20it%20won't%20get%20stuck%20anymore%2C%20but%20it%20will%20report%20the%20following%20error%2C%20I%20think%20it's%20using%20evk's%20firmware%2C%20which%20is%20incompatible%20with%20my%20own%201g%20ddr%20board%2C%20what%20should%20I%20do%20about%20this%3F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3Eroot%40ok-mx93%3A%2Fusr%2Fbin%2Fethosu%2Fexamples%23%20.%2Finference_runner%20-n%20output%2Fmobilenet_v1_1.0_224_quant_vela.tflite%20-i%20grace_hopper.bmp%20-l%20labels.txt%20-o%20output.txt%3CBR%20%2F%3E%5B%2058.063151%5D%20remoteproc%20remoteproc0%3A%20powering%20up%20imx-rproc%3CBR%20%2F%3E%5B%2058.070435%5D%20remoteproc%20remoteproc0%3A%20Booting%20fw%20image%20ethosu_firmware%2C%20size%20242568%3CBR%20%2F%3E%5B%2058.080759%5D%20remoteproc%20remoteproc0%3A%20Registered%20carveout%20doesn't%20fit%20len%20request%3CBR%20%2F%3E%5B%2058.088171%5D%20rproc-virtio%3A%20probe%20of%20rproc-virtio.0.auto%20failed%20with%20error%20-12%3CBR%20%2F%3E%5B%2058.097200%5D%20remoteproc%20remoteproc0%3A%20Registered%20carveout%20doesn't%20fit%20len%20request%3CBR%20%2F%3E%5B%2058.105805%5D%20rproc-virtio%3A%20probe%20of%20rproc-virtio.1.auto%20failed%20with%20error%20-12%3CBR%20%2F%3E%5B%2058.630656%5D%20remoteproc%20remoteproc0%3A%20remote%20processor%20imx-rproc%20is%20now%20up%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1847601%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20imx9352%20npu%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1847601%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EYour%20dts%20node%20is%20same%20as%20EVK%2C%20but%20EVK%20has%202GB%20RAM%2C%20i%20don't%20know%20the%20DDR%20size%20on%20your%20board.%3C%2FP%3E%0A%3CP%3EIf%20your%20board%20has%201GB%20DDR%2C%20you%20can%20use%20smaller%20shared%20memory%20pool%20under%20NPU.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1847599%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20imx9352%20npu%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1847599%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EI%20would%20like%20to%20ask%20if%20there%20is%20something%20wrong%20with%20my%20device%20tree%20configuration%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1847597%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20imx9352%20npu%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1847597%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F230799%22%20target%3D%22_blank%22%3E%40Ethane%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECan't%20reproduce%20this%20issue%20on%20NXP%20i.MX93%20EVK.%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Eroot%40imx93evk%3A%2Fusr%2Fbin%2Fethosu%2Fexamples%23%20cp%20..%2F..%2Ftensorflow-lite-2.11.1%2Fexamples%2Flabels.txt%20.%2F%0Aroot%40imx93evk%3A%2Fusr%2Fbin%2Fethosu%2Fexamples%23%20%20cp%20..%2F..%2Ftensorflow-lite-2.11.1%2Fexamples%2Fgrace_hopper.bmp%20.%2F%0Aroot%40imx93evk%3A%2Fusr%2Fbin%2Fethosu%2Fexamples%23%20%20vela%20..%2F..%2Ftensorflow-lite-2.11.1%2Fexamples%2Fmobilenet_v1_1.0_224_quant.tflite%0A%0ANetwork%20summary%20for%20mobilenet_v1_1.0_224_quant%0AAccelerator%20configuration%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Ethos_U65_256%0ASystem%20configuration%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20internal-default%0AMemory%20mode%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20internal-default%0AAccelerator%20clock%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%201000%20MHz%0ADesign%20peak%20SRAM%20bandwidth%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2016.00%20GB%2Fs%0ADesign%20peak%20DRAM%20bandwidth%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%203.75%20GB%2Fs%0A%0ATotal%20SRAM%20used%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20370.91%20KiB%0ATotal%20DRAM%20used%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%203621.95%20KiB%0A%0ACPU%20operators%20%3D%200%20(0.0%25)%0ANPU%20operators%20%3D%2060%20(100.0%25)%0A%0AAverage%20SRAM%20bandwidth%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%204.73%20GB%2Fs%0AInput%20%20%20SRAM%20bandwidth%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2011.96%20MB%2Fbatch%0AWeight%20%20SRAM%20bandwidth%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%209.70%20MB%2Fbatch%0AOutput%20%20SRAM%20bandwidth%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200.00%20MB%2Fbatch%0ATotal%20%20%20SRAM%20bandwidth%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2021.76%20MB%2Fbatch%0ATotal%20%20%20SRAM%20bandwidth%20%20%20%20%20%20%20%20%20%20%20%20per%20input%20%20%20%20%2021.76%20MB%2Finference%20(batch%20size%201)%0A%0AAverage%20DRAM%20bandwidth%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%202.13%20GB%2Fs%0AInput%20%20%20DRAM%20bandwidth%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%201.52%20MB%2Fbatch%0AWeight%20%20DRAM%20bandwidth%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%203.23%20MB%2Fbatch%0AOutput%20%20DRAM%20bandwidth%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%205.06%20MB%2Fbatch%0ATotal%20%20%20DRAM%20bandwidth%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%209.82%20MB%2Fbatch%0ATotal%20%20%20DRAM%20bandwidth%20%20%20%20%20%20%20%20%20%20%20%20per%20input%20%20%20%20%20%209.82%20MB%2Finference%20(batch%20size%201)%0A%0ANeural%20network%20macs%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20572406226%20MACs%2Fbatch%0ANetwork%20Tops%2Fs%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200.25%20Tops%2Fs%0A%0ANPU%20cycles%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%203889054%20cycles%2Fbatch%0ASRAM%20Access%20cycles%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%201019891%20cycles%2Fbatch%0ADRAM%20Access%20cycles%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%201676662%20cycles%2Fbatch%0AOn-chip%20Flash%20Access%20cycles%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20cycles%2Fbatch%0AOff-chip%20Flash%20Access%20cycles%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%200%20cycles%2Fbatch%0ATotal%20cycles%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%204602254%20cycles%2Fbatch%0A%0ABatch%20Inference%20time%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%204.60%20ms%2C%20%20217.28%20inferences%2Fs%20(batch%20size%201)%0A%0Aroot%40imx93evk%3A%2Fusr%2Fbin%2Fethosu%2Fexamples%23%20uname%20-a%0ALinux%20imx93evk%206.1.36%2Bg04b05c5527e9%20%231%20SMP%20PREEMPT%20Mon%20Sep%20%204%2021%3A11%3A15%20UTC%202023%20aarch64%20GNU%2FLinux%0Aroot%40imx93evk%3A%2Fusr%2Fbin%2Fethosu%2Fexamples%23%20.%2Finference_runner%20-n%20.%2Foutput%2Fmobilenet_v1_1.0_224_quant_vela.tflite%20-i%20grace_hopper.bmp%20-l%20labels.txt%20-o%20output.txt%0A%5B%20%20%2085.674752%5D%20remoteproc%20remoteproc0%3A%20powering%20up%20imx-rproc%0A%5B%20%20%2085.681704%5D%20remoteproc%20remoteproc0%3A%20Booting%20fw%20image%20ethosu_firmware%2C%20size%20242424%0A%5B%20%20%2086.198711%5D%20rproc-virtio%20rproc-virtio.3.auto%3A%20assigned%20reserved%20memory%20node%20vdevbuffer%40a4020000%0A%5B%20%20%2086.208987%5D%20virtio_rpmsg_bus%20virtio0%3A%20rpmsg%20host%20is%20online%0A%5B%20%20%2086.214955%5D%20rproc-virtio%20rproc-virtio.3.auto%3A%20registered%20virtio0%20(type%207)%0A%5B%20%20%2086.221865%5D%20rproc-virtio%20rproc-virtio.4.auto%3A%20assigned%20reserved%20memory%20node%20vdevbuffer%40a4020000%0A%5B%20%20%2086.235500%5D%20virtio_rpmsg_bus%20virtio1%3A%20rpmsg%20host%20is%20online%0A%5B%20%20%2086.241084%5D%20virtio_rpmsg_bus%20virtio1%3A%20creating%20channel%20rpmsg-ethosu-channel%20addr%200x1e%0A%5B%20%20%2086.257988%5D%20rproc-virtio%20rproc-virtio.4.auto%3A%20registered%20virtio1%20(type%207)%0A%5B%20%20%2086.264856%5D%20remoteproc%20remoteproc0%3A%20remote%20processor%20imx-rproc%20is%20now%20up%0ASend%20Ping%0ASend%20version%20request%0ASend%20capabilities%20request%0ACapabilities%3A%0A%20%20%20%20%20%20%20%20version_status%3A1%0A%20%20%20%20%20%20%20%20version%3A%7B%20major%3D0%2C%20minor%3D0%2C%20patch%3D0%20%7D%0A%20%20%20%20%20%20%20%20product%3A%7B%20major%3D6%2C%20minor%3D0%2C%20patch%3D0%20%7D%0A%20%20%20%20%20%20%20%20architecture%3A%7B%20major%3D1%2C%20minor%3D0%2C%20patch%3D6%20%7D%0A%20%20%20%20%20%20%20%20driver%3A%7B%20major%3D0%2C%20minor%3D16%2C%20patch%3D0%20%7D%0A%20%20%20%20%20%20%20%20macs_per_cc%3A8%0A%20%20%20%20%20%20%20%20cmd_stream_version%3A0%0A%20%20%20%20%20%20%20%20custom_dma%3Afalse%0ACreate%20network%0ACreate%20inference%0AWait%20for%20inferences%0AInference%20status%3A%20running%0AWait%20for%20inference%0AInference%20status%3A%20ok%0AOFM%20size%3A%201001%0A%0ADetected%3A%20military%20uniform%2C%20confidence%3A70%0Aroot%40imx93evk%3A%2Fusr%2Fbin%2Fethosu%2Fexamples%23%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E