Skip to content

Commit 769622d

Browse files
committed
try to make enzyme configurable, not working yet
1 parent 4889ad3 commit 769622d

File tree

1 file changed

+7
-6
lines changed
  • compiler/rustc_codegen_llvm/src/llvm

1 file changed

+7
-6
lines changed

compiler/rustc_codegen_llvm/src/llvm/ffi.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![allow(non_camel_case_types)]
22
#![allow(non_upper_case_globals)]
3+
#![allow(unexpected_cfgs)]
34

45
use rustc_ast::expand::autodiff_attrs::DiffActivity;
56

@@ -2608,10 +2609,10 @@ extern "C" {
26082609
) -> *mut c_void;
26092610
}
26102611

2611-
#[cfg(AD_FALLBACK)]
2612+
#[cfg(autodiff_fallback)]
26122613
pub use self::Fallback_AD::*;
26132614

2614-
#[cfg(AD_FALLBACK)]
2615+
#[cfg(autodiff_fallback)]
26152616
pub mod Fallback_AD {
26162617
#![allow(unused_variables)]
26172618
use super::*;
@@ -2744,9 +2745,9 @@ pub mod Shared_AD {
27442745
use libc::size_t;
27452746
use super::Context;
27462747

2747-
#[cfg(AD_FALLBACK)]
2748+
#[cfg(autodiff_fallback)]
27482749
use super::Fallback_AD::*;
2749-
#[cfg(not(AD_FALLBACK))]
2750+
#[cfg(not(autodiff_fallback))]
27502751
use super::Enzyme_AD::*;
27512752

27522753
use core::fmt;
@@ -2930,13 +2931,13 @@ pub mod Shared_AD {
29302931
}
29312932
}
29322933

2933-
#[cfg(not(AD_FALLBACK))]
2934+
#[cfg(not(autodiff_fallback))]
29342935
pub use self::Enzyme_AD::*;
29352936

29362937
// Enzyme is an optional component, so we do need to provide a fallback when it is ont getting
29372938
// compiled. We deny the usage of #[autodiff(..)] on a higher level, so a placeholder implementation
29382939
// here is completely fine.
2939-
#[cfg(not(AD_FALLBACK))]
2940+
#[cfg(not(autodiff_fallback))]
29402941
pub mod Enzyme_AD {
29412942
use super::*;
29422943

0 commit comments

Comments
 (0)