ITADN

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

#2791Openxys-syx 创建于 2026-04-16
reverse mode
X
xys-syxcommented
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<activity enzyme_active>], ret_activity=[#enzyme<activity enzyme_activenoneed>] } : (f64, f64) -> f64 return %res : f64 } ```
0 条评论