-
Notifications
You must be signed in to change notification settings - Fork 295
Open
Description
Hi XSIMD development team,
Thanks for maintaining such a great package.
I believe I’ve found a bug in the AVX-512F swizzle implementation: detail::is_cross_lane appears to return the wrong result on both master and release 14.
For example, with the swizzle mask:
3 2 1 0 7 6 5 4
the logic at
xsimd/include/xsimd/arch/xsimd_avx512f.hpp
Line 2376 in a03a5d9
| XSIMD_IF_CONSTEXPR(!detail::is_cross_lane(mask)) |
evaluates detail::is_cross_lane(...) as true and takes the _mm512_permute_pd(self, imm) path. However, _mm512_permute_pd only permutes within 128-bit lanes, so it is not valid for a mask like 3 2 1 0 7 6 5 4, which requires a cross-128-bit-lane permutation.
This code path is triggered when the built-in shuffle is not available, falling back through the implementation here:
| #else |
Thanks.
Metadata
Metadata
Assignees
Labels
No labels