This would mean the computation graph was detached by e.g. calling item() on a tensor, rewrapping a tensor in another tensor, using a 3rd party library (such as numpy) without using a custom autograd.Function etc.
You could narrow it down by checking the .grad_fn of each intermediate output of each layer in the forward of your model and check where it gets detached.