Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an alternative to OpenCL+PyOpenCL for multiplatform GPGPU compute?

Support for OpenCL on Macs is going to end in macOS 10.15, so people invested in PyOpenCL+OpenCL as a means for doing general-purpose GPU (+CPU) compute will soon start to lose a key platform.

So my questions are:

  1. Are there any viable multiplatform GPGPU-compute alternatives to PyOpenCL+OpenCL on the horizon?
  2. Would Vulkan with a Python wrapper be a possibility?
like image 467
Colin Stark Avatar asked Jul 09 '18 04:07

Colin Stark


1 Answers

(This answer contains some practical suggestions laced with opinion and personal guesses. I'm happy to edit this answer based on comments received if some of this is considered improper here.)

My view is that the CL implementations available on macOS have always been nearly useless by how buggy they were. CL as a low-level compute abstraction on the other hand is fine IMO--its concepts still represent what happens in the hardware fairly well. I.e. whatever the next abstraction is that comes along, a subset of CL can probably be mapped to it. For example, POCL is already a more competent CPU CL implementation on macOS than Apple's ever was. (See here for installation instructions.) For GPUs, POCL has a CUDA backend that's not immensely great just yet, but with a little help, it could be what's need so that the GPU compute world can stop worrying about API churn and get back to solving actual problems.

like image 127
Andreas Klöckner Avatar answered Oct 13 '22 22:10

Andreas Klöckner