Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 18 Apr 2015 21:08:08 +0800
From: Lei Zhang <>
Subject: Re: AVX512 support detection

> On Apr 18, 2015, at 7:48 PM, magnum <> wrote:
> On 2015-04-18 13:33, magnum wrote:
>> Oh, and I think these too are not found in MIC (not even _epi32) and
>> maybe not even for AVX512:
>> _mm512_cmpeq_epi32
>> _mm512_cmpeq_epi8
>> A recent change to wordlist.c needs vcmpeq_epi8() so I guess we should
>> emulate it, or perhaps drop __MIC__ and maybe __AVX512__ from that code.
> It looks like _mm512_cmp_epi8_mask() in AVX512BW will emulate
> _mm512_cmpeq_epi8 nicely while _mm512_cmp_epi32_mask exist on MIC but
> not AVX512?

_mm512_cmp_epi32_mask exists on both MIC and AVX512, while _mm512_cmp_epi8/16/64_mask are only available on AVX512. Actually, it seems that any intrinsics with a "epi8" or "epi16" in its name are in the AVX512BW territory, thus not available on MIC. Some intrinsics with "epi64", like _mm512_add_epi64, are not available on MIC either.

I think there's no need to emulate vcmpeq_epi8 with _mm512_cmp_epi8_mask,  which will introduce unnecessary overhead. In cases where vcmpeq_epi8 is needed, we can replace it with proper use of _mm512_cmp_epi8_mask. I've already done the same when implementing vtesteq_epi32, although with epi32 instead of epi8.

BTW, to make use of _mm512_cmp_epi8_mask, we also need some converting function to convert the result(__mask64) to a normal integer. There is a _mm512_mask2int intrinsic on MIC, that converts a __mmask16 to an integer. But I can't find some intrinsics from Intel's intrinsics guide that can handle __mmask32 or __mmask64. Even _mm512_mask2int is listed to be available on MIC only. The current intrinsics guide might be somehow incomplete yet.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.