AVX512: btl_eigen3_adv crashes with unaligned memory access

Submitted by Zvi Rackover

Assigned to Nobody

Link to original bugzilla bug (#1431)
Operating system: Linux

Description

This is happening when building with both gcc 6.1 and Clang top of trunk, which makes it likely a bug in either the Eigen library (not sure which component) or in the benchmark itself.

I used SDE[https://software.intel.com/en-us/articles/intel-software-development-emulator] to emulate AVX512.

To reproduce:

  1. Set the following CMake option to enable AVX512:
    CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG -march=skylake-avx512

  2. Run the benchmark under SDE:
    sde64 -skx -- ./btl_eigen3_adv

...

size = 196 355.661 355.661 355.661 MFlops (44/100)
size = 184 294.253 294.253 294.253 MFlops (45/100)
size = 173 244.571 244.571 244.571 MFlops (46/100)
size = 162 200.823 323.401 343.087 MFlops (47/100)
size = 152 249.855 268.765 268.765 MFlops (48/100)
size = 143 223.795 223.795 223.795 MFlops (49/100)
size = 134 184.143 246.703 250.528 MFlops (50/100)
size = 126 SDE ERROR: TID: 0 executed instruction with an unaligned memory reference to address 0x7ffc06e121a0 INSTR: 0x000412a5c: IFORM: VMOVAPS_MEMf32_MASKmskw_ZMMf32_AVX512 :: vmovaps zmmword ptr [rdx-0x140], zmm0
IMAGE: /export/iusers/zrackove/eigen/build/bench/btl/libs/eigen3/btl_eigen3_adv
FUNCTION: _ZN5Eigen8internal13gemm_pack_lhsIflNS0_22const_blas_data_mapperIflLi0EEELi48ELi16ELi0ELb0ELb0EEclEPfRKS3_llll

Blocking

#558 (closed)

Edited by Gael Guennebaud