Build on ReSpeaker V2 - xiongyihui/Ne10 GitHub Wiki
Build & Test
git clone https://github.com/xiongyihui/Ne10.git
mkdir -p Ne10/build
cd Ne10/build
export NE10_LINUX_TARGET_ARCH=armv7
cmake -DGNULINUX_PLATFORM=ON -DNE10_BUILD_UNIT_TEST=ON -DNE10_PERFORMANCE_TEST=ON ..
make
./samples/NE10_test_static
# performance test
./test/NE10_dsp_unit_test_static_performance
32768点int32的fft在respeaker出现segment fault, 小更改,先跑完测试(后面有时间再看看是什么问题)
--- a/modules/dsp/test/test_suite_fft_int32.c
+++ b/modules/dsp/test/test_suite_fft_int32.c
@@ -44,7 +44,7 @@
** ------------------------------------------------------------------- */
/* Max FFT Length and double buffer for real and imag */
-#define TEST_LENGTH_SAMPLES (32768)
+#define TEST_LENGTH_SAMPLES (32768 >> 1)
#define MIN_LENGTH_SAMPLES_CPX (2)
#define MIN_LENGTH_SAMPLES_REAL (MIN_LENGTH_SAMPLES_CPX)
Performance Test Result
respeaker@v2:~/Ne10/build$ ./test/NE10_dsp_unit_test_static_performance
--- /home/respeaker/Ne10/modules/dsp/test/test_suite_fft_float32.c ---
----------test_fft_c2c_1d_float32_performance start
FFT Length C Time (micro-s) NEON Time (micro-s) Time Savings Performance Ratio
FFT size 2
2 416105 480699 -15.52% 0.87:1
2 448656 588603 -31.19% 0.76:1
FFT size 4
4 227666 294333 -29.28% 0.77:1
4 306298 376142 -22.80% 0.81:1
FFT size 8
8 176459 209453 -18.70% 0.84:1
8 254961 282918 -10.97% 0.90:1
FFT size 16
16 238920 145770 38.99% 1.64:1
16 257521 174873 32.09% 1.47:1
FFT size 32
32 235922 211474 10.36% 1.12:1
32 247100 234427 5.13% 1.05:1
FFT size 64
64 331670 272833 17.74% 1.22:1
64 342751 290989 15.10% 1.18:1
FFT size 128
128 342763 286944 16.29% 1.19:1
128 349248 305708 12.47% 1.14:1
FFT size 256
256 443817 351766 20.74% 1.26:1
256 446830 370052 17.18% 1.21:1
FFT size 512
512 460714 373153 19.01% 1.23:1
512 458374 390286 14.85% 1.17:1
FFT size 1024
1024 586966 462636 21.18% 1.27:1
1024 583185 479782 17.73% 1.22:1
FFT size 2048
2048 729266 546495 25.06% 1.33:1
2048 723133 565912 21.74% 1.28:1
FFT size 4096
4096 881694 619446 29.74% 1.42:1
4096 863376 637254 26.19% 1.35:1
FFT size 8192
8192 1112555 1011119 9.12% 1.10:1
8192 1112673 1028326 7.58% 1.08:1
FFT size 16384
16384 2078504 2006717 3.45% 1.04:1
16384 2123655 2020324 4.87% 1.05:1
FFT size 32768
32768 2781004 3063874 -10.17% 0.91:1
32768 2845649 3062526 -7.62% 0.93:1
1 run 0 failed
--- /home/respeaker/Ne10/modules/dsp/test/test_suite_fft_float32.c ---
----------test_fft_r2c_1d_float32_performance start
FFT Length C Time (micro-s) NEON Time (micro-s) Time Savings Performance Ratio
FFT size 2
2 290824 2369922 -714.90% 0.12:1
2 372716 2710857 -627.33% 0.14:1
FFT size 4
4 252471 401978 -59.22% 0.63:1
4 326807 463331 -41.78% 0.71:1
FFT size 8
8 187264 262594 -40.23% 0.71:1
8 237679 305219 -28.42% 0.78:1
FFT size 16
16 158176 185049 -16.99% 0.85:1
16 199808 224809 -12.51% 0.89:1
FFT size 32
32 187372 141538 24.46% 1.32:1
32 201508 157686 21.75% 1.28:1
FFT size 64
64 185496 169522 8.61% 1.09:1
64 192514 181478 5.73% 1.06:1
FFT size 128
128 236101 197317 16.43% 1.20:1
128 240275 206088 14.23% 1.17:1
FFT size 256
256 240181 202881 15.53% 1.18:1
256 243023 212627 12.51% 1.14:1
FFT size 512
512 289222 234019 19.09% 1.24:1
512 290145 243128 16.20% 1.19:1
FFT size 1024
1024 295814 244330 17.40% 1.21:1
1024 295524 253621 14.18% 1.17:1
FFT size 2048
2048 357777 290555 18.79% 1.23:1
2048 358320 298434 16.71% 1.20:1
FFT size 4096
4096 405335 362173 10.65% 1.12:1
4096 402025 349190 13.14% 1.15:1
FFT size 8192
8192 484751 437555 9.74% 1.11:1
8192 471876 471030 0.18% 1.00:1
FFT size 16384
16384 638643 694106 -8.68% 0.92:1
16384 786212 713644 9.23% 1.10:1
FFT size 32768
32768 1218852 1287442 -5.63% 0.95:1
32768 1322325 1278195 3.34% 1.03:1
1 run 0 failed
---- /home/respeaker/Ne10/modules/dsp/test/test_suite_fft_int32.c ----
----------test_fft_c2c_1d_int32_performance start
FFT Length C Time (micro-s) NEON Time (micro-s) Time Savings Performance Ratio
FFT size 2
2 6666 10148 -52.24% 0.66:1
2 6577 10019 -52.33% 0.66:1
2 7274 10682 -46.85% 0.68:1
2 7271 10683 -46.93% 0.68:1
FFT size 4
4 5823 7514 -29.04% 0.77:1
4 5820 7579 -30.22% 0.77:1
4 7301 9047 -23.91% 0.81:1
4 7318 9025 -23.33% 0.81:1
FFT size 8
8 6198 7216 -16.42% 0.86:1
8 6172 7012 -13.61% 0.88:1
8 8455 9321 -10.24% 0.91:1
8 8509 9305 -9.35% 0.91:1
FFT size 16
16 9656 3291 65.92% 2.93:1
16 10277 3193 68.93% 3.22:1
16 12544 3311 73.60% 3.79:1
16 13061 3247 75.14% 4.02:1
FFT size 32
32 11132 4352 60.91% 2.56:1
32 11895 4789 59.74% 2.48:1
32 14745 4506 69.44% 3.27:1
32 15324 4507 70.59% 3.40:1
FFT size 64
64 15481 5694 63.22% 2.72:1
64 16554 6136 62.93% 2.70:1
64 19482 5718 70.65% 3.41:1
64 20833 6045 70.98% 3.45:1
FFT size 128
128 16896 5907 65.04% 2.86:1
128 18009 5901 67.23% 3.05:1
128 21802 6019 72.39% 3.62:1
128 23213 6033 74.01% 3.85:1
FFT size 256
256 21194 7364 65.25% 2.88:1
256 22791 7412 67.48% 3.07:1
256 26552 7367 72.25% 3.60:1
256 29152 7554 74.09% 3.86:1
FFT size 512
512 23029 7639 66.83% 3.01:1
512 24542 7684 68.69% 3.19:1
512 29130 7826 73.13% 3.72:1
512 31259 7829 74.95% 3.99:1
FFT size 1024
1024 27742 9584 65.45% 2.89:1
1024 29732 9884 66.76% 3.01:1
1024 34327 9542 72.20% 3.60:1
1024 37238 9844 73.56% 3.78:1
FFT size 2048
2048 31817 11458 63.99% 2.78:1
2048 33888 11841 65.06% 2.86:1
2048 39337 11529 70.69% 3.41:1
2048 42483 11999 71.76% 3.54:1
FFT size 4096
4096 36343 14127 61.13% 2.57:1
4096 38749 14862 61.65% 2.61:1
4096 44171 13913 68.50% 3.17:1
4096 47624 14950 68.61% 3.19:1
FFT size 8192
8192 47555 19973 58.00% 2.38:1
8192 49608 19754 60.18% 2.51:1
8192 56919 19859 65.11% 2.87:1
8192 63768 19607 69.25% 3.25:1
FFT size 16384
16384 72755 48022 33.99% 1.52:1
16384 74159 46939 36.70% 1.58:1
16384 80938 47229 41.65% 1.71:1
16384 84183 46745 44.47% 1.80:1
1 run 0 failed
---- /home/respeaker/Ne10/modules/dsp/test/test_suite_fft_int32.c ----
----------test_fft_r2c_1d_int32_performance start
FFT Length C Time (micro-s) NEON Time (micro-s) Time Savings Performance Ratio
FFT size 2
2 7025 58939 -738.99% 0.12:1
2 8150 58995 -623.87% 0.14:1
2 7201 60737 -743.45% 0.12:1
2 8693 62825 -622.71% 0.14:1
FFT size 4
4 5914 9964 -68.48% 0.59:1
4 6597 10342 -56.77% 0.64:1
4 6534 10559 -61.60% 0.62:1
4 7356 10726 -45.81% 0.69:1
FFT size 8
8 5218 7174 -37.49% 0.73:1
8 5546 7259 -30.89% 0.76:1
8 6149 8337 -35.58% 0.74:1
8 6588 8250 -25.23% 0.80:1
FFT size 16
16 5468 5301 3.05% 1.03:1
16 5446 5342 1.91% 1.02:1
16 6541 6490 0.78% 1.01:1
16 6927 6490 6.31% 1.07:1
FFT size 32
32 6855 3043 55.61% 2.25:1
32 7255 2979 58.94% 2.44:1
32 8604 3164 63.23% 2.72:1
32 8898 3017 66.09% 2.95:1
FFT size 64
64 7558 3365 55.48% 2.25:1
64 8005 3356 58.08% 2.39:1
64 9632 3546 63.19% 2.72:1
64 9974 3480 65.11% 2.87:1
FFT size 128
128 9691 3975 58.98% 2.44:1
128 10317 4283 58.49% 2.41:1
128 11881 4065 65.79% 2.92:1
128 12605 4281 66.04% 2.94:1
FFT size 256
256 10434 4298 58.81% 2.43:1
256 11013 4301 60.95% 2.56:1
256 13018 4193 67.79% 3.10:1
256 13734 4386 68.06% 3.13:1
FFT size 512
512 12554 5046 59.81% 2.49:1
512 13490 4714 65.06% 2.86:1
512 15393 4808 68.77% 3.20:1
512 16515 4738 71.31% 3.49:1
FFT size 1024
1024 13453 5045 62.50% 2.67:1
1024 14372 5004 65.18% 2.87:1
1024 16653 5362 67.80% 3.11:1
1024 17795 5124 71.21% 3.47:1
FFT size 2048
2048 15827 6069 61.65% 2.61:1
2048 17186 6320 63.23% 2.72:1
2048 19285 6043 68.66% 3.19:1
2048 21107 6436 69.51% 3.28:1
FFT size 4096
4096 18265 7162 60.79% 2.55:1
4096 19292 6923 64.11% 2.79:1
4096 22077 7405 66.46% 2.98:1
4096 23635 7095 69.98% 3.33:1
FFT size 8192
8192 20425 8566 58.06% 2.38:1
8192 22125 8472 61.71% 2.61:1
8192 24288 8347 65.63% 2.91:1
8192 26080 8651 66.83% 3.01:1
FFT size 16384
16384 26763 16200 39.47% 1.65:1
16384 30048 16831 43.99% 1.79:1
16384 31783 15743 50.47% 2.02:1
16384 36077 16765 53.53% 2.15:1
1 run 0 failed
---- /home/respeaker/Ne10/modules/dsp/test/test_suite_fft_int16.c ----
----------test_fft_c2c_1d_int16_performance start
FFT Length C Time (micro-s) NEON Time (micro-s) Time Savings Performance Ratio
FFT size 2
2 6154 4518 26.58% 1.36:1
2 6169 4441 28.01% 1.39:1
2 6846 5124 25.15% 1.34:1
2 6952 5124 26.29% 1.36:1
FFT size 4
4 5930 2905 51.01% 2.04:1
4 5916 2904 50.91% 2.04:1
4 7407 3118 57.90% 2.38:1
4 7236 3118 56.91% 2.32:1
FFT size 8
8 6123 3887 36.52% 1.58:1
8 6163 3993 35.21% 1.54:1
8 8614 4017 53.37% 2.14:1
8 8605 4142 51.87% 2.08:1
FFT size 16
16 8693 3044 64.98% 2.86:1
16 8787 3044 65.36% 2.89:1
16 11169 3068 72.53% 3.64:1
16 11437 3044 73.38% 3.76:1
FFT size 32
32 9864 2505 74.60% 3.94:1
32 10105 2521 75.05% 4.01:1
32 13549 2590 80.88% 5.23:1
32 13805 2590 81.24% 5.33:1
FFT size 64
64 13194 3234 75.49% 4.08:1
64 13318 3225 75.78% 4.13:1
64 16994 3225 81.02% 5.27:1
64 17208 3225 81.26% 5.34:1
FFT size 128
128 14449 3416 76.36% 4.23:1
128 14625 3164 78.37% 4.62:1
128 19431 3231 83.37% 6.01:1
128 19693 3268 83.41% 6.03:1
FFT size 256
256 17716 4319 75.62% 4.10:1
256 17753 4031 77.29% 4.40:1
256 22821 3967 82.62% 5.75:1
256 23047 3970 82.77% 5.81:1
FFT size 512
512 19226 4081 78.77% 4.71:1
512 19305 4031 79.12% 4.79:1
512 25442 4463 82.46% 5.70:1
512 25709 4181 83.74% 6.15:1
FFT size 1024
1024 22540 4853 78.47% 4.64:1
1024 22492 4838 78.49% 4.65:1
1024 28991 4869 83.21% 5.95:1
1024 29112 4837 83.38% 6.02:1
FFT size 2048
2048 24359 4976 79.57% 4.90:1
2048 24441 4966 79.68% 4.92:1
2048 31845 5053 84.13% 6.30:1
2048 32137 5056 84.27% 6.36:1
FFT size 4096
4096 28217 6443 77.17% 4.38:1
4096 28197 6470 77.05% 4.36:1
4096 35918 6438 82.08% 5.58:1
4096 36265 6448 82.22% 5.62:1
1 run 0 failed
---- /home/respeaker/Ne10/modules/dsp/test/test_suite_fft_int16.c ----
----------test_fft_r2c_1d_int16_performance start
FFT Length C Time (micro-s) NEON Time (micro-s) Time Savings Performance Ratio
FFT size 2
2 6961 8637 -24.08% 0.81:1
2 8132 8570 -5.39% 0.95:1
2 7173 8985 -25.26% 0.80:1
2 8824 9023 -2.26% 0.98:1
FFT size 4
4 5912 7046 -19.18% 0.84:1
4 6461 6882 -6.52% 0.94:1
4 6575 7783 -18.37% 0.84:1
4 7270 7651 -5.24% 0.95:1
FFT size 8
8 5232 4775 8.73% 1.10:1
8 5488 4647 15.32% 1.18:1
8 6190 5182 16.28% 1.19:1
8 6490 5032 22.47% 1.29:1
FFT size 16
16 5414 4516 16.59% 1.20:1
16 5288 4402 16.75% 1.20:1
16 6589 4810 27.00% 1.37:1
16 6730 4709 30.03% 1.43:1
FFT size 32
32 6272 2468 60.65% 2.54:1
32 6373 2469 61.26% 2.58:1
32 7899 2538 67.87% 3.11:1
32 7923 2516 68.24% 3.15:1
FFT size 64
64 6800 2012 70.41% 3.38:1
64 6902 2034 70.53% 3.39:1
64 8938 2093 76.58% 4.27:1
64 9008 2097 76.72% 4.30:1
FFT size 128
128 8456 2289 72.93% 3.69:1
128 8478 2287 73.02% 3.71:1
128 10542 2294 78.24% 4.60:1
128 10603 2318 78.14% 4.57:1
FFT size 256
256 9049 2201 75.68% 4.11:1
256 9049 2209 75.59% 4.10:1
256 11727 2250 80.81% 5.21:1
256 11854 2292 80.66% 5.17:1
FFT size 512
512 10683 2591 75.75% 4.12:1
512 10614 2601 75.49% 4.08:1
512 13437 2600 80.65% 5.17:1
512 13466 2632 80.45% 5.12:1
FFT size 1024
1024 11429 2596 77.29% 4.40:1
1024 11441 2625 77.06% 4.36:1
1024 14731 2647 82.03% 5.57:1
1024 14794 2672 81.94% 5.54:1
FFT size 2048
2048 13073 3026 76.85% 4.32:1
2048 12992 3028 76.69% 4.29:1
2048 16571 3030 81.72% 5.47:1
2048 16513 3052 81.52% 5.41:1
FFT size 4096
4096 14054 3320 76.38% 4.23:1
4096 13995 3336 76.16% 4.20:1
4096 18096 3354 81.47% 5.40:1
4096 18050 3416 81.07% 5.28:1
1 run 0 failed
------- /home/respeaker/Ne10/modules/dsp/test/test_suite_fir.c -------
---------- test_fir_case0 start
FIR Length&Taps C Time (micro-s) NEON Time (micro-s) Time Savings Performance Ratio
32 121336 122683 -1.11% 0.99:1
3 19615 15120 22.92% 1.30:1
7 30583 30166 1.36% 1.01:1
---------- test_fir_case0 end
1 run 0 failed
-- /home/respeaker/Ne10/modules/dsp/test/test_suite_fir_decimate.c ---
---------- test_fir_decimate_case0 start
FIR Length&Taps C Time (micro-s) NEON Time (micro-s) Time Savings Performance Ratio
7 110906 20329 81.67% 5.46:1
32 78126 33713 56.85% 2.32:1
32 81494 36540 55.16% 2.23:1
---------- test_fir_decimate_case0 end
1 run 0 failed
- /home/respeaker/Ne10/modules/dsp/test/test_suite_fir_interpolate.c -
---------- test_fir_interpolate_case0 start
FIR Length&Taps C Time (micro-s) NEON Time (micro-s) Time Savings Performance Ratio
27 143740 53411 62.84% 2.69:1
32 115481 55099 52.29% 2.10:1
27 96006 50393 47.51% 1.91:1
32 111806 52286 53.24% 2.14:1
---------- test_fir_interpolate_case0 end
1 run 0 failed
--- /home/respeaker/Ne10/modules/dsp/test/test_suite_fir_lattice.c ---
---------- test_fir_lattice_case0 start
FIR Length&Taps C Time (micro-s) NEON Time (micro-s) Time Savings Performance Ratio
3 95996 40646 57.66% 2.36:1
1 13609 8638 36.53% 1.58:1
3 28357 39609 -39.68% 0.72:1
1 12932 7889 39.00% 1.64:1
---------- test_fir_lattice_case0 end
1 run 0 failed
--- /home/respeaker/Ne10/modules/dsp/test/test_suite_fir_sparse.c ----
---------- test_fir_sparse_case0 start
FIR Length&Taps C Time (micro-s) NEON Time (micro-s) Time Savings Performance Ratio
5 269209 182451 32.23% 1.48:1
5 100310 54231 45.94% 1.85:1
5 147950 114616 22.53% 1.29:1
---------- test_fir_sparse_case0 end
1 run 0 failed
------- /home/respeaker/Ne10/modules/dsp/test/test_suite_iir.c -------
---------- test_iir_lattice_case0 start
IIR Length&Taps C Time (micro-s) NEON Time (micro-s) Time Savings Performance Ratio
9 344249 360099 -4.60% 0.96:1
9 251782 312620 -24.16% 0.81:1
33 832771 747424 10.25% 1.11:1
---------- test_iir_lattice_case0 end
1 run 0 failed
============================ SEATEST v0.5 ============================
ALL TESTS PASSED
12 tests run
in 93156584 micro-s
======================================================================