by LegNeato · 1y ago · 0 comments
(Author here)
I don't think this argument is promising. Its not about the power of the language, but the power of the abstractions you provide over the various GPU APIs.
In fact, I could argue one of the main selling points of Rust (memory safety) has limited applicability in GPU land, because lifetimes are not a thing like they are in CPU land.
I'm sure there's other benefits here, not least the tooling, but certainly the language is not the main selling point...
https://gist.github.com/LegNeato/a1fb3e3a9795af05f22920709d9...
Agreed, I don't think we'd ever pull in things like wgpu, but we might create APIs or traits wgpu could use to improve perf/safety/ergonomics/interoperability.
Get Nvidia, AMD, Intel and whoever else you can get into a room. Get LLVMs boys into the same room.
Compile LLVMIR directly into hardware instructions fed into the GPU, get them to open up.
Having to target an API is part of the problem, get them to allow you to write Rust that directly compiles into the code that will run on the GPU, not something that becomes something else, that becomes spirv that controls a driver that will eventually run on the GPU.
It's the same reason Safari is in such a sorry state. Why make web browser better, when it could cannibalize your app store?
* https://mlir.llvm.org/docs/Dialects/NVGPU/
it baffles me that more people haven't heard about them. it's mighty impressive what they have achieved.