google / gemmlowp

Low-precision matrix multiplication

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

core dump in the neon-gemm-kernel-benchmark.cc.

liyancas opened this issue · comments

Hardware: NVidia TX 2
OS: Ubuntu 16.04
GCC: 5.40
compile flag: -std=c++11 -O3

error message:
:~/workspace/test/test_neon$ ./bench_mm
kernel,Gop/s
Arithmetic error in kernel:
NEON_64bit_GEMM_Int425Operands
Wrong accumulator for depth=32, at l = 1, r = 0
reference value: -47
actual value: -94
Aborted (core dumped)

I was not able to reproduce this on Pixel 2 but I did find a bug with the 7bit and 4bit kernels. Fix is here: #139 . Let me know if this helps.

Also, the TX2 has 2 types of CPU cores: NVIDIA Denver2, and ARM Cortex-A57. If the issue persists after Marie's fix, it would be interesting to hear if the issue occurs specifically on one type of core. If the 'taskset' program is available on the TX2, you can use it to run a program on a specific core, e.g. taskset 0f /the/program where 0f can be any hexadecimal mask where each bit represents a CPU core.

@mariecwhite @bjacob
Recently I tested the code again on OnePlus 5T. I found there was still an issue in the NEON_64bit_GEMM_Int425Operands function, and the actual value was not fixed (254 vs. 172 vs. 83).

first execution:
134|OnePlus5:/data/local/tmp $ ./bench_int
Arithmetic error in kernel:
NEON_64bit_GEMM_Int425Operands
Wrong accumulator for depth=96, at l = 0, r = 0
reference value: 73
actual value: 254

second time:
134|OnePlus5:/data/local/tmp $ ./bench_int
kernel,depth,Gop/s
Arithmetic error in kernel:
NEON_64bit_GEMM_Int425Operands
Wrong accumulator for depth=96, at l = 0, r = 0
reference value: 73
actual value: 172
Aborted

third time:
134|OnePlus5:/data/local/tmp $ ./bench_int
kernel,depth,Gop/s
Arithmetic error in kernel:
NEON_64bit_GEMM_Int425Operands
Wrong accumulator for depth=96, at l = 0, r = 0
reference value: 73
actual value: 83
Aborted

I have the same error on an A53:
root@xxxxxx:~# ./benchmark
kernel,Gop/s
Arithmetic error in kernel:
NEON_64bit_GEMM_Int425Operands
Wrong accumulator for depth=32, at l = 0, r = 0
reference value: 15
actual value: -64
Aborted (core dumped)

hit the same issue as @hariharan-m on my Lenovo Yoga C630 with Linux on it - built with both top of master clang and gcc 10.2.1