←back to thread

Rust CUDA Project

(github.com)
146 points sksxihve | 3 comments | | HN request time: 0s | source
Show context
shmerl ◴[] No.43656833[source]
Looks like a dead end. Why CUDA? There should be some way to use Rust for GPU programming in general fashion, without being tied to Nvidia.
replies(5): >>43656967 #>>43657008 #>>43657034 #>>43658709 #>>43659892 #
pjmlp ◴[] No.43657034[source]
Because others so far have failed to deliver anything worthwhile using, with the same tooling ecosystem as CUDA.
replies(3): >>43657851 #>>43658002 #>>43658007 #
coffeeaddict1 ◴[] No.43657851[source]
While I agree, that CUDA is the best in class API for GPU programming, OpenCL, Vulkan compute shaders and Sycl are alternatives that are usable. I'm for example, using compute shaders for writing GPGPU algorithms that work on Mac, AMD, Intel and Nvidia. It works ok. The debugging experience and ecosystem sucks compared to CUDA, but being able to run the algorithms across platforms is a huge advantage over CUDA.
replies(3): >>43658021 #>>43658035 #>>43658602 #
keldaris ◴[] No.43658021[source]
How are you writing compute shaders that work on all platforms, including Mac? Are you just writing Vulkan and relying on MoltenVK?

AFAIK, the only solution that actually works on all major platforms without additional compatibility layers today is OpenCL 1.2 - which also happens to be officially deprecated on MacOS, but still works for now.

replies(2): >>43658633 #>>43658666 #
1. coffeeaddict1 ◴[] No.43658666{4}[source]
Yes, MoltenVK works fine. Alternatively, you can also use WebGPU (there are C++ and Rust native libs) which is a simpler but more limiting API.
replies(1): >>43658775 #
2. keldaris ◴[] No.43658775[source]
WebGPU has no support for tensor cores (or their Apple Silicon equivalents). Vulkan has an Nvidia extension for it, is there any way to make MoltenVK use simdgroup_matrix instructions in compute shaders?
replies(1): >>43658912 #
3. coffeeaddict1 ◴[] No.43658912[source]
AFAIK, MoltenVK doesn't. Dawn (Google's C++ WebGPU implementation) does have some experimental support for it [0][1].

[0] https://issues.chromium.org/issues/348702031

[1] https://github.com/gpuweb/gpuweb/issues/4195