Is it able to use OpenGL ComputeShader to replace CUDA at not-NVIDIA device? or what can be used to replace CUDA?

is it able to use OpenGL ComputeShader to replace CUDA at not-NVIDIA device? or what can be used to replace CUDA?
Thanks!

have you had a look at OpenCL?

1 Like

openCL is able to totoally replace CUDA? and able to work with OpenGL, metal?
Thanks!

On a non-NVIDIA device, your choices are basically:

  1. OpenCL or
  2. Compute Shader (… in whatever graphics API you’re using (OpenGL, Vulkan, etc.))

You’re just going to need to do a mapping from the list of compute features you need and each of these to see which one is best for you.

Don’t forget synchronization with OpenCL. IIRC, special CL and GL extensions are required in the OpenCL and OpenGL implementations, respectively, to efficiently alternate back-and-forth between OpenCL and OpenGL execution. IIRC, that’s ARB_cl_event / cl_khr_gl_event.

On-the-other-hand, this efficient alternation between compute and graphics is going to be built-in and working by-default with a Compute Shader in the graphics library you’re using. No special graphics or compute extensions required.

So if both OpenCL and Compute Shader have what you need, I’d probably just opt for the Compute Shader.

I’d think that staying within just the graphics API is more likely to be supported by the GPU debugging and profiling tools you’d be using as well. But you can check that.

1 Like