Is there any way to check the inplace opeartion?

RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation
Bothered 3days,I just can’t check where the bug is.
Any tool?