I am writing to solicit some feedback on what seems likely to become the
'next generation' of PyOpenCL:
This branch switches to pybind11 for its C wrapping needs, and, in many
ways, is a revival of the old Boost.Python code base, though without any
of the Boost requirements. All that's needed is a reasonably recent C++
Why do this, you ask? Smaller code base (by about 1500 lines), faster
(by around 2x, especially in tight kernel-calling loops!), more reliable
(especially in handling errors and Ctrl+C, cf ), simpler and more fun
to hack (subjective, admittedly). I do envision continuing to support
Pypy, although building on Pypy is currently broken because of a few
direct uses of the numpy interface from C. I think this should be
fixable without too much fuss.
There are no changes to the external interface--the tests from 2018.1
pass unmodified. All of my own workloads run without modification. Some
changes *have* been made to continue the process of adapting to OpenCL 2.
You may install directly using:
pip install git+https://github.com/inducer/pyopencl@pybind11
You may need to
pip install pybind11
in order for that to succeed.
Some notes and CI results are here:
If all goes as planned, this branch will at some point turn into version
2018.2 of PyOpenCL.
Please test this against your workloads and report any issues. Also, if
you have any feedback, please do speak up.