pyopencl icon indicating copy to clipboard operation
pyopencl copied to clipboard

pocl Support

Open big-c-note opened this issue 5 years ago • 6 comments

Does pyopencl on pypi support pocl installation? I am trying to avoid conda if possible. Thank you!

From the docs: https://documen.tician.de/pyopencl/misc.html#installing-from-pypi-with-linux-wheels

On Linux, Ubuntu 20.04 if it matters

To install pyopencl with pocl, a CPU based implementation do,

pip install pyopencl[pocl]

pip3 install pyopencl[pocl] produces error:

no matches found: pyopencl[pocl]

big-c-note avatar Nov 21 '20 21:11 big-c-note

Works fine when building from source: https://gitlab.tiker.net/inducer/pyopencl/-/jobs/194730

I don't have the spare bandwidth to engineer the wheel build to do Pypy wheels. I've turned on PR builds on Travis. If you'd like to hack the Travis config to build these, I'd be happy to consider a PR.

inducer avatar Nov 22 '20 01:11 inducer

Thanks for the offer. Do you think this would add value to pyopencl?

big-c-note avatar Nov 22 '20 04:11 big-c-note

On Sat, 21 Nov 2020 20:02:00 -0800 Colin Manko [email protected] wrote:

Thanks for the offer. Do you think this would add value to pyopencl?

From a PyOpenCL user, this would definitely help. For now, we are using the former intel ICD which used to works fairly well to test on CPU. https://github.com/silx-kit/silx/blob/master/ci/intel_opencl_icd.sh

Having PoCL available by default would avoid testing with an unmaintained driver.

kif avatar Nov 22 '20 09:11 kif

Hey @kif , I don't fully understand the opencl ecosystem yet, so forgive me I might not see your issue. But, why don't you build pocl from source? https://github.com/pocl/pocl

big-c-note avatar Nov 22 '20 19:11 big-c-note

@kif Two minor clarifications.

  • Intel is still producing releases for their ICD. They're a bit hidden, but they exist. The most recent release is in the oclcpuexp tarball in this releasel: https://github.com/intel/llvm/releases/tag/2020-WW45. Note: I had to set $LD_LIBRARY_PATH to keep the runtime from picking up TBB from my distribution, otherwise all you get is segfaults.
  • This issue is about pypy+pocl. If you want cpython+pocl installed from wheels, you can already simply say pip install pyopencl[pocl] as @big-c-note mentioned.

@big-c-note https://pypi.org/project/pocl-binary-distribution/ should work with pypy just fine in principle. There are no Python-specific bits in it.

inducer avatar Nov 22 '20 19:11 inducer

@inducer, thanks for pointing me to the intel driver. Their former driver was OK for all our test suite while pocl isn't OK yet. I am happy pocl improves gradually as it is currently the only way to access Nvidia GPUs via OpenCL on ARM&Power computers.

And sorry again for the noise, I thought it was about PyPI (the package repository) and not PyPy (the Python implementation).

kif avatar Nov 23 '20 07:11 kif