HNHacker News
TopNewBestAskShowJobs

LegNeato

751 karma · joined May 2, 2013

I worked @ Robinhood on various things. I worked @ Facebook on mobile app releases. Before I worked @ Mozilla on Firefox releases. Before that, I worked @ Apple on Mac OS X releases.
submissionscomments
LegNeato··on Rust’s Standard Library on the GPU
We use the cuda device allocator for allocations on the GPU via Rust's default allocator.
LegNeato··on Rust’s Standard Library on the GPU
Flip on the pedantic switch. We have std::fs, std::time, some of std::io, and std::net(!). While the `libc` calls go to the host, all the `std` code in-between runs on the GPU.
LegNeato··on Rust’s Standard Library on the GPU
Author here! Flip on the pedantic switch, we agree ;-)
LegNeato··on VectorWare – from creators of `rust-GPU` and `rust-CUDA`
1. The GPU owns the control loop And the only sparingly kicks to the CPU when it can't do something.

2. Yes

3. We're still investigating the limitations. A lot of them are hardware dependent, obviously data center cards have higher limits more capability than desktop cards.

Thanks! It is super fun trailblazing and realizing more of the pieces are there than everybody expects.

LegNeato··on VectorWare – from creators of `rust-GPU` and `rust-CUDA`
You might be interested in a previous blog post where we showed one codebase running on many types of GPUs: https://rust-gpu.github.io/blog/2025/07/25/rust-on-every-gpu...
LegNeato··on VectorWare – from creators of `rust-GPU` and `rust-CUDA`
No worries, just wanted to correct it for folks. Thanks for posting!
LegNeato··on VectorWare – from creators of `rust-GPU` and `rust-CUDA`
One of the founders here, feel free to ask whatever. We purposefully didn't put much technical detail in the post as it is an announcement post (other people posted it here, we didn't).
LegNeato··on VectorWare – from creators of `rust-GPU` and `rust-CUDA`
Pedantic note: rust-cuda was created by https://github.com/RDambrosio016 and he is not currently involved in VectorWare. rust-gpu was created by the folks at embark software. We are the current maintainers of both.

We didn't post this or the title, we would never claim we created the projects from scratch.

LegNeato··on VectorWare – from creators of `rust-GPU` and `rust-CUDA`
Yes, it is all these folks getting together and getting resources to push those projects to the next level: https://www.vectorware.com/team/

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.

LegNeato··on VectorWare – from creators of `rust-GPU` and `rust-CUDA`
We are investing in them and they form the basis of what we are doing. That being said, we are also exploring other technical avenues with different tradeoffs...we don't want to assume a solution merely because we are familiar with them.
LegNeato··on VectorWare – from creators of `rust-GPU` and `rust-CUDA`
More software than you think can run fully on the GPU, especially with datacenter cards. We'll be sharing some demos in the coming weeks.
LegNeato··on VectorWare – from creators of `rust-GPU` and `rust-CUDA`
We have some demos coming in the next couple weeks. The hardware is there, the software isn't!
LegNeato··on The origin story of merge queues
Yeah, there is way more prior art. We were doing this at FB early (here is a talk from 2014 mentioning it but it was much earlier: https://www.infoq.com/presentations/facebook-release-process...) and we definitely did not invent it...it was already the industry standard for large CI.
LegNeato··on Rust running on every GPU
FYI, you can drop down into ptx if need be:

https://github.com/Rust-GPU/Rust-CUDA/blob/aa7e61512788cc702...

LegNeato··on Rust running on every GPU
I have not, it is easy to get in touch with me though.
LegNeato··on Rust running on every GPU
Yes, see the proposed WG link I posted above. When I say GPU I'm using it as shorthand...indeed, I think the "graphics" part is on borrowed time and will just become fully software. It is already happening.
LegNeato··on Rust running on every GPU
https://github.com/Rust-GPU/Rust-CUDA/tree/main/crates/cudnn and the parent dir has more.
LegNeato··on Rust running on every GPU
Thanks! I'm personally focused on compute, while other contributors are focused on graphics.

I believe GPUs are the future of computing. I think the tooling, languages, and ecosystems of GPUs are very bad compared to CPUs. Partially because they are newer, partially because they are different, and partially because for some reason the expectations are so low. So I intend to upset the status quo.

LegNeato··on Rust running on every GPU
The underlying projects support loading at runtime, so you could have as many AOT compiled kernel variants and load the one you want. Disk is cheap. You could even ship rustc if you really wanted for "JIT" (lol), but maybe not super crazy as mojo is llvm based anyway. There is of course the warmup / stuttering problem, but that is a separate issue and (sometimes) not an issue for compute vs graphics where it is a bigger issue. I have some thoughts on how to improve the status quo with things unique to Rust but too early to know.

One of the issues with GPUs as a platform is runtime probing of capabilities is... rudimentary to say the least. Rust has to deal with similar stuff with CPUs+SIMD FWIW. AOT vs JIT is not a new problem domain and there are no silver bullets only tradeoffs. Mojo hasn't solved anything in particular, their position in the solution space (JIT) has the same tradeoffs as anyone else doing JIT.

LegNeato··on Rust running on every GPU
Correct. The new thing is those shaders/kernel also run via CUDA and on CPU unchanged. You could not do that with only wgpu...there is no rust shader input, (and the thing that enables it rust-gpu which is used here) and if you wrote your code in a shader lang it wouldn't run on the CPU (as they are made for GPU only) or via CUDA.
LegNeato··on Rust running on every GPU
Can you file a bug on rust-gpu? I'd love to look into it (I am unfamiliar with this area).
LegNeato··on Rust running on every GPU
Those don't include CUDA and don't include the CPU host side AFAIK.

SPIR-V isn't the main abstraction layer here, Rust is. This is the first time it is possible for Rust host + device across all these platforms and OSes and device apis.

You could make an argument that CubeCL enabled something similar first, but it is more a DSL that looks like Rust rather than the Rust language proper(but still cool).

LegNeato··on Rust running on every GPU
You can check out https://rust-gpu.github.io/ecosystem/ as well, which mentions CubeCL.
LegNeato··on Rust running on every GPU
FYI, rust-cuda outputs nvvm so it can integrate with the existing cuda ecosystem. We aren't suggesting rewriting everything in Rust. Check the repo for crates that allow using existing stuff like cudnn and cuBLAS.
LegNeato··on Rust running on every GPU
And it uses 3rd party deps from crates.io that are completely GPU unaware.
LegNeato··on Rust running on every GPU
Many of us working on Rust + GPUs in various projects have discussed starting a GPU working group to explore some of these questions:

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.

LegNeato··on Rust running on every GPU
The demo is admittedly a rube goldberg machine, but that's because this was the first time it is possible. It will get more integrated over time. And just like normal rust code, you can make it as abstract or concrete as you want. But at least you have the tools to do so.

That's one of the nice things about the rust ecosystem, you can drill down and do what you want. There is std::arch, which is platform specific, there is asm support, you can do things like replace the allocator and panic handler, etc. And with features coming like externally implemented items, it will be even more flexible to target what layer of abstraction you want

LegNeato··on Rust running on every GPU
To be more technically correct, we compile to NVVM IR and then use NVIDIA's NVVM to convert it to PTX.
LegNeato··on Rust running on every GPU
Rust is a system language, so you should have the control you need. We intend to bring GPU details and APIs into the language and core / std lib, and expose GPU and driver stuff to the `cfg()` system.

(Author here)

LegNeato··on Measuring the impact of AI on experienced open-source developer productivity
It's not disingenuous, we have his and my git commit logs. I also had to deal with issues with rust-gpu. He is an expert in both the space and his project, I had never seen his project nor written any graphics shaders before. You can never get apples to apples comparisons but this is the closest I have personally experienced.
← PreviousPage 2 of 5Next →