4 ms·
Incredible, 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 h
by magnio 5mo ago
Incredible, 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.