Torch's autograd tracing is disabled inside of custom Function objects. This is an issue when there is a chain of nested dr.wrap function calls, as the inner functions will not track their gradients correctly.
This commit forcefully enables gradient tracking just for the function call.
Fixes #270
Torch's autograd tracing is disabled inside of custom
Function
objects. This is an issue when there is a chain of nesteddr.wrap
function calls, as the inner functions will not track their gradients correctly. This commit forcefully enables gradient tracking just for the function call.