SampleCode cannot run in AIP mode while snpe-net-run can run (snpe-1.51). The error message is: AIP runtime invalid parameter. Mismatch between network offline and online view. How could I change Sample Code a bit to be able to run my DLC with AIP mode like snpe-net-run? Since snpe-net-run could run the DLC successfully, my setup should be good. As follows, are the commands and outputs.
# /SampleCode1.51/bin/snpe-sample -i raw_list.txt -d /data/ssd_quantized_with_hta.dlc -r aip
SNPE Version: 1.51.0.qnx
npu_get_property status: 0
npu_get_property status: 0
npu_get_property status: 0
NPU User Driver: npu_read_info 0
npu_get_property status: 0
npu_get_property status: 0
npu_get_property status: 0
npu_get_property status: 0
npu_get_property status: 0
npu_get_property status: 0
npu_get_property status: 0
Error while building SNPE object.
error_code=1409; error_message=AIP runtime invalid parameter. error_code=1409; error_message=AIP runtime invalid parameter. Mismatch between network offline and online view.; error_component=AIP Runtime; line_no=545; thread_id=5; error_component=AIP Runtime; line_no=262; thread_id=1
# snpe-net-run --container=ssd_quantized_with_hta.dlc --input_list=raw_list.txt --use_aip
npu_get_property status: 0
npu_get_property status: 0
npu_get_property status: 0
NPU User Driver: npu_read_info 0
npu_get_property status: 0
npu_get_property status: 0
npu_get_property status: 0
npu_get_property status: 0
npu_get_property status: 0
npu_get_property status: 0
npu_get_property status: 0
NPU driver built on: Jun 9 2021 17:22:18
npu_get_property status: 0
npu_get_property status: 0
npu_get_property status: 0
compression enabled
NET size 3162112 off 0 id=ffffffff
INTERMEDIATE size 4354048 off 0 id=fffffffe
ACO buffer size 117982 fd 18 off 0
* NPU_Stats: npu_compile_get_objs(): 186.00 ms
npu_load_network_v2():Warning fw does not support network priority
npu_load_network_v2(): ACO VA c0100000 Network VA = 0xc0400000 Intermediate 0 VA = 0xc0800000
npu_load_network_v2: perf mode = 5 priority=3f flags = 0x0 num layers = 85
MSM_NPU_LOAD_NETWORK_V2, ret = 0, network_hdl = 0x10001
* NPU_Stats: npu_load_network_v2: NPU + kernel : 102.00 ms
npu_load_network_v2: network handle = 0x10001
* NPU_Stats: npu_load_network(): 1041.00 ms
* NPU_Stats: npu_alloc_buffer_v2(): 0.00 ms sts=0
* NPU_Stats: npu_alloc_buffer_v2(): 0.00 ms sts=0
* NPU_Stats: npu_alloc_buffer_v2(): 0.00 ms sts=0
* NPU_Stats: npu_alloc_buffer_v2(): 0.00 ms sts=0
* NPU_Stats: npu_alloc_buffer_v2(): 1.00 ms sts=0
* NPU_Stats: npu_alloc_buffer_v2(): 0.00 ms sts=0
* NPU_Stats: npu_alloc_buffer_v2(): 0.00 ms sts=0
* NPU_Stats: npu_alloc_buffer_v2(): 0.00 ms sts=0
* NPU_Stats: npu_alloc_buffer_v2(): 0.00 ms sts=0
* NPU_Stats: npu_alloc_buffer_v2(): 0.00 ms sts=0
* NPU_Stats: npu_alloc_buffer_v2(): 0.00 ms sts=0
* NPU_Stats: npu_alloc_buffer_v2(): 0.00 ms sts=0
* NPU_Stats: npu_alloc_buffer_v2(): 1.00 ms sts=0
NPU driver built on: Jun 9 2021 17:22:18
compression enabled
Bad quantization: zero scale!
Bad quantization: zero scale!
NET size 8192 off 0 id=ffffffff
INTERMEDIATE size 878592 off 0 id=fffffffe
ACO buffer size 9840 fd 56 off 0
* NPU_Stats: npu_compile_get_objs(): 14.00 ms
npu_load_network_v2():Warning fw does not support network priority
npu_load_network_v2(): ACO VA c020c000 Network VA = 0xc020a000 Intermediate 0 VA = 0xc0300000
npu_load_network_v2: perf mode = 5 priority=3f flags = 0x0 num layers = 10
MSM_NPU_LOAD_NETWORK_V2, ret = 0, network_hdl = 0x20082
* NPU_Stats: npu_load_network_v2: NPU + kernel : 0.00 ms
npu_load_network_v2: network handle = 0x20082
* NPU_Stats: npu_load_network(): 15.00 ms
* NPU_Stats: npu_alloc_buffer_v2(): 0.00 ms sts=0
* NPU_Stats: npu_alloc_buffer_v2(): 0.00 ms sts=0
* NPU_Stats: npu_alloc_buffer_v2(): 1.00 ms sts=0
* NPU_Stats: npu_alloc_buffer_v2(): 0.00 ms sts=0
-------------------------------------------------------------------------------
Model String: N/A
SNPE v1.51.0.qnx
-------------------------------------------------------------------------------
Processing DNN input(s):
./chairs.raw
npu_set_property status: 0
npu_set_property status: 0
Processing DNN input(s):
./notice_sign.raw
Processing DNN input(s):
./plastic_cup.raw
Processing DNN input(s):
./trash_bin.raw
* NPU_Stats: npu_free_buffer_v2(): 0.00 ms
* NPU_Stats: npu_free_buffer_v2(): 0.00 ms
* NPU_Stats: npu_free_buffer_v2(): 0.00 ms
* NPU_Stats: npu_free_buffer_v2(): 0.00 ms
MSM_NPU_UNLOAD_NETWORK, ret = 0, network_hdl = 0x20082
* NPU_Stats: npu_unload_network(): NPU + kernel : 0.00 ms
free delayed buffer c1040000
free delayed buffer c1020000
free delayed buffer c1000000
free delayed buffer c02e0000
* NPU_Stats: npu_unload_network(): 4.00 ms
* NPU_Stats: npu_free_buffer_v2(): 0.00 ms
* NPU_Stats: npu_free_buffer_v2(): 0.00 ms
* NPU_Stats: npu_free_buffer_v2(): 0.00 ms
* NPU_Stats: npu_free_buffer_v2(): 0.00 ms
* NPU_Stats: npu_free_buffer_v2(): 0.00 ms
* NPU_Stats: npu_free_buffer_v2(): 0.00 ms
* NPU_Stats: npu_free_buffer_v2(): 0.00 ms
* NPU_Stats: npu_free_buffer_v2(): 0.00 ms
* NPU_Stats: npu_free_buffer_v2(): 0.00 ms
* NPU_Stats: npu_free_buffer_v2(): 0.00 ms
* NPU_Stats: npu_free_buffer_v2(): 0.00 ms
* NPU_Stats: npu_free_buffer_v2(): 0.00 ms
* NPU_Stats: npu_free_buffer_v2(): 0.00 ms
MSM_NPU_UNLOAD_NETWORK, ret = 0, network_hdl = 0x10001
* NPU_Stats: npu_unload_network(): NPU + kernel : 93.00 ms
free delayed buffer c0209000
free delayed buffer c0208000
free delayed buffer c0207000
free delayed buffer c0206000
free delayed buffer c0205000
free delayed buffer c0204000
free delayed buffer c0089000
free delayed buffer c0200000
free delayed buffer c008a000
free delayed buffer c0120000
free delayed buffer c0098000
free delayed buffer c0140000
free delayed buffer c0180000
* NPU_Stats: npu_unload_network(): 103.00 ms