Hacker News new | ask | show | jobs
by andy_ppp 1277 days ago
I thought Vulkan was a graphics specific layer and CUDA was specifically for machine learning?
3 comments

CUDA is general purpose compute, but nvidia also releases cudnn which all the major libraries use because it is fast and good (if a little complex). There’s efforts underway to have a comparable library on open source general compute packages but none as mature or effective as cudnn so people just pay nvidia to use that in practice, which lets them invest even more in pulling ahead.

As an aside, I’ve been kinda surprised that this has existed for as long as it has, but I am probably biased and think Ml acceleration is more important than most large business do today.

Vulkan is designed for all GPU needs, from rendering to general purpose compute.

CUDA is only for general purpose compute.

CUDA is for GPGPU (general purpose GPU) which includes machine learning.

Vulkan is a primarily for graphics but does have options for GPGPU too. Vulkan is however not like OpenGL in that it's fairly close to the hardware in terms of abstraction.

Vulkan has a very atrocious developer experience by GPGPU standards.

The chance of it winning over CUDA is at zero. And that's _before_ considering its API gaps compared to modern OpenCL.

(Yes, even OpenCL is a much better compute API choice than Vulkan. Vulkan does not even have SVM)

You should think more of vulkan as an IR endpoint than the actually usable API here.

Vulkan is well supported by most GPUs because it's so low level. Performance tends to be good everywhere.

What would make vulkan succesful is having APIs that "compile" to this IR. Stuff like vulkan Kompute are good ideas in this direction.

Vulkan is not a suitable API for even implementing Khronos's very own SYCL on top of. SYCL requires shared virtual memory capabilities that Vulkan just doesn't have.
Vulkan is fairly atrocious, GPGPU or not IMO. Obviously it tries to do something intrinsically complex but I've never enjoyed working with it.
Does CUDA have SVM either? Seems like a pretty niche feature IMHO
Yes CUDA does, since Kepler, under the CUDA Unified Memory naming.

It's not a niche feature at all, but one that is essential to lower the barrier for developer adoption.