File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
compiler/rustc_codegen_llvm/src Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1089,6 +1089,12 @@ pub(crate) unsafe fn differentiate(
1089
1089
LLVMDumpModule ( llmod) ;
1090
1090
}
1091
1091
}
1092
+
1093
+ if std:: env:: var ( "ENZYME_INLINE" ) . is_ok ( ) {
1094
+ dbg ! ( "Setting inline to true" ) ;
1095
+ llvm:: set_inline ( true ) ;
1096
+ }
1097
+
1092
1098
if std:: env:: var ( "ENZYME_TT_DEPTH" ) . is_ok ( ) {
1093
1099
let depth = std:: env:: var ( "ENZYME_TT_DEPTH" ) . unwrap ( ) ;
1094
1100
let depth = depth. parse :: < u64 > ( ) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -2657,6 +2657,7 @@ pub mod Fallback_AD {
2657
2657
pub fn EnzymeSetCLBool ( arg1 : * mut :: std:: os:: raw:: c_void , arg2 : u8 ) { unimplemented ! ( ) }
2658
2658
pub fn EnzymeSetCLInteger ( arg1 : * mut :: std:: os:: raw:: c_void , arg2 : i64 ) { unimplemented ! ( ) }
2659
2659
2660
+ pub fn set_inline ( val : bool ) { unimplemented ! ( ) }
2660
2661
pub fn set_runtime_activity_check ( check : bool ) { unimplemented ! ( ) }
2661
2662
pub fn set_max_int_offset ( offset : u64 ) { unimplemented ! ( ) }
2662
2663
pub fn set_max_type_offset ( offset : u64 ) { unimplemented ! ( ) }
@@ -3017,6 +3018,7 @@ extern "C" {
3017
3018
static mut EnzymePrint : c_void ;
3018
3019
static mut EnzymeStrictAliasing : c_void ;
3019
3020
static mut looseTypeAnalysis: c_void ;
3021
+ static mut EnzymeInline : c_void ;
3020
3022
}
3021
3023
pub fn set_runtime_activity_check ( check : bool ) {
3022
3024
unsafe {
@@ -3071,6 +3073,11 @@ pub fn set_loose_types(loose: bool) {
3071
3073
EnzymeSetCLBool ( std:: ptr:: addr_of_mut!( looseTypeAnalysis) , loose as u8 ) ;
3072
3074
}
3073
3075
}
3076
+ pub fn set_inline ( val : bool ) {
3077
+ unsafe {
3078
+ EnzymeSetCLBool ( std:: ptr:: addr_of_mut!( EnzymeInline ) , val as u8 ) ;
3079
+ }
3080
+ }
3074
3081
3075
3082
extern "C" {
3076
3083
pub fn EnzymeCreatePrimalAndGradient < ' a > (
You can’t perform that action at this time.
0 commit comments