about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src/autodiff.rs
AgeCommit message (Collapse)AuthorLines
2025-03-11Rollup merge of #138231 - Sa4dUs:autodiff-ice, r=ZuseZ4Matthias Krüger-1/+16
Prevent ICE in autodiff validation by emitting user-friendly errors This PR moves `valid_ret_activity` and `valid_input_activity` checks to the macro expansion phase in compiler/rustc_builtin_macros/src/autodiff.rs, replacing the following internal compiler error (ICE): ``` error: internal compiler error: compiler/rustc_codegen_ssa/src/codegen_attrs.rs:935:13: Invalid input activity Dual for Reverse mode ``` with a more user-friendly message. The issue specifically affected the test file `tests/ui/autodiff/autodiff_illegal.rs`, impacting the functions `f5` and `f6`. The ICE can be reproduced by following [Enzyme's Rustbook](https://enzymead.github.io/rustbook/installation.html) installation guide. Additionally, this PR adds tests for invalid return activity in `autodiff_illegal.rs`, which previously triggered an unnoticed ICE before these fixes. r? ``@oli-obk``
2025-03-11Add individual activity span availability FIXMESa4dUs-0/+2
2025-03-11Fix ICE for invalid return activity and proper error handlingMarcelo Domínguez-1/+14
2025-03-07remove clonesMatthias Krüger-19/+10
2025-02-27switch #[cfg(not(llvm_enzyme))] to cfg!(llvm_enzyme)Vayun Biyani-22/+4
2025-02-25Fix enzyme build errorsVayun Biyani-4/+4
2025-02-21fix build regressionsManuel Drehwald-0/+1
2025-02-08Rustfmtbjorn3-10/+15
2024-12-18Re-export more `rustc_span::symbol` things from `rustc_span`.Nicholas Nethercote-3/+2
`rustc_span::symbol` defines some things that are re-exported from `rustc_span`, such as `Symbol` and `sym`. But it doesn't re-export some closely related things such as `Ident` and `kw`. So you can do `use rustc_span::{Symbol, sym}` but you have to do `use rustc_span::symbol::{Ident, kw}`, which is inconsistent for no good reason. This commit re-exports `Ident`, `kw`, and `MacroRulesNormalizedIdent`, and changes many `rustc_span::symbol::` qualifiers in `compiler/` to `rustc_span::`. This is a 200+ net line of code reduction, mostly because many files with two `use rustc_span` items can be reduced to one.
2024-10-11Single commit implementing the enzyme/autodiff frontendManuel Drehwald-0/+820
Co-authored-by: Lorenz Schmidt <bytesnake@mailbox.org>