Open xuan-li opened 1 month ago
Hi @xuan-li,
Thanks for reporting this bug! You are right, the wp.copy
operation now also copies the gradient arrays during the backward pass, so we should use wp.empty_like
here. We will fix this for the next release.
Bug Description
In
warp/sim/collide.py
,wp.clone
are used to create new arrays whenrequires_grad=True
:It looks like that in the backpropagate, there will be a gradient flow between the new copy and the old one. But the two copies should be independent. I think
wp.empty_like
should be used here.System Information
No response