OpenCL deprecated on Mojave?

Maybe we had that discussion, but I missed it… OpenCL is with Mojave deprecated on Macos. Do we have any plan what to do about that? Will there be an adapter library at some point which glues Metal (which what they suggest now) to OpenCL?

We havent discussed this, at least not that I am aware. Mojave actually doesnt support any GPU computation as of now, except if you work with Metal2. Due to the mexican-standoff with NVIDIA, Mojave also doesnt support CUDA or even NVIDIA GPUs for graphics. Adobe is also not happy about this, they are among companies that have invested the most in OpenCL in terms of soft. developed.

The best anwser I have is that you will be able to run OpenCL on top of Vulkan (that you can run on Mojave). This is more or less based on this reply of the Khronos President (also a VP at NVIDIA). Its not on this exact topic but basically this quote:

(and yes - we are thinking about OpenCL over Vulkan over Metal - it should work - but early days).

It sounds bad but its sill better than no support like CUDA. Maybe? :/ I dont think Metal will ever become the GPGPU standard, having no support for double, long, etc. scares me to no end.

If not before, more will be known in May at IWOCL (sadly in Boston this year) which is where the KhronosGroup and everyone else usually do their OpenCL/GL/Vulkan/etc… announcements.

2 Likes

A semi-related follow up on this: https://www.khronos.org/blog/new-and-enhanced-opencl-open-source-tools-resources

Also OpenCL C and C++ for OpenCL in Clang sounds fun.

Maybe this additional question fits well into the thread.

With the new Apple M1 MAX processors available just now there seems to be more performant hardware available (maybe with some headroom in the future too). Also there seems to be a lot of capable silicon in this processors in the form of specialized areas and a reasonable GPU.

I followed the links posted so far, but I am not able to really assess by myself how far/realistic a support from stan really is…

How high do you see the chances that stan will one day use the GPU other specialized chips on the Apple M1 via Metal (or another construct) for computation? THX!

1 Like

Have you tried POCL?

wrt metal, no I don’t see us writing a metal backend (idt metal even supports double precision floating point which Stan uses on the backend so it just wouldn’t work)

1 Like

Thanks for the prognosis and the hint to this project! POCL on Metal seems possible, but not implemented (yet): POCL and OSX Metal · Issue #966 · pocl/pocl · GitHub