(Don't miss the "Pedantic mode" switch on the linked page, it adds relevant and detailed footnotes to the blog post.)
We’re talking at least hundreds of thousands of cells, depending on the calculation, or at least a number that will make the UI very sad long before you’ll see a slowdown from calculation.
Databases, on the other hand…
If you have a Rust application or library and want to use the GPU, these approaches are comparatively smooth:
- WGPU: Great for 3D graphics
- Ash and other Vulkan bindings: Low-level graphics bindings
- Cudarc: Nice API for running CUDA kernels.
I am using WGPU and Cudarc for structural biology + molecular dynamics computations, and they work well.Rust - CUDA feels like lots-of-PR, but not as good of a toolkit as these quieter alternatives. What would be cool for them to deliver, and I think is in their objectives: Cross-API abstractions, so you could, for example, write code that runs on Vulkan Compute in addition to CUDA.
Something else that would be cool: High-level bindings to cuFFT and vkFFT. You can FFI them currently, but that's not ideal. (Not too bad to impl though, if you're familiar with FFI syntax and the `cc` crate)
wgpu, ash, and cudarc are great. We're focusing on the actual code that runs on the GPU in Rust, and we work with those projects. We have cust in rust-cuda, but that existed before cudarc and we have been seriously discussing just killing it in favor of cudarc.
We didn't post this or the title, we would never claim we created the projects from scratch.
But, languages like Java or python simply lack even programming constructs to program on GPUs easily.
No standardised ISA on GPUs also mean compilers can’t really provide a translation layer.
Let’s hope things get better over time!
billconan•4h ago
> If you look at existing GPU applications, their software implementations aren't truly GPU-native. Instead, they are architected as traditional CPU software with a GPU add-on.
I feel that this is due to the current hardware architecture, not the fault of software.
LegNeato•3h ago