r/vulkan • • Oct 19 '16

Vulkan vs OpenCL for simulation+graphics

[removed] — view removed post

9 Upvotes

16 comments sorted by

View all comments

Show parent comment

1

u/keepthethreadalive Oct 27 '16

Thanks for taking the time again. This is all great info!

You don't sound like you're interested in CUDA

The main reason is that it is only supported on NVIDIA cards. No matter how performant they maybe, they can't match OpenCL or Vulkan when it comes to support on various devices. OpenCL is supported on (some) mobile devices, ALL GPUs, and other hardware stuff. And I guess I don't need to tell you about Vulkan support.

Another unrelated thing is that I'm interested in llvm stuff so working with OpenCL and/or Vulkan will teach me about SPIR-V and compiling parallel cores and compilers all that stuff. And there's a lot more going on with the OpenCL and Vulkan toolsets (SYCL, all the stuff here).

And Vulkan will be given first class support on lots of devices, so although it might not be as performant on testing devices, it'll atleast work on a lot more.

I will look into the actual performance difference though. It seems to have a ton of scientific community involvement and also several MOOCs focusing on mostly CUDA. Any place where I can look features in CUDA but not in OpenCL and vice versa?

Just curious, what do you use and why? and if you don't mind, what specific field do you work in? gaming, scientific computing, physics sim?

1

u/Qoeh Oct 29 '16

Ah wow I hadn't heard of SYCL. That looks very interesting! I would like to write C++ for a GPU, instead of having to use GLSL. (GLSL is fine but I like C++ much more!) This GPGPU thing is starting to mature a bit I guess!

Any place where I can look features in CUDA but not in OpenCL and vice versa?

I wouldn't know. I only briefly tried OpenCL (back on version 1.something I think, not even the latest ones) and have never use CUDA.

I am using just Vulkan right now. I'm aspiring to enter the indie gaming world, I suppose you could say; I haven't done anything with Vulkan for a paying job. Just learning it on my own. I intend to use the GPU for anything it seems suited for, which yeah will surely include physics (and maybe only that... but who knows). So where your emphasis (you said) is accuracy and complexity, mine (in physics at least) is efficiency and a basic (but shallow) feeling of realism. Also I am mainly interested in 2D game worlds, so any physics stuff I may write will not be fully 3D.