Opened 5 weeks ago

Closed 5 weeks ago

#6766 closed defect (fixed)

checkasm-float_dsp test fails on 32-bit ARM with AArch64 processor

Reported by: jcowgill Owned by:
Priority: important Component: avutil
Version: git-master Keywords: regression
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

The VFP optimizations run as part of the "checkasm-float_dsp" test fail on ARM if run on an AArch64 processor (in aarch32 emulation mode). I think this happens because the optimizations try to enter VFP SIMD mode which is no longer supported on AArch64. Probably these optimization should be disabled when run this way.

(sid_armhf-dchroot)jcowgill@amdahl:~/FFmpeg$ uname -a
Linux amdahl 4.9.0-4-arm64 #1 SMP Debian 4.9.51-1 (2017-09-28) armv8l GNU/Linux
(sid_armhf-dchroot)jcowgill@amdahl:~/FFmpeg$ make V=1 fate-checkasm-float_dsp
TEST    checkasm-float_dsp
./tests/fate-run.sh fate-checkasm-float_dsp "" "" "/home/jcowgill/FFmpeg" 'run tests/checkasm/checkasm --test=float_dsp' 'null' '' '' '1' '' '' '' '' '' '' '' '' ''
 /home/jcowgill/FFmpeg/tests/checkasm/checkasm --test=float_dsp
Test checkasm-float_dsp failed. Look at tests/data/fate/checkasm-float_dsp.err for details.
checkasm: using random seed 3323294288
1: -8.802694320679 - -1.444978237152 = -7.35771608353
VFP:
   vector_fmul_vfp (float_dsp.c:57)
1: -74.078414916992 - -0.000003019151 = -74.078414917
   vector_fmul_window_vfp (float_dsp.c:124)
 - float_dsp.vector_fmul         [FAILED]
1:  5.074844360352 -  0.000000000000 =  5.07484436035
1: -0.439747571945 - -0.000003019151 = -0.439744561911
   butterflies_float_vfp (float_dsp.c:228)
 - float_dsp.butterflies_float   [FAILED]
NEON:
 - float_dsp.vector_fmul         [OK]
 - float_dsp.vector_fmac         [OK]
 - float_dsp.butterflies_float   [OK]
 - float_dsp.scalarproduct_float [OK]
checkasm: 3 of 12 tests have failed
tests/Makefile:227: recipe for target 'fate-checkasm-float_dsp' failed
make: *** [fate-checkasm-float_dsp] Error 1

Change History (7)

comment:1 Changed 5 weeks ago by cehoyos

  • Priority changed from normal to important

Could you confirm that it also fails with 5b10f484?
I assume that make libavutil/float_dsp-test && libavutil/float_dsp-test works for that version, do you know why?

comment:2 Changed 5 weeks ago by jcowgill

Yes it fails with 5b10f484

Running libavutil/tests/float_dsp passes, but appears to execute no tests. It outputs only:

(sid_armhf-dchroot)jcowgill@amdahl:~/FFmpeg$ libavutil/tests/float_dsp
float_dsp-test: random seed 3205561507

comment:3 Changed 5 weeks ago by cehoyos

$ libavutil/tests/float_dsp ; echo $?

The question is why "porting" a test changes its result.

comment:4 Changed 5 weeks ago by jcowgill

I think in the old float_dsp test, only the "best" asssembly for the current processor was tested, whereas in checkasm all variations are tested. On AArch64, VFP is never the "best" because NEON will always be present, so I don't think VFP was ever being tested on AArch64 before the test was ported to checkasm.

comment:5 Changed 5 weeks ago by cehoyos

Please test this patch although I am not sure if it fixes the issue, cpu test shows "vfpv3" on Debian logs:
https://lists.libav.org/pipermail/libav-devel/2017-October/085194.html

comment:6 Changed 5 weeks ago by jcowgill

Yes that patch seems to fix it.

comment:7 Changed 5 weeks ago by cehoyos

  • Keywords regression added
  • Resolution set to fixed
  • Status changed from new to closed

Applied as f1fd12ef858cf7efe843aa3063894a11b2d1e7d5, thank you for the testing!

Note: See TracTickets for help on using tickets.