<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[V853 NPU 踩坑记录]]></title><description><![CDATA[<p dir="auto">这几天玩玩V853的NPU，开个帖子记录一下</p>
]]></description><link>https://bbs.aw-ol.com/topic/1641/v853-npu-踩坑记录</link><generator>RSS for Node</generator><lastBuildDate>Wed, 20 May 2026 22:08:59 GMT</lastBuildDate><atom:link href="https://bbs.aw-ol.com/topic/1641.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 22 Jun 2022 05:09:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Tue, 01 Apr 2025 09:09:16 GMT]]></title><description><![CDATA[<p dir="auto">全志的模型移植感觉比瑞芯微的复杂一些</p>
]]></description><link>https://bbs.aw-ol.com/post/25772</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/25772</guid><dc:creator><![CDATA[lisheng]]></dc:creator><pubDate>Tue, 01 Apr 2025 09:09:16 GMT</pubDate></item><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Sun, 11 Dec 2022 14:15:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://bbs.aw-ol.com/uid/1411">@yteraa</a> 大佬我按照文档装了为什么pegasus不能用呀</p>
]]></description><link>https://bbs.aw-ol.com/post/12801</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/12801</guid><dc:creator><![CDATA[w2836833]]></dc:creator><pubDate>Sun, 11 Dec 2022 14:15:01 GMT</pubDate></item><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Sun, 11 Dec 2022 12:45:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://bbs.aw-ol.com/uid/2357">@w2836833</a> 我也想知道呢？</p>
]]></description><link>https://bbs.aw-ol.com/post/12799</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/12799</guid><dc:creator><![CDATA[likehengall]]></dc:creator><pubDate>Sun, 11 Dec 2022 12:45:25 GMT</pubDate></item><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Sun, 11 Dec 2022 04:13:36 GMT]]></title><description><![CDATA[<p dir="auto">大佬 您acuity的安装包怎么来的呀</p>
]]></description><link>https://bbs.aw-ol.com/post/12797</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/12797</guid><dc:creator><![CDATA[w2836833]]></dc:creator><pubDate>Sun, 11 Dec 2022 04:13:36 GMT</pubDate></item><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Wed, 22 Jun 2022 09:06:37 GMT]]></title><description><![CDATA[<p dir="auto">成功运行npu，网络yolov3</p>
<pre><code>root@TinaLinux:/mnt/UDISK# ./vpm_run sample.txt
vpm_run sample.txt loop_run_coun[  720.963277] npu[4a6][4a6] vipcore, device ini                                                                                                                         t..
t device_id
    sample.txt: to[  720.971229] set_vip_power_clk ON
 include one ore more network bi[  720.979698] enter aw vip mem alloc size 10485                                                                                                                         76
nary graph (NBG) data file resou[  720.985630] aw_vip_mem_alloc vir 0xe2101000,                                                                                                                          phy 0x48d00000
rce.  See sample.txt for details[  720.994403] npu[4a6][4a6] gckvip_drv_init  ke                                                                                                                         rnel logical phy address=0x48d00000  virtual =0xe2101000
.
loop_run_count: the number of loop run network.
device_id: specify this NBG runs device.
example: ./vpm_run sample.txt 1 1, specify the NBG runs on device 1.
         ./vpm_run sample.txt 1000, run this network 1000 times.

test started.

init vip lite, driver version=0x00010800...
[0x4dd08]vip_init[104],
The version of Viplite is: 1.8.0-0-AW-2022-04-21
vip lite init OK.

cid=0xee, device_count=1
  device[0] core_count=1
init test resources, batch_count: 1 ...
create/prepare networks ...
batch i=0, binary name: ./network_binary.nb
[  721.472066] enter aw vip mem alloc size 38656768
[  721.499090] aw_vip_mem_alloc vir 0xe2202000, phy 0x48e00000
input 0 dim 320 320 3 1, data_fo[  721.574304] enter aw vip mem alloc size 49162                                                                                                                         24
rmat=2, quant_format=2, name=input[0], scale=0.003900, zero_poin[  721.584850] a                                                                                                                         w_vip_mem_alloc vir 0xe46e1000, phy 0x4b300000
t=0
ouput 0 dim 10 10 255 1, data_format=2, name=uid_198_out_0, scale=0.100275, zero                                                                                                                         _point=196
ouput 1 dim 20 20 255 1, data_format=2, name=uid_224_out_0, scale=0.103535, zero                                                                                                                         _point=201
ouput 2 dim 40 40 255 1, data_format=2, name=uid_250_out_0, scale=0.140436, zero                                                                                                                         _point=218
nbg name=./network_binary.nb
create network 3: 102471 us.
memory pool size=4916224byte
input 0 name: ./input_0.dat
prepare network 0: 27407 us.
batch: 0, loop count: 1
start to run network=./network_binary.nb
run time for this network 0: 107790 us.
run network done...
profile inference time=107636us, cycle=55530353
******* nb TOP5 ********
 --- Top5 ---
17545: 5.815971
17546: 5.214319
17555: 5.214319
17544: 5.013768
17554: 4.813218
******* nb TOP5 ********
 --- Top5 ---
12991: 5.176749
13011: 4.969679
2095: 4.348469
12992: 4.348469
46991: 4.348469
******* nb TOP5 ********
 --- Top5 ---[  723.594634] aw_vip_mem_free vir 0xe46e1000, phy 0x4b300000

51983: 5.196128
187983: 5.055[  723.600977] aw_vip_mem_free dma_unmap_sg_atrs
693
188023: 5.055693
51984: 4.[  723.608738] aw_vip_mem_free ion_unmap_kernel
493949
52023: 4.213077
[  723.616315] aw_vip_mem_free ion_free
[  723.622426] aw_vip_mem_free ion_client_destroy
[  723.630841] aw_vip_mem_free vir 0xe2202000, phy 0x48e00000
[  723.637162] aw_vip_mem_free dma_unmap_sg_atrs
[  723.642126] aw_vip_mem_free ion_unmap_kernel
[  723.651382] aw_vip_mem_free ion_free
[  723.655482] aw_vip_mem_free ion_client_destroy
destroy teset resource batch_count=1
[  723.708967] npu[4a6][4a6] gckvip_drv_exit, aw_vip_mem_free
[  723.715276] aw_vip_mem_free vir 0xe2101000, phy 0x48d00000
[  723.721422] aw_vip_mem_free dma_unmap_sg_atrs
[  723.726398] aw_vip_mem_free ion_unmap_kernel
[  723.731221] aw_vip_mem_free ion_free
[  723.735279] aw_vip_mem_free ion_client_destroy
[  723.740762] npu[4a6][4a6] vipcore, device un-init..
</code></pre>
]]></description><link>https://bbs.aw-ol.com/post/7995</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/7995</guid><dc:creator><![CDATA[YterAA]]></dc:creator><pubDate>Wed, 22 Jun 2022 09:06:37 GMT</pubDate></item><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Wed, 22 Jun 2022 08:11:05 GMT]]></title><description><![CDATA[<p dir="auto">编译了vpm_run作为板子的运行器</p>
<pre><code>make -f makefile.linux
</code></pre>
]]></description><link>https://bbs.aw-ol.com/post/7989</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/7989</guid><dc:creator><![CDATA[YterAA]]></dc:creator><pubDate>Wed, 22 Jun 2022 08:11:05 GMT</pubDate></item><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Wed, 22 Jun 2022 07:37:25 GMT]]></title><description><![CDATA[<p dir="auto">补充下模型转换过程：</p>
<p dir="auto">1） 导入模型</p>
<pre><code>pegasus import darknet --model yolov3.cfg --weights yolov3.weights --output-model yolov3.json --output-data yolov3.data
</code></pre>
<p dir="auto">2）创建 YML 文件对网络的输入和输出的超参数进行描述以及配置</p>
<pre><code>pegasus generate inputmeta --model yolov3.json --input-meta-output yolov3_inputmeta.yml
pegasus generate postprocess-file --model yolov3.json --postprocess-file-output yolov3_postprocessmeta.yml
</code></pre>
<p dir="auto">3）量化</p>
<pre><code>pegasus quantize --model yolov3.json --model-data yolov3.data --batch-size 1 --device CPU --with-input-meta yolov3_inputmeta.yml --rebuild --model-quantize yolov3.quantize --quantizer asymmetric_affine --qtype uint8
</code></pre>
<p dir="auto">4）预推理</p>
<pre><code>pegasus inference --model yolov3.json --model-data yolov3.data --batch-size 1 --dtype quantized --model-quantize yolov3.quantize --device CPU --with-input-meta yolov3_inputmeta.yml --postprocessfile yolov3_postprocessmeta.yml
</code></pre>
<p dir="auto">5）导出模型</p>
<pre><code>pegasus export ovxlib --model yolov3.json --model-data yolov3.data --dtype quantized --model-quantize yolov3.quantize --batch-size 1 --save-fused-graph --target-ide-project 'linux64' --with-input-meta yolov3_inputmeta.yml --output-path ovxilb/yolov3/yolov3prj --pack-nbg-unify --postprocess-file yolov3_postprocessmeta.yml --optimize "VIP9000PICO_PID0XEE" --viv-sdk ${VIV_SDK}
</code></pre>
]]></description><link>https://bbs.aw-ol.com/post/7987</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/7987</guid><dc:creator><![CDATA[YterAA]]></dc:creator><pubDate>Wed, 22 Jun 2022 07:37:25 GMT</pubDate></item><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Wed, 22 Jun 2022 07:31:34 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">噢噢噢噢来了来了</p>
</blockquote>
<p dir="auto">噢噢噢噢来了来了</p>
]]></description><link>https://bbs.aw-ol.com/post/7986</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/7986</guid><dc:creator><![CDATA[q1215200171]]></dc:creator><pubDate>Wed, 22 Jun 2022 07:31:34 GMT</pubDate></item><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Wed, 22 Jun 2022 06:35:07 GMT]]></title><description><![CDATA[<p dir="auto">input tensor 生成了<br />
<img src="/assets/uploads/files/1655879706016-7158810b-151d-4c54-9ffa-2e4c4cd5d661-image.png" alt="7158810b-151d-4c54-9ffa-2e4c4cd5d661-image.png" class=" img-responsive img-markdown" width="318" height="42" /></p>
]]></description><link>https://bbs.aw-ol.com/post/7984</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/7984</guid><dc:creator><![CDATA[YterAA]]></dc:creator><pubDate>Wed, 22 Jun 2022 06:35:07 GMT</pubDate></item><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Wed, 22 Jun 2022 06:27:49 GMT]]></title><description><![CDATA[<p dir="auto">果然，图片路径设置错误了，打错路径了</p>
]]></description><link>https://bbs.aw-ol.com/post/7983</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/7983</guid><dc:creator><![CDATA[YterAA]]></dc:creator><pubDate>Wed, 22 Jun 2022 06:27:49 GMT</pubDate></item><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Wed, 22 Jun 2022 06:27:13 GMT]]></title><description><![CDATA[<p dir="auto">好像还是没啥用，貌似是图片没打开？加一行试试看</p>
<pre><code>    if(bmpFile == NULL){
    	printf("File Open Error");
    }
</code></pre>
]]></description><link>https://bbs.aw-ol.com/post/7982</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/7982</guid><dc:creator><![CDATA[YterAA]]></dc:creator><pubDate>Wed, 22 Jun 2022 06:27:13 GMT</pubDate></item><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Wed, 22 Jun 2022 06:18:05 GMT]]></title><description><![CDATA[<p dir="auto">试试用这个记录下运行时间</p>
<pre><code>#define BILLION                                 1000000000
static uint64_t get_perf_count()
{
#if defined(__linux__) || defined(__ANDROID__) || defined(__QNX__) || defined(__CYGWIN__)
    struct timespec ts;

    clock_gettime(CLOCK_MONOTONIC, &amp;ts);

    return (uint64_t)((uint64_t)ts.tv_nsec + (uint64_t)ts.tv_sec * BILLION);
#elif defined(_WIN32) || defined(UNDER_CE)
    LARGE_INTEGER ln;

    QueryPerformanceCounter(&amp;ln);

    return (uint64_t)ln.QuadPart;
#endif
}

int main(){
    tmsStart = get_perf_count();

    // xxx

    tmsEnd = get_perf_count();
    msVal = (tmsEnd - tmsStart)/1000000;
    usVal = (tmsEnd - tmsStart)/1000;
}
</code></pre>
]]></description><link>https://bbs.aw-ol.com/post/7981</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/7981</guid><dc:creator><![CDATA[YterAA]]></dc:creator><pubDate>Wed, 22 Jun 2022 06:18:05 GMT</pubDate></item><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Wed, 22 Jun 2022 06:14:42 GMT]]></title><description><![CDATA[<p dir="auto">打印一下看看，好像很正常</p>
<pre><code>    printf("%s", name);

    bmpFile = fopen( name, "rb" );
    TEST_CHECK_PTR(bmpFile, final);
</code></pre>
<p dir="auto">把TEST_CHECK注释了看看</p>
<p dir="auto">//TEST_CHECK_PTR(bmpFile, final);</p>
]]></description><link>https://bbs.aw-ol.com/post/7980</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/7980</guid><dc:creator><![CDATA[YterAA]]></dc:creator><pubDate>Wed, 22 Jun 2022 06:14:42 GMT</pubDate></item><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Wed, 22 Jun 2022 06:11:40 GMT]]></title><description><![CDATA[<p dir="auto">顺着调用查了一下</p>
<pre><code>bmpFile = fopen( name, "rb" );
</code></pre>
<p dir="auto">这里报错了</p>
]]></description><link>https://bbs.aw-ol.com/post/7979</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/7979</guid><dc:creator><![CDATA[YterAA]]></dc:creator><pubDate>Wed, 22 Jun 2022 06:11:40 GMT</pubDate></item><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Wed, 22 Jun 2022 06:04:29 GMT]]></title><description><![CDATA[<p dir="auto">报错了</p>
<pre><code>Create Neural Network: 208ms or 208405us
E [../vnn_pre_process.c:_decode_jpeg:279]CHECK PTR 279
E [../vnn_pre_process.c:_get_jpeg_data:622]CHECK PTR 622
E [../vnn_pre_process.c:_handle_multiple_inputs:762]CHECK PTR 762
E [../vnn_pre_process.c:vnn_PreProcessYolov3prj:910]CHECK STATUS(-1:A generic error code, used when no other describes the error.)
E [../main.c:main:241]CHECK STATUS(-1:A generic error code, used when no other describes the error.)
</code></pre>
]]></description><link>https://bbs.aw-ol.com/post/7978</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/7978</guid><dc:creator><![CDATA[YterAA]]></dc:creator><pubDate>Wed, 22 Jun 2022 06:04:29 GMT</pubDate></item><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Wed, 22 Jun 2022 05:31:59 GMT]]></title><description><![CDATA[<p dir="auto">按照文档说明导入模型，转换模型，量化，测试，导出小端模型<br />
<img src="/assets/uploads/files/1655875893357-db103558-0ae4-4b30-8163-fdd5a7582904-image.png" alt="db103558-0ae4-4b30-8163-fdd5a7582904-image.png" class=" img-responsive img-markdown" width="455" height="843" /></p>
]]></description><link>https://bbs.aw-ol.com/post/7977</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/7977</guid><dc:creator><![CDATA[YterAA]]></dc:creator><pubDate>Wed, 22 Jun 2022 05:31:59 GMT</pubDate></item><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Wed, 22 Jun 2022 05:26:54 GMT]]></title><description><![CDATA[<p dir="auto">配置一下环境变量，写了个脚本干这个</p>
<pre><code>export ACTU_BASE=$(ls | grep acu*) &amp;&amp; \
export ACTU_IDE_BASE=$(ls | grep *IDE*) &amp;&amp; \
echo -e "ACUITY_TOOLS_METHOD='$PWD/$ACTU_BASE'\nexport ACUITY_PATH='$PWD/$ACTU_BASE/bin/'\nexport VIV_SDK='$PWD/$ACTU_IDE_BASE/cmdtools'\nexport PATH=$PATH:$PWD/$ACTU_BASE/bin/:$PWD/$ACTU_IDE_BASE/ide/\nexport pegasus=$PWD/$ACTU_BASE/bin/pegasus\nalias pegasus=$PWD/$ACTU_BASE/bin/pegasus" &gt;&gt; ~/.bashrc &amp;&amp; \
source ~/.bashrc
</code></pre>
]]></description><link>https://bbs.aw-ol.com/post/7976</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/7976</guid><dc:creator><![CDATA[YterAA]]></dc:creator><pubDate>Wed, 22 Jun 2022 05:26:54 GMT</pubDate></item><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Wed, 22 Jun 2022 05:25:51 GMT]]></title><description><![CDATA[<p dir="auto">先准备下模型，去darknet上下载预先训练好了的<br />
<a href="https://pjreddie.com/darknet/" target="_blank" rel="noopener noreferrer nofollow ugc">https://pjreddie.com/darknet/</a></p>
<p dir="auto"><img src="/assets/uploads/files/1655875365230-5d5a86b4-a66d-436d-ac32-634628b47ff0-image.png" alt="5d5a86b4-a66d-436d-ac32-634628b47ff0-image.png" class=" img-responsive img-markdown" width="189" height="54" /></p>
]]></description><link>https://bbs.aw-ol.com/post/7975</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/7975</guid><dc:creator><![CDATA[YterAA]]></dc:creator><pubDate>Wed, 22 Jun 2022 05:25:51 GMT</pubDate></item><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Wed, 22 Jun 2022 05:22:34 GMT]]></title><description><![CDATA[<p dir="auto">去申请了一个license，马上就到货了<br />
<img src="/assets/uploads/files/1655875193099-442ce2fd-888d-4da9-94d3-33c265b53f7b-image.png" alt="442ce2fd-888d-4da9-94d3-33c265b53f7b-image.png" class=" img-responsive img-markdown" width="480" height="57" /></p>
]]></description><link>https://bbs.aw-ol.com/post/7974</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/7974</guid><dc:creator><![CDATA[YterAA]]></dc:creator><pubDate>Wed, 22 Jun 2022 05:22:34 GMT</pubDate></item><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Wed, 22 Jun 2022 05:20:47 GMT]]></title><description><![CDATA[<p dir="auto">噢噢噢噢来了来了</p>
]]></description><link>https://bbs.aw-ol.com/post/7973</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/7973</guid><dc:creator><![CDATA[YuzukiTsuru]]></dc:creator><pubDate>Wed, 22 Jun 2022 05:20:47 GMT</pubDate></item><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Wed, 22 Jun 2022 05:18:27 GMT]]></title><description><![CDATA[<p dir="auto">好像需要License？<br />
<img src="/assets/uploads/files/1655875106792-033b5747-da7f-44a2-b09c-967009f38ea7-image.png" alt="033b5747-da7f-44a2-b09c-967009f38ea7-image.png" class=" img-responsive img-markdown" width="1022" height="774" /></p>
]]></description><link>https://bbs.aw-ol.com/post/7972</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/7972</guid><dc:creator><![CDATA[YterAA]]></dc:creator><pubDate>Wed, 22 Jun 2022 05:18:27 GMT</pubDate></item><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Wed, 22 Jun 2022 05:13:25 GMT]]></title><description><![CDATA[<p dir="auto">Vivante_IDE居然有Windows版本的，还亏我费劲装了个Ubuntu虚拟机</p>
<p dir="auto"><img src="/assets/uploads/files/1655874774688-804a535e-2cb4-4f24-9853-fe95f939ee7a-image.png" alt="804a535e-2cb4-4f24-9853-fe95f939ee7a-image.png" class=" img-responsive img-markdown" width="123" height="54" /></p>
]]></description><link>https://bbs.aw-ol.com/post/7971</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/7971</guid><dc:creator><![CDATA[YterAA]]></dc:creator><pubDate>Wed, 22 Jun 2022 05:13:25 GMT</pubDate></item><item><title><![CDATA[Reply to V853 NPU 踩坑记录 on Wed, 22 Jun 2022 05:11:27 GMT]]></title><description><![CDATA[<p dir="auto">首先的步骤，安装模型转换工具<br />
下载Verisilicon_Tool_Acuity_Toolkit和Verisilicon_Tool_VivanteIDE，按照文档安装配置</p>
]]></description><link>https://bbs.aw-ol.com/post/7970</link><guid isPermaLink="true">https://bbs.aw-ol.com/post/7970</guid><dc:creator><![CDATA[YterAA]]></dc:creator><pubDate>Wed, 22 Jun 2022 05:11:27 GMT</pubDate></item></channel></rss>