Closed andyyankai closed 2 days ago
Hi @andyyankai
We have a (temporary) fix for this in this commit which is part of #1287.
It's still unclear to me why it was necessary and so I'll be looking into that. In the meantime, you can use that patch - we've confirmed that it produces the correct result in reverse-mode AD:
Thanks, I will take a look on this.
My forward-mode AD also works after the fix, thanks! I will leave this issue open for a while in case there are some other problems.
Closing for now. Of course, we can re-open this if you discover any discrepancies.
The latest version of Mitsuba3 using the new version of DrJit failed when using
prbvolpath
for backward/forward mode on heterogeneous volumes with NEE.It seems the issue is caused by performing backward/forward operations in a loop nested within another loop during tracing, which might be related to the latest version of DrJit. Here is the error message:
Traceback (most recent call last): File "C:\xxx\mitsuba\python\ad\integrators\prbvolpath.py", line 271, in _loop_body dr.backward(δL * contrib) RuntimeError: CustomOp::backward(): the reverse-mode derivative of a complex loop (with max_iterations != -1) is not yet implemented!
To reproduce the issue, you can run the code usingpython validation_heter.py
. I have attached a file to help with this: validation_heter.zip.The issue can be triggered by backpropagating a loss for sigma_t for any heterogeneous volume when using
prbvolpath
. I have also included aprbvolpath_m1
that supports forward_mode AD in the zip.Thank you!