Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
1058 Discussions

How to load usigned char to __m512i on KNL

Zekun_Y_
Beginner
249 Views

How can I load the unsigned char to a __m512i vector on KNL?

I can't find the similar instrinsic like extload(I use extload on KNC) on KNL. On the other hand the AVX512-BW is not supported on KNL as well, so I can't use  _mm512_mask_load_epi8 to load a uint8. Is there anyway could load the unsigned char efficiently to a __m512i?

Thank you

0 Kudos
1 Solution
andysem
New Contributor III
249 Views

I guess you can load 16 bytes into __m128i and then use _mm512_cvtepi8_epi32/_mm512_cvtepu8_epi32 to convert the bytes to 32-bit integers for processing. AVX-512F does not support operating on 8-bit integers directly.

View solution in original post

2 Replies
andysem
New Contributor III
250 Views

I guess you can load 16 bytes into __m128i and then use _mm512_cvtepi8_epi32/_mm512_cvtepu8_epi32 to convert the bytes to 32-bit integers for processing. AVX-512F does not support operating on 8-bit integers directly.

Zekun_Y_
Beginner
249 Views

I just tested it. It seems working well.

Thank you very much!

andysem wrote:

I guess you can load 16 bytes into __m128i and then use _mm512_cvtepi8_epi32/_mm512_cvtepu8_epi32 to convert the bytes to 32-bit integers for processing. AVX-512F does not support operating on 8-bit integers directly.

Reply