Skip to content
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

Check out libsimdpp, it should help supporting multiple platforms #3

Closed
p12tic opened this issue May 13, 2016 · 4 comments
Closed

Check out libsimdpp, it should help supporting multiple platforms #3

p12tic opened this issue May 13, 2016 · 4 comments

Comments

@p12tic
Copy link

p12tic commented May 13, 2016

Hi, just noticed this new SIMDified library in development through a Hacker News post. If cross-platform SIMD support is among your objectives, I think you should check out libsimdpp (https://github.com/p12tic/libsimdpp). It allows you to write the SIMD code once, then compile it for different instruction sets, combine the resulting object files into single library and then dispatch depending on the actual CPU type on runtime. For relatively simple code such as image processing such multi-platform support would be straightforward. At the moment libsimdpp already supports the most popular SIMD instruction sets: SSE2 to SSE4.1, XOP, AVX, AVX2, AVX512F, NEON and Altivec, with AVX512BW/DQ, MIPS MSA and POWER7/8 VSX support being in development.

Disclosure: I'm the author of libsimdpp.

@funny-falcon
Copy link

Other possible approach https://gcc.gnu.org/wiki/FunctionMultiVersioning
(looks to be working with clang as well)

@p12tic
Copy link
Author

p12tic commented May 24, 2016

Unfortunately this only solves dynamic dispatch problem and simplifies infrastructure for multiple instruction set support. The fact that one needs to use different SIMD instructions for each instruction set is not addressed.

@funny-falcon
Copy link

@p12tic you are right. But lets authors decide.

And Pillow is written in C.

@homm
Copy link

homm commented Jul 3, 2016

Sorry, I don't believe that is possible to rewrite some complicated parts on the higher level and keep original performance. For example, in the next release, I'm going to heavily use _mm_madd_epi16 intrinsic. I haven't found it in libsimdpp. But you always can change my mind by showing the way.

Also, as @funny-falcon said, Pillow and whole Python toolchain is written is C. I'm not sure if it possible to use C++ and also I don't familiar with it at all.

@homm homm closed this as completed Jul 3, 2016
homm pushed a commit that referenced this issue Jun 29, 2019
Added PNM to the list of PPM files
radarhere pushed a commit that referenced this issue Nov 3, 2020
Co-authored-by: nulano <nulano@nulano.eu>
Dawars pushed a commit to Dawars/pillow-simd that referenced this issue Mar 12, 2023
Do not install NumPy on Python 3.11

So that's how I was supposed to resolve that merge conflict.  Thank you.
Dawars pushed a commit to Dawars/pillow-simd that referenced this issue Mar 12, 2023
Optimise palettes with more than 128 colors
Dawars pushed a commit to Dawars/pillow-simd that referenced this issue Mar 12, 2023
Restored unimplemented DXGI format test
Dawars pushed a commit to Dawars/pillow-simd that referenced this issue Mar 12, 2023
scyclops pushed a commit to scyclops/pillow-simd that referenced this issue May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants