Alignment in small integral types for AVX512 and MIC
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)
-
reporter -
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!
-
-
assigned issue to
-
assigned issue to
-
- changed status to open
-
- changed status to resolved
The problem with the
AlignmentOf
type trait for 8-bit and 16-bit integral data types has been resolved. With commit c67b7cf theAlignmentOf
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.
- Log in to comment
Let me add a quick note: I think there aren't SIMD tests for (u)char, are there?