by rjinman on 3/15/24, 1:58 PM with 24 comments
I don't see many other people using Vulkan for GPGPU, and there may be many good reasons for that, but I wanted to try something a bit different.
I've made every attempt to make the code very clean and readable and I've written up the math in documentation/math.pdf, so hopefully this is a useful learning resource for anyone interested in how neural nets work under the hood.
I'll be continuing to add new features over the coming months.
by Const-me on 3/17/24, 8:31 PM
> don't see many other people using Vulkan for GPGPU, and there may be many good reasons for that
I think the main of these reasons is nVidia’s contributions to the ecosystem. It’s much easier to call library functions implemented by cuDNN or cuBLAS first-party library, than it is to write and dispatch compute shaders to multiply these matrices.
However, for use cases when hardware costs are substantial compared to software development costs, using Vulkan or D3D can be a reasonable thing to do. nVidia is too greedy, in the EULA of their drivers they forbid to use GeForce GPUs in data centres. For people who need GPGPU on their servers, that paragraph of text sometimes makes nVidia hardware an order of magnitude more expensive than AMD hardware.
by Eager on 3/16/24, 8:21 PM
I'm definitely going to be looking at this. Hope you had fun making it.
by pjmlp on 3/18/24, 7:52 AM
A big reason is that C++ for Vulkan (SPIR-V) isn't quite there, while CUDA does C, C++20 (minus modules currently), Fortran, Haskell, Java, C#, Julia, Python JITs, and anything else that might target PTX.
SPIR was a late response after Khronos realized the world wasn't willing to be stuck with C for GPGPU, and the tooling is still catching up to PTX.
by sieste on 3/16/24, 7:47 PM
by sevagh on 3/16/24, 9:46 PM
by jeena on 3/17/24, 1:55 PM
by stanleykm on 3/16/24, 6:13 PM
by SomeoneFromCA on 3/18/24, 1:05 PM
by jgord on 3/17/24, 2:46 AM
how well does Vulcan api fit Neural Net primitives [ matmul / relu / backprop / tensor arrays ] ?
Also.. do you think the in-browser WebGPU api, the successor to webGL, is a good api for NN ?
by olliej on 3/16/24, 9:36 PM
by RecycledEle on 3/18/24, 10:26 AM