3 ms·
Personally I really don't want new GPU languages that do not have AD as a first class citizen. I mean rust is an improvement over C++ CUDA but still.
by rowanG077 5mo ago
Personally I really don't want new GPU languages that do not have AD as a first class citizen. I mean rust is an improvement over C++ CUDA but still.
- TallGuyShort 5mo agoSorry, what is AD in this context? edit: oh, automatic differentiation?
- huflungdung 5mo agoActive Directory
- vimarsh6739 5mo agoReally hard to find alternatives to Julia for AD as a first class citizen
- hellohello2 5mo agoI think the parent is mostly referring to solutions like Slang.D
- erk__ 5mo agoThere is actually work on adding autodiff to Rust, maybe not really first class citizen, but at least build in: https://doc.rust-lang.org/std/autodiff/index.html https://doc.rust-lang.org/std/autodiff/index.html (it is still at a pre-RFC stage so it is not something that soon will be added)
- magnio 5mo agoIncredible, I have never heard of std::autodiff before. Isn't it rare for a programming language to provide AD within the standard library? Even Julia doesn't have it built-in, I wouldn't expect Rust out of all languages to experiment it in std.
- xkevio 5mo agoIt makes use of https://github.com/EnzymeAD/enzyme https://github.com/EnzymeAD/enzyme which is an LLVM plugin and since Rust also uses LLVM in its backend, we can enable this plugin in our Rust toolchain when autodiff is enabled. So, it is a bit of compiler black magic rather than a direct implementation in the standard library.
- mswphd 5mo agoYou can read some motivation for it at the following link https://rust-lang.github.io/rust-project-goals/2024h2/Rust-for-SciComp.html?highlight=autodiff#autodiff https://rust-lang.github.io/rust-project-goals/2024h2/Rust-f... note that it also discusses `std::offload`, which might also be of interest.
- rowanG077 5mo agoThat's awesome, I didn't know that!
- mathisfun123 5mo agoevery GPU related post has a comment which makes my eyes roll all the way back. this is the one for this post.
- the__alchemist 5mo agoThis isn't a new GPU language; it's a lib which might replace FFI and third party libs.
- rowanG077 5mo agoThis is definitely not just a lib. This compiles rust to CUDA. If you call a full on compiler stack a lib, everything may as well be a lib.
- the__alchemist 5mo agoOk. I am calling it a lib because to use, you add it as a dependency in cargo.toml then import it in your rust modules.
- rowanG077 5mo agoThat's after you have installed their entire build infra + dependencies. They ship their own cargo subcommand.
- corysama 5mo agoSo, https://shader-slang.org/ https://shader-slang.org/ then :)