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

How to get known which optimisations are used ? #7

Open
socketpair opened this issue Jul 11, 2016 · 4 comments
Open

How to get known which optimisations are used ? #7

socketpair opened this issue Jul 11, 2016 · 4 comments

Comments

@socketpair
Copy link

socketpair commented Jul 11, 2016

I just executed command pip3 install Pillow-SIMD.
Now, my thumbnailer works right.

Question: How I can know which SIMD operations sets are really used ?

I did not notice speedup...

@homm
Copy link

homm commented Jul 11, 2016

See installation section. By default SSE4 is used.

I did not notice speedup...

Could you show the code?

@homm
Copy link

homm commented Jul 11, 2016

You can ensure that SIMD version is installed:

$ python -c "from PIL import Image; print(Image.PILLOW_VERSION)"
3.2.0.post3

If PILLOW_VERSION has postfix, it is SIMD.

@socketpair
Copy link
Author

socketpair commented Jul 12, 2016

  1. code just creates thumbnails and nothing more.
  2. Yes, I have installed SIMD version, I have checked.
  3. I will measure performance.

It will be nice if I have Python API to get actual optimisation level. i.e.
PIL.get_SIMD_level() returning one of, 'Vanilla', 'SSE4', 'SSE4+AVX2'. Or, in Python 3, Enum instead of strings.

@adyomin
Copy link

adyomin commented Aug 11, 2020

$ python -c "from PIL import Image; print(Image.PILLOW_VERSION)"

This does not work with 7.0.0.post3, but might work with some future versions, because of the constant depreciation iterations:

PILLOW_VERSION has been deprecated and will be removed in a future release. Use __version__ instead.
It was initially removed in Pillow 7.0.0, but brought back in 7.1.0 to give projects more time to upgrade.

This should work:

$ python -c "from PIL import Image; print(Image.__version__)"

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