[Docs] Update testing guide in FPGA
authorDongju Chae <dongju.chae@samsung.com>
Tue, 24 Aug 2021 03:16:07 +0000 (12:16 +0900)
committer채동주/On-Device Lab(SR)/Staff Engineer/삼성전자 <dongju.chae@samsung.com>
Tue, 24 Aug 2021 04:56:28 +0000 (13:56 +0900)
This patch updates testing guide in FPGA.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
docs/markdown/TestingGuide.md

index 5918350a37197c70bd2c7a07adee95e918111470..94c886a092a94e04a40d38ac664811ebca038d9f 100644 (file)
@@ -72,18 +72,14 @@ Also, please make sure that `source.sh` is executed after booting.
 /home/root
 # source setting.sh
 # dmesg | tail
-[  715.657379] triv2 402010000.triv2: [0] /home/root/idu/cp/zero.bin -> 0x402000000
-[  715.667153] triv2 402010000.triv2: [1] /home/root/idu/cp/data.bin -> 0x402000010
-[  715.679137] triv2 402010000.triv2: [2] /home/root/idu/cp/code.bin -> 0x480020000
-[  715.696517] triv2 402010000.triv2: [3] /home/root/idu/dsp/zero.bin -> 0x402100000
-[  715.706382] triv2 402010000.triv2: [4] /home/root/idu/dsp/data.bin -> 0x402100010
-[  715.718872] triv2 402010000.triv2: [5] /home/root/idu/dsp/code.bin -> 0x480040000
-[  715.726675] triv2 402210000.triv2: [0] /home/root/idu/cp/zero.bin -> 0x402200000
-[  715.734339] triv2 402210000.triv2: [1] /home/root/idu/cp/data.bin -> 0x402200010
-[  715.743088] triv2 402210000.triv2: [2] /home/root/idu/cp/code.bin -> 0x490020000
-[  715.755241] triv2 402210000.triv2: [3] /home/root/idu/dsp/zero.bin -> 0x402300000
-[  715.763016] triv2 402210000.triv2: [4] /home/root/idu/dsp/data.bin -> 0x402300010
-[  715.771947] triv2 402210000.triv2: [5] /home/root/idu/dsp/code.bin -> 0x490040000
+[   23.804902] triv2 402010000.triv2: misc device created!
+[   23.830077] triv2 402010000.triv2: Trinity Vision2 (TRIV2) probed
+[   23.877240] triv2 402010000.triv2: [0] /home/root/idu/cp/zero.bin -> 0x402000000
+[   23.887010] triv2 402010000.triv2: [1] /home/root/idu/cp/data.bin -> 0x402000010
+[   23.903432] triv2 402010000.triv2: [2] /home/root/idu/cp/code.bin -> 0x480100000
+[   23.920371] triv2 402010000.triv2: [3] /home/root/idu/dsp/zero.bin -> 0x402100000
+[   23.930675] triv2 402010000.triv2: [4] /home/root/idu/dsp/data.bin -> 0x402100010
+[   23.948438] triv2 402010000.triv2: [5] /home/root/idu/dsp/code.bin -> 0x480600000
 ```
 
 ## How to test features
@@ -94,47 +90,56 @@ NPU-DDK supports two types of test programs: `unittest` and `apptests`.
 
 The below describes the list of available unittests.
 ```
-root@xilinx-zcu102-2019_2:~# ls -al /usr/lib/npu-engine/bin/unittests
-total 5744
-drwxr-xr-x 2 root root   4096 May 28 05:24 .
-drwxr-xr-x 5 root root   4096 May 28 05:27 ..
--rwxr-xr-x 1 root root 424040 May 28 05:27 unittest_ne_core_buffer
--rwxr-xr-x 1 root root 280664 May 28 05:27 unittest_ne_core_comm
--rwxr-xr-x 1 root root 415848 May 28 05:27 unittest_ne_core_data
--rwxr-xr-x 1 root root 530536 May 28 05:27 unittest_ne_core_handler
--rwxr-xr-x 1 root root 448616 May 28 05:27 unittest_ne_core_hwmem
--rwxr-xr-x 1 root root 436336 May 28 05:27 unittest_ne_core_inputservice
--rwxr-xr-x 1 root root 428136 May 28 05:27 unittest_ne_core_mem
--rwxr-xr-x 1 root root 456808 May 28 05:27 unittest_ne_core_model
--rwxr-xr-x 1 root root 358512 May 28 05:27 unittest_ne_core_npu
--rwxr-xr-x 1 root root 436328 May 28 05:27 unittest_ne_core_sched
--rwxr-xr-x 1 root root 424048 May 28 05:27 unittest_ne_core_segment_table
--rwxr-xr-x 1 root root 407664 May 28 05:27 unittest_ne_core_thread_pool
--rwxr-xr-x 1 root root 313432 May 28 05:27 unittest_ne_core_utils
--rwxr-xr-x 1 root root 485488 May 28 05:27 unittest_ne_libnpuhost
+root@xilinx-zcu102-2019_2:~# ls -al /usr/lib/npu-engine/bin/unittests/
+total 6004
+drwxr-xr-x 2 root root   4096 Aug 24 02:20 .
+drwxr-xr-x 5 root root   4096 Aug 24 02:30 ..
+-rwxr-xr-x 1 root root 436320 Aug 24 02:19 unittest_ne_core_buffer
+-rwxr-xr-x 1 root root 284760 Aug 24 02:19 unittest_ne_core_comm
+-rwxr-xr-x 1 root root 452704 Aug 24 02:19 unittest_ne_core_data
+-rwxr-xr-x 1 root root 546912 Aug 24 02:19 unittest_ne_core_handler
+-rwxr-xr-x 1 root root 460896 Aug 24 02:19 unittest_ne_core_hwmem
+-rwxr-xr-x 1 root root 448616 Aug 24 02:19 unittest_ne_core_inputservice
+-rwxr-xr-x 1 root root 444512 Aug 24 02:19 unittest_ne_core_mem
+-rwxr-xr-x 1 root root 469088 Aug 24 02:19 unittest_ne_core_model
+-rwxr-xr-x 1 root root 374896 Aug 24 02:19 unittest_ne_core_npu
+-rwxr-xr-x 1 root root 460896 Aug 24 02:19 unittest_ne_core_sched
+-rwxr-xr-x 1 root root 436328 Aug 24 02:19 unittest_ne_core_segment_table
+-rwxr-xr-x 1 root root 428136 Aug 24 02:19 unittest_ne_core_thread_pool
+-rwxr-xr-x 1 root root 317528 Aug 24 02:19 unittest_ne_core_utils
+-rwxr-xr-x 1 root root 551016 Aug 24 02:19 unittest_ne_libnpuhost
 ```
 
 Any program in `unittests` can be runnable without arguments.
 ```
 # pwd
 /home/root
-# source setting.sh
 # unittest_ne_libnpuhost
-[ ... ]
-[       OK ] ne_libnpuhost_test.get_npu_device_by_type_n (0 ms)
-[ RUN      ] ne_libnpuhost_test.get_npu_device_status_n
-[       OK ] ne_libnpuhost_test.get_npu_device_status_n (0 ms)
-[ RUN      ] ne_libnpuhost_test.driver_level_and_tops
-[       OK ] ne_libnpuhost_test.driver_level_and_tops (1 ms)
-[ RUN      ] ne_libnpuhost_test.statistics_apis
-[       OK ] ne_libnpuhost_test.statistics_apis (0 ms)
-[ RUN      ] ne_libnpuhost_test.statistics_apis_n
-[       OK ] ne_libnpuhost_test.statistics_apis_n (0 ms)
-[----------] 23 tests from ne_libnpuhost_test (8 ms total)
+root@xilinx-zcu102-2019_2:~# unittest_ne_libnpuhost
+[==========] Running 33 tests from 1 test case.
+[----------] Global test environment set-up.
+[----------] 33 tests from ne_libnpuhost_test
+[ RUN      ] ne_libnpuhost_test.primitives
+[       OK ] ne_libnpuhost_test.primitives (0 ms)
+[ RUN      ] ne_libnpuhost_test.get_num_devices
+[       OK ] ne_libnpuhost_test.get_num_devices (0 ms)
+[ RUN      ] ne_libnpuhost_test.get_num_devices_n
+[       OK ] ne_libnpuhost_test.get_num_devices_n (0 ms)
+[ ... ] 
+[       OK ] ne_libnpuhost_test.profile_apis_legacy (1 ms)
+[ RUN      ] ne_libnpuhost_test.profile_apis_decoupled
+[       OK ] ne_libnpuhost_test.profile_apis_decoupled (0 ms)
+[ RUN      ] ne_libnpuhost_test.profile_apis_decoupled_n
+[       OK ] ne_libnpuhost_test.profile_apis_decoupled_n (0 ms)
+[ RUN      ] ne_libnpuhost_test.get_model_tensor_size
+[       OK ] ne_libnpuhost_test.get_model_tensor_size (0 ms)
+[ RUN      ] ne_libnpuhost_test.get_model_tensor_size_n
+[       OK ] ne_libnpuhost_test.get_model_tensor_size_n (0 ms)
+[----------] 33 tests from ne_libnpuhost_test (28 ms total)
 
 [----------] Global test environment tear-down
-[==========] 23 tests from 1 test case ran. (8 ms total)
-[  PASSED  ] 23 tests.
+[==========] 33 tests from 1 test case ran. (28 ms total)
+[  PASSED  ] 33 tests.
 # unittest_ne_core_buffer
 [ ... ]
 [       OK ] ne_core_buffer_test.buffer_create_tensors_n (0 ms)
@@ -149,16 +154,20 @@ Any program in `unittests` can be runnable without arguments.
 
 The below describes the list of available apptests.
 ```
-root@xilinx-zcu102-2019_2:~# ls -al /usr/lib/npu-engine/bin/apptests
-total 252
-drwxr-xr-x 2 root root  4096 May 28 05:24 .
-drwxr-xr-x 5 root root  4096 May 28 05:27 ..
--rwxr-xr-x 1 root root 38976 May 28 05:27 apptest_tvn_triv2
--rwxr-xr-x 1 root root 38984 May 28 05:27 apptest_tvn_triv2_bulk
--rwxr-xr-x 1 root root 43080 May 28 05:27 apptest_tvn_triv2_dmabuf
--rwxr-xr-x 1 root root 38984 May 28 05:27 apptest_tvn_triv2_preempt
--rwxr-xr-x 1 root root 38984 May 28 05:27 apptest_tvn_triv2_profile
--rwxr-xr-x 1 root root 38984 May 28 05:27 apptest_tvn_triv2_xml
+root@xilinx-zcu102-2019_2:~# ls -al /usr/lib/npu-engine/bin/apptests/
+total 496
+drwxr-xr-x 2 root root  4096 Aug 24 02:20 .
+drwxr-xr-x 5 root root  4096 Aug 24 02:30 ..
+-rwxr-xr-x 1 root root 47168 Aug 24 02:19 apptest_tvn_triv2
+-rwxr-xr-x 1 root root 51272 Aug 24 02:19 apptest_tvn_triv2_aging
+-rwxr-xr-x 1 root root 47176 Aug 24 02:19 apptest_tvn_triv2_bulk
+-rwxr-xr-x 1 root root 51272 Aug 24 02:19 apptest_tvn_triv2_dmabuf
+-rwxr-xr-x 1 root root 47184 Aug 24 02:19 apptest_tvn_triv2_interleave
+-rwxr-xr-x 1 root root 47176 Aug 24 02:19 apptest_tvn_triv2_preempt
+-rwxr-xr-x 1 root root 47176 Aug 24 02:19 apptest_tvn_triv2_profile
+-rwxr-xr-x 1 root root 47184 Aug 24 02:19 apptest_tvn_triv2_profile_example
+-rwxr-xr-x 1 root root 47176 Aug 24 02:19 apptest_tvn_triv2_sigkill
+-rwxr-xr-x 1 root root 47176 Aug 24 02:19 apptest_tvn_triv2_xml
 ```
 
 They may use test models stored in `/home/root/TRIV238_2TOPS` if necessary.
@@ -169,7 +178,6 @@ The below shows example command lines for each apptest.
 ```
 # pwd
 /home/root
-# source setting.sh
 # apptest_tvn_triv2
 [APPTEST] apptest_tvn_triv2: SKIPPED
 
@@ -189,9 +197,6 @@ Options:
 # apptest_tvn_triv2 TRIV238_2TOPS/MOBILENET_V1
 [APPTEST] apptest_tvn_triv2: PASSED
 
-# apptest_tvn_triv2_bulk TRIV238_2TOPS
-[APPTEST] apptest_tvn_triv2_bulk: PASSED (98), FAILED (0)
-
 # apptest_tvn_triv2_dmabuf TRIV238_2TOPS/MOBILENET_V1
 [APPTEST] apptest_tvn_triv2_dmabuf: PASSED
 
@@ -200,42 +205,117 @@ Options:
 
 # apptest_tvn_triv2_profile TRIV238_2TOPS/MOBILENET_V1 -p visa
 [ ... ]
-[622] ADMA_IN
-        Running Cycles  : 477
-        Start Cycles  : 424930
-        End Cycles  : 425407
-        vISA Exec Seq   : 23535
-[623] CONV_I8
-        Running Cycles  : 560
-        Start Cycles  : 425407
-        End Cycles  : 425967
-        vISA Exec Seq   : 23536
-[624] ADMA_OUT
-        Running Cycles  : 1161
-        Start Cycles  : 425967
-        End Cycles  : 427128
-        vISA Exec Seq   : 23537
+[663] ADMA_OUT
+        Running Cycles  : 631
+        Start Cycles  : 744345
+        End Cycles  : 744976
+        DRAM Write (KB) : 0
+        SRAM Read  (KB) : 0
+        vISA Exec Seq   : 2740
+[664] ADMA_IN
+        Running Cycles  : 633
+        Start Cycles  : 744976
+        End Cycles  : 745609
+        DRAM Read  (KB) : 0
+        SRAM Write (KB) : 0
+        vISA Exec Seq   : 2741
+[665] ADMA_OUT
+        Running Cycles  : 632
+        Start Cycles  : 745609
+        End Cycles  : 746241
+        DRAM Write (KB) : 0
+        SRAM Read  (KB) : 0
+        vISA Exec Seq   : 2742
+[666] ADMA_IN
+        Running Cycles  : 632
+        Start Cycles  : 746241
+        End Cycles  : 746873
+        DRAM Read  (KB) : 0
+        SRAM Write (KB) : 0
+        vISA Exec Seq   : 2743
+[667] ADMA_OUT
+        Running Cycles  : 631
+        Start Cycles  : 746873
+        End Cycles  : 747504
+        DRAM Write (KB) : 0
+        SRAM Read  (KB) : 0
+        vISA Exec Seq   : 2744
+[668] ADMA_IN
+        Running Cycles  : 632
+        Start Cycles  : 747504
+        End Cycles  : 748136
+        DRAM Read  (KB) : 0
+        SRAM Write (KB) : 0
+        vISA Exec Seq   : 2745
+[669] ADMA_OUT
+        Running Cycles  : 633
+        Start Cycles  : 748136
+        End Cycles  : 748769
+        DRAM Write (KB) : 0
+        SRAM Read  (KB) : 0
+        vISA Exec Seq   : 2746
+[670] ADMA_IN
+        Running Cycles  : 614
+        Start Cycles  : 748769
+        End Cycles  : 749383
+        DRAM Read  (KB) : 0
+        SRAM Write (KB) : 0
+        vISA Exec Seq   : 2747
+[671] ADMA_OUT
+        Running Cycles  : 633
+        Start Cycles  : 749383
+        End Cycles  : 750016
+        DRAM Write (KB) : 0
+        SRAM Read  (KB) : 0
+        vISA Exec Seq   : 2748
+[672] ADMA_IN
+        Running Cycles  : 633
+        Start Cycles  : 750016
+        End Cycles  : 750649
+        DRAM Read  (KB) : 0
+        SRAM Write (KB) : 0
+        vISA Exec Seq   : 2749
+[673] ADMA_OUT
+        Running Cycles  : 632
+        Start Cycles  : 750649
+        End Cycles  : 751281
+        DRAM Write (KB) : 0
+        SRAM Read  (KB) : 0
+        vISA Exec Seq   : 2750
 [APPTEST] apptest_tvn_triv2_profile: PASSED
 
 # apptest_tvn_triv2_profile TRIV238_2TOPS/MOBILENET_V1 -p layer
 [ ... ]
 [30] conv_dw_13_relu/Relu6
-        Running Cycles  : 3005
-        Start Cycles  : 374458
-        End Cycles  : 377463
+        Running Cycles  : 6726
+        Start Cycles  : 626652
+        End Cycles  : 633378
+        DRAM Read  (KB) : 19
+        SRAM Write (KB) : 19
 [31] conv_pw_13_relu/Relu6
-        Running Cycles  : 25575
-        Start Cycles  : 377463
-        End Cycles  : 403038
+        Running Cycles  : 25662
+        Start Cycles  : 633378
+        End Cycles  : 659040
+        DRAM Read  (KB) : 1034
+        SRAM Write (KB) : 1034
 [32] Mean
-        Running Cycles  : 2493
-        Start Cycles  : 403038
-        End Cycles  : 405531
+        Running Cycles  : 2062
+        Start Cycles  : 659040
+        End Cycles  : 661102
 [33] conv_preds/BiasAdd
-        Running Cycles  : 21879
-        Start Cycles  : 405531
-        End Cycles  : 427410
+        Running Cycles  : 50173
+        Start Cycles  : 661102
+        End Cycles  : 711275
+        DRAM Read  (KB) : 1024
+        DRAM Write (KB) : 1
+        SRAM Read  (KB) : 1
+        SRAM Write (KB) : 1024
 [34] Unclassified
+        Running Cycles  : 39801
+        DRAM Read  (KB) : 0
+        DRAM Write (KB) : 0
+        SRAM Read  (KB) : 0
+        SRAM Write (KB) : 0
 [APPTEST] apptest_tvn_triv2_profile: PASSED
 
 # cat model.xml
@@ -249,4 +329,25 @@ Options:
 </testcases>
 # apptest_tvn_triv2_xml model.xml
 [APPTEST] apptest_tvn_triv2_xml: PASSED
+
+# apptest_tvn_triv2_sigkill TRIV238_2TOPS/MOBILENET_V1
+[APPTEST] apptest_tvn_triv2_sigkill: PASSED
+
+# apptest_tvn_triv2_interleave 10 TRIV238_2TOPS/MAX_POOL_2D_000,TRIV238_2TOPS/CONV_2D_300
+[APPTEST] apptest_tvn_triv2_interleave: PASSED
+
+# apptest_tvn_triv2_aging TRIV238_2TOPS/CONV_2D_300 1 10
+[APPTEST] apptest_tvn_triv2_aging: PASSED
+
+# apptest_tvn_triv2_aging TRIV238_2TOPS/CONV_2D_300 2 10
+[APPTEST] apptest_tvn_triv2_aging: PASSED
+
+# apptest_tvn_triv2_aging TRIV238_2TOPS/CONV_2D_300 3 10
+[APPTEST] apptest_tvn_triv2_aging: PASSED
+
+# apptest_tvn_triv2_aging TRIV238_2TOPS/CONV_2D_300 4 10
+[APPTEST] apptest_tvn_triv2_aging: PASSED
+
+# apptest_tvn_triv2_bulk TRIV238_2TOPS
+[APPTEST] apptest_tvn_triv2_bulk: PASSED (110), FAILED (0)
 ```