WebGPU has compute I believe (or hopefully will) so could theoretically act as a good common API that isn’t controlled by a single vendors whims
It looks like Vulkan is going to be the best-supported common platform for compute, at least for modern hardware. They need compute in the standard to support the core graphics use case anyway, so we might as well use that same support for general-purpose tasks. On Apple platforms, MoltenVk can implement Vulkan support on top of Metal
By the way, Google also completely ignored OpenCL and came up with its own Renderscript dialect instead.
I have not tested on Apple, but I did on ARM Linux. Their HLSL to GLES GLSL translation worked OK for my purposes. In the documentation they say they support most of them for both graphics and compute, VK and Metal included.
- A CUDA implementation, if the host uses CUDA
- A Metal implementation, for Apple
- An OpenCL implementation
- A fallback CPU-based implementation
- You don't need a DirectCompute implementation, because thankfully no one is idiotic enough to use it.
- You don't need a Vulkan implementation, because no one is doing compute on Vulkan (afaik).
The state of graphics and compute APIs is utter insanity. Especially Apple can go fuck off and die with their extremely moronic move of introducing OpenCL as an open standard in '09 and then presenting Metal as their closed API in '14, moving against OpenCL, OpenGL and Vulkan. nVidia at least has the excuse they were first to market with CUDA (and it's easier to program), and they stuck to it.
[1] THE standard for video effects, think "VST, but better and for video".