On Tue, 22 Jun 2021 22:04:22 +0200
"Sebastian M. Ernst" <
er...@pleiszenburg.de> wrote:
> Hi all,
>
> digging through the archives of this mailing lists and plenty of code
> online, it appears that many people use SIMD intrinsics in Cython, i.e.
> `x86intrin.h` and friends, just like one would do in plain C.
> Apparently, this practice is frowned upon in certain circles because it
> is specific to x86 and can not (easily at least) be ported to other
> architectures. If x86 is the target architecture that one is optimizing
> for exclusively, one could stick to intrinsics and be ok. However, I am
> seeing more and more ARM popping up, also in HPC arena. RISC is on the
> horizon, too. In this context, the commonly recommended approach is to
> go for something more portable like GCC's vector extensions [2]. I have
> yet not managed to find Cython code which is going down this particular
> path - could be for technical reasons (?) or simply me not looking in
> the right places.
>
> What is the canonical approach in Cython - if there is any?
I use PyOpenCL when small vectors are needed for performances ... with a CPU driver (intel or PoCL)