We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4c2978 commit 5628e24Copy full SHA for 5628e24
compiler/rustc_codegen_llvm/src/builder/autodiff.rs
@@ -240,14 +240,8 @@ fn generate_enzyme_call<'ll>(
240
args.push(fn_to_diff);
241
242
let enzyme_primal_ret = cx.create_metadata("enzyme_primal_return".to_string()).unwrap();
243
- match output {
244
- DiffActivity::Dual => {
245
- args.push(cx.get_metadata_value(enzyme_primal_ret));
246
- }
247
- DiffActivity::Active => {
248
249
250
- _ => {}
+ if matches!(attrs.ret_activity, DiffActivity::Dual | DiffActivity::Active) {
+ args.push(cx.get_metadata_value(enzyme_primal_ret));
251
}
252
253
let outer_args: Vec<&llvm::Value> = get_params(outer_fn);
0 commit comments