4 ms·
Rust support next? RN I am manually [de]serializing my data structures as byte arrays to/from the kernels. It would be nice to have truly shared data structures
by the__alchemist 2y ago
Rust support next? RN I am manually [de]serializing my data structures as byte arrays to/from the kernels. It would be nice to have truly shared data structures like CUDA gives you in C++!
- taminka 2y agoeven putting aside how rust ownership semantics map poorly onto gpu programming, ml researchers will never learn rust, this will never ever happen...
- the__alchemist 2y agoGPGPU programming != ML.
- pjmlp 2y agoWhile I agree in principle, CUDA is more than only AI, as people keep forgetting.
- malcolmgreaves 2y agoML reachers don’t write code, they ask ChatGPT to make a horribly inefficient, non-portable notebook that has to be rewritten from scratch :)
- staunton 2y agoIt's made easier by that notebook only having to work just once, to produce some plots for the paper/press release/demo.
- int_19h 2y agoThe ML researchers are relying on libraries written by someone else. Today, those libraries are mostly C++, and they would benefit from Rust same as most other C++ codebases.
- saagarjha 2y agoI don’t think this is true. It seems to me more that nobody has put in a serious effort to make a nice interface build using Rust.
- Micoloth 2y agoWhat do you think of the Burn framework? (Honest question, I have no clue what I’m talking about)
- airstrike 2y agoI used it to train my own mini-GPT and I liked it quite a bit. I tend to favor a different style of Rust with fewer generics but maybe that just can't be avoided given the goals of that project. The crate seems to have a lot of momentum, with many new features, releases, active communities on GH and Discord. I expect it to continue to get better.
- the__alchemist 2y agoHave not heard of it. Looked it up. Seems orthogonal? I am using Cudarc.
- chasely 2y agoThe Rust-CUDA project just recently started up again [0], I've started digging into it a little bit and am hoping to contribute to it since the summers are a little slower for me. [0] https://github.com/rust-gpu/rust-cuda https://github.com/rust-gpu/rust-cuda
- the__alchemist 2y agoStill broken though! Has been for years. In a recent GH issue regarding desires for the reboot, I asked: "Try it on a few different machines (OS, GPUs, CUDA versions etc), make it work on modern RustC and CUDA versions without errors." The response was "That will be quite some work." Meanwhile, Cudarc works...
- chasely 2y agoTotally, it's going to take a minute to get it all working. On a positive note, they recently got some sponsorship from Modal [0], who is supplying GPUs for CI/CD so they should be able to expand their hardware coverage.
- LegNeato 2y agoMaintainer here. It is not broken, it works. See https://rust-gpu.github.io/blog/2025/03/18/rust-cuda-update https://rust-gpu.github.io/blog/2025/03/18/rust-cuda-update
- the__alchemist 2y agoThanks! Will give it a try, and report back. edit: I'm still showing the latest release as from 2022, which I've already verified doesn't work.
- LegNeato 2y agohttps://github.com/rust-gpu/rust-cuda https://github.com/rust-gpu/rust-cuda
- the__alchemist 2y agoNot functional.
- KeplerBoy 2y agoIsn't Rust still very seldomly used in the areas where CUDA shines (e.g. number crunching of any kind, let it be simulations or linear algebra)? Imo C++ or even Fortran are perfectly fine choices for those things, since the memory allocation pattern aren't that complicated.
- pjmlp 2y agoYes, and the new kid in town, slang has more chances of adoption.
- KeplerBoy 2y agosorry, could you link to the project? Seems there are quite a few languages called slang.
- _0ffh 2y agoI guess he might mean this one https://shader-slang.org/ https://shader-slang.org/ though at first glance at least it looks more graphics than GPGPU oriented. Edit: Hmm, this part of the same project looks general purpose-y and apparently integrates with PyTorch https://slangpy.shader-slang.org/en/latest/ https://slangpy.shader-slang.org/en/latest/
- IshKebab 2y agoMainly because number crunching code tends to be very long-lived (hence why FORTRAN is still in use).