simde
simde copied to clipboard
porting @Microsoft SPTAG (with native aliases enabled): missing `__mmask32 __mmask64 _mm512_setzero_ps _mm512_cvtepi32_ps _mm512_extractf32x8_ps _mm512_cmpgt_epi16_mask`
While porting @Microsoft SPTAG to use SIMDe (with native aliases enabled), I found that there are several missing functions/definitions. As suggested in the README.md
I am reporting them here for prioritisation. There are some missing native aliases and missing variants of existing functions:
-
simde_
variants defined but not native aliases:__mmask32 __mmask64 _mm512_setzero_ps
-
_mm512_cvtepi32_ps
: missing but_mm512_cvtepu32_ps
exists -
_mm512_extractf32x8_ps
: missing but_mm512_extractf32x4_ps
exists -
_mm512_cmpgt_epi16_mask
: missing but_mm512_cmpgt_epi8_mask
exists
I need the native aliases because @Microsoft requires signing a CLA, so I won't be submitting a pull request, so I want my patch to be relatively compatible with any changes that are made upstream to the intrinsics.
Hi we need it for debian side packaging...
Thanks for the report. There is a guide to adding new instructions at https://github.com/simd-everywhere/simde/wiki/Implementing-a-New-Function
Update: _mm512_setzero_ps now exists since commit c900d5e195c4692e0f6b1c3ad8e18e577cf55e11
ping ?
Hello @bastien-roucaries There is a guide to adding new instructions at https://github.com/simd-everywhere/simde/wiki/Implementing-a-New-Function
Please let me know if you want assistance with working on this issue, I would be happy to help!
@pabs3 Did you see that simde__mmask32
, simde__mmask64
, and simde_mm512_setzero_ps
are implemented?
@mr-c this issue isn't fully completed because the native aliases __mmask32
and __mmask64
don't exist.
I note that the __mmask8
and __mmask16
native aliases do exist though.
Thanks for implementing _mm512_cvtepi32_ps
, _mm512_extractf32x8_ps
, _mm512_cmpgt_epi16_mask
in commit bf1fbae
and thanks to @EleonoreMizo for adding _mm512_setzero_ps
in commit c900d5e.
@mr-c this issue isn't fully completed because the native aliases
__mmask32
and__mmask64
don't exist. I note that the__mmask8
and__mmask16
native aliases do exist though.
Whoops I misunderstood. Did you see the note about those types in https://github.com/simd-everywhere/simde/blob/8b4e375340e7c9f898c884cd1b09ecfb946a6d76/simde/x86/avx512/types.h#L501-L514
If there is a specific compiler version / architecture combination that you are using, and for which you need the native types defined, I think that would be straightforward to add
I did see that note, it sounds complicated.
When I was testing this I was on Debian bookworm amd64 with GCC 12. My intention was to enable porting SPTAG from amd64 to all of the Debian architectures, probably starting with arm64. Since bookworm is in the freeze, this will likely be something for trixie.
In that situation #define __mmask32 simde__mmask32
was enough to workaround __mmask32
being missing. Likewise for __mmask64
. See the link to the SPTAG patch above.
PS: since you are the Debian maintainer of simde too, an upload to Debian experimental would be appreciated so I can work on this further.
Sure, I can upload https://github.com/simd-everywhere/simde/releases/tag/v0.7.4-rc3 to Debian experimental, but it won't have all of the new functions you need; however you could copy them from https://github.com/simd-everywhere/simde/commit/bf1fbae1d28ad88e958b80075f2175d4f30e6c55
Maybe wait until that commit has entered a release candidate.
@pabs3 done: https://tracker.debian.org/news/1430405/accepted-simde-074rc4-0exp-source-into-experimental/
This bug should still be open because of the native aliases for __mmask32 and __mmask64 are probably still missing?
Thanks for the upload though, I'll be able to work on SPTAG now by adding some defines for __mmask32 and __mmask64.
-- bye, pabs
https://bonedaddy.net/pabs3/
@pabs3 I'm testing https://github.com/simd-everywhere/simde/commit/d850b8399ee8c592d454948e48f966eeb8a31c7b to provide __mask32
and __mask64
now
@pabs3 https://github.com/simd-everywhere/simde/commit/d850b8399ee8c592d454948e48f966eeb8a31c7b has been merged! It'll be in the next rc snapshot (perhaps that will be the real release of 0.7.4 ??)
Excellent, thanks!
@mr-c BTW, I noticed on the staging branch you added @Pabs as a bug/code contributor but I can't find any contributions from them.
If you meant to attribute me, my GitHub account is @pabs3 and I did not contribute any patches to SIMDe so the entry should read bugs only.
-- bye, pabs
https://bonedaddy.net/pabs3/
@pabs3 whoops, that was my mistake; I've queued up a fix