upstream rustc_codegen_ssa/rustc_middle changes for enzyme/autodiff
This commit is contained in:
parent
ebcf860e73
commit
1f30517d40
27 changed files with 482 additions and 38 deletions
|
@ -79,6 +79,7 @@ pub struct AutoDiffItem {
|
|||
pub target: String,
|
||||
pub attrs: AutoDiffAttrs,
|
||||
}
|
||||
|
||||
#[derive(Clone, Eq, PartialEq, Encodable, Decodable, Debug, HashStable_Generic)]
|
||||
pub struct AutoDiffAttrs {
|
||||
/// Conceptually either forward or reverse mode AD, as described in various autodiff papers and
|
||||
|
@ -231,7 +232,7 @@ impl AutoDiffAttrs {
|
|||
self.ret_activity == DiffActivity::ActiveOnly
|
||||
}
|
||||
|
||||
pub fn error() -> Self {
|
||||
pub const fn error() -> Self {
|
||||
AutoDiffAttrs {
|
||||
mode: DiffMode::Error,
|
||||
ret_activity: DiffActivity::None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue