google / gemmlowp

Low-precision matrix multiplication
Apache License 2.0
1.78k stars 451 forks source link

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

Open liyancas opened 6 years ago

liyancas commented 6 years ago

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)

mariecwhite commented 6 years ago

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: https://github.com/google/gemmlowp/pull/139 . Let me know if this helps.

bjacob commented 6 years ago

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.

liyancas commented 5 years ago

@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

hariharan-m commented 4 years ago

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)

powderluv commented 3 years ago

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