EnzymeAD / EnzymeAD/Enzyme

memref.alloca_scope and its teminator memref.alloca_scope.return does not register reverse mode AD

Open
#2,791 0 comments 0 reactions 2 assignees Claimed by @vimarsh6739 View on GitHub
reverse mode
Dominant language
LLVM
Stars
1.7k
Forks
188
Avg merge
1d 22h
Merged PRs (30d)
26

Description

The minimal reproducible example is
```
func.func @scope_val(%x: f64) -> f64 {
%r = memref.alloca_scope -> (f64) {
%sq = arith.mulf %x, %x : f64
memref.alloca_scope.return %sq : f64
}
return %r : f64
}

func.func @dscope_val(%x: f64, %dr: f64) -> f64 {
%res = enzyme.autodiff @scope_val(%x, %dr)
{
activity=[#enzyme],
ret_activity=[#enzyme]
} : (f64, f64) -> f64
return %res : f64
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.