Skip to content

Adding support upstream in PIL #155

@kdschlosser

Description

@kdschlosser

I know this has been asked more than once already. I am not asking really, instead I am providing solutions to the hurdles that have been mentioned..

Runtime detection of AVX* and SSE*
https://github.com/robbmcleod/cpufeature

Compiling for Windows using setuptools made easy. Setuptools is pretty handicapped when it comes to compiling c extensions under Windows. The repo below fixes that problem.

https://github.com/kdschlosser/python_msvc

Handling compile times is also not a hard thing to deal with. I am not sure how the build system currently works with this library or with the PIL library but from what it sounds like is setuptools is being used and if that is the case it is going to compile really slow due to it only compiling using a single core. It is pretty easy to subclass and wrap the classes in setup tools that are used for compiling C extensions and make the changes needed that allow all cores to be used when compiling.. Depending on the machine doing the compiling it can speed it up by a very large amount. Most CI's see compile times cut by about 50% usually. It can be more depending on the number of cores that are allocated.

3 extension modules can be compiled and packaged into a wheel. Using that library that I linked to it is possible to detect what the CPU supports at runtime and that will determine what extension module gets imported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions