Open archibate opened 4 years ago
__ndrange = ti.expr_init(ti.ndrange(2, 2))
__ndrange = ti.ndrange(2, 2)
It seems grouped-ndrange's are braced with ti.expr_init
while multi-index-ndrange's are not?
Our frontend AST transformer is so ad-hocly single-pass that I don't even dear to modify it, in afraid of functionality regression. As @yuanming-hu said in GAMES 201's final lecture, simplicity matters, a human brain is not possible for handling such complicated single-pass system. Instead, we should use multi-pass system, to separate the functionality for easy-maintain. We should definitely go for multi-pass AST transforming manner at some point, before everything blows up completely.
Describe the bug Autodiff system failed to reverse_segments for a grouped ndrange-for. But using multi-index ndrange-for and group them later into a
ti.Vector
is OK..To Reproduce
Log/Screenshots
If you have local commits (e.g. compile fixes before you reproduce the bug), please make sure you first make a PR to fix the build errors and then report the bug.