Only consider MonoItem::Fn when preventing inlining for autodiff source functions
This commit is contained in:
parent
1f76d219c9
commit
b3739f3c0e
1 changed files with 2 additions and 1 deletions
|
@ -254,8 +254,9 @@ where
|
||||||
always_export_generics,
|
always_export_generics,
|
||||||
);
|
);
|
||||||
|
|
||||||
// We can't differentiate something that got inlined.
|
// We can't differentiate a function that got inlined.
|
||||||
let autodiff_active = cfg!(llvm_enzyme)
|
let autodiff_active = cfg!(llvm_enzyme)
|
||||||
|
&& matches!(mono_item, MonoItem::Fn(_))
|
||||||
&& cx
|
&& cx
|
||||||
.tcx
|
.tcx
|
||||||
.codegen_fn_attrs(mono_item.def_id())
|
.codegen_fn_attrs(mono_item.def_id())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue