What happens is that backprop reaches this line doing MulBackward and detects that some multiplicand is no longer available (overwritten). So inplace operation is happening somewhere later, this is just a detection point.