-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support gather for different sizes of types on data and indices #751
Comments
I'm not sure about the
But the fact that it doesn't have any specialization for |
This is what I did to hand-optimize two cases we use at Krita: xsimd/include/xsimd/arch/xsimd_avx2.hpp Lines 350 to 369 in c7567bb
Instead of using separate batch types, I would suggest to SFINAE on the size of the index batch. |
We are recently using xsimd to make our Velox query evaluation engine portable. One of the gap we found is xsimd does not support gather for different sizes of types on data and indices. For example we have gather of int64 data with int32 indices, and this can be implemented using
__m256i
as data register and__m128i
as index register on AVX2. Is there a way to solve this? You can refer to our implementation for some idea. If you agree with our approach, we can even help integrate the implementation intoxsimd
.In our project we implemented a
HalfBatch
type that can return__m128i
on AVX2 and use it. The details can be found here: https://github.com/facebookincubator/velox/blob/main/velox/common/base/SimdUtil.h#L76-L132Our
gather
andmaskGather
implementation: https://github.com/facebookincubator/velox/blob/main/velox/common/base/SimdUtil.h#L134-L268I am happy to answer any questions you have. And thank you for creating this library, it really helps to allow us to rewrite our SIMD code in a portable and readable manner.
The text was updated successfully, but these errors were encountered: