Alignment in small integral types for AVX512 and MIC

Issue #119 resolved
Jannik Schürg created an issue

Hi Klaus,

I noticed a bug in the alignment of 8bit and 16bit integral types. Let's look at the example when we have AVX512F but not AVX512DQ. In this case AVX2 is used for 8bit and 16bit integral types. So for example in StaticMatrix nextMultiple(N, SIMDSIZE) is used to get the row size for padding. But in the tests AlignmentOf<T>::value is expected, which is 64. A similar problem might occur for MIC, which I can not test (compiler errors, something with stdlib issues). In this case is SIMDSIZE one.

I used Intel's emulator for testing AVX512 in several combinations.

Obvious questions: Should the AlignmentOf<T>::value be used for the padding? Is it always equal to the number of bytes in vector register or possibly larger? When 512bit are degraded to 256bit, should 64 byte or 32 byte be used?

King regards,

Jannik

Comments (5)

  1. Klaus Iglberger

    Hi Jannik!

    I can confirm that there is a discrepancy between the library code and the test expectations. I will try to fix this as quickly as possible.

    You are correct, there are currently no SIMD tests for 8-bit integral types. They will be added with the next push to the repository.

    Best regards,

    Klaus!

  2. Klaus Iglberger

    The problem with the AlignmentOf type trait for 8-bit and 16-bit integral data types has been resolved. With commit c67b7cf the AlignmentOf type trait has been updated to take the availability of SIMD operations for a particular data type into account. With this it is now in sync with the SIMD types.

    The fix is immediately available via cloning the Blaze repository and will be officially released in Blaze 3.2.

  3. Log in to comment