pinocchio:

.clone() is useful to create a copy of the original variable that doesn’t forget the history of ops so to allow gradient flow


Yes, that is correct.
While my example stressed out the inplace operation, clone() might of course be useful in other use cases and specific model architectures (the inplace ops were just the first use case that came to my mind).



 pinocchio:

or writing an in-place op to leaf node, in this case there would be no error message


If the inplace op is not allowed, PyTorch should raise an error and should not silently fail.
If you encounter such a silent error, please let us know.