Skip to content
This repository was archived by the owner on Jul 29, 2022. It is now read-only.

Use SIMD version of Pillow #53

Closed
kkopachev opened this issue Nov 16, 2016 · 4 comments
Closed

Use SIMD version of Pillow #53

kkopachev opened this issue Nov 16, 2016 · 4 comments

Comments

@kkopachev
Copy link
Contributor

https://github.com/uploadcare/pillow-simd/ I have being using that for a few days now and seems to be working correctly. Not sure how much savings it brings, but theoretically there should be some.
What do you think?

@eduherraiz
Copy link
Member

Great to know! Thanks for sharing.
I'm not sure about include it in the main image, but I'm thinking to create a special image version "thumbor-smid". I'll try to do it in the next release.

@kkopachev
Copy link
Contributor Author

That's part of my Dockerfile:

RUN pip uninstall -y pillow

# could use "avx2" if target cpu supports
ARG SIMD_LEVEL=sse4
RUN CC="cc -m$SIMD_LEVEL" pip install --no-cache-dir -U --force-reinstall pillow-simd

By default it uses sse4 instructions, but possible to build it with --build-arg SIMD_LEVEL=avx2. So then you'll have to have 2 built docker images.

@eduherraiz
Copy link
Member

For the moment we can use a custom builds and tags for simd pillow versions:

apsl/thumbor:latest-simd-sse4
apsl/thumbor:latest-simd-avx2
apsl/thumbor-multiprocess:latest-simd-sse4
apsl/thumbor-multiprocess:latest-simd-avx2

Or see the tags for a version in:
https://hub.docker.com/r/apsl/thumbor/tags/
https://hub.docker.com/r/apsl/thumbor-multiprocess/tags/

I'll do more tests comparing differents pillow versions and add a few detail in doc.

@homm
Copy link

homm commented Jan 8, 2017

I'll do more tests comparing different pillow versions

You can check this page with lots of benchmarks (and give some feedback about page itself)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants