I got a similar error and I have no idea what it mean?  Any insights? I am not using an inplace operation like +=. After following the hint, I traced it to return th.stack(neighs).sum(dim = 0) where neighs is a list of 1D tensors.
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.HalfTensor [50]], which is output 0 of AsStridedBackward, is at version 
2256; expected version 2255 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).

It seems that adding values one by one in a for loop works. But, this is not a clean solution.