Yes, for things like relu, dropout it is easily decided by looking at the locations of non-zero values. This can’t be done generally though. If the input is needed to compute gradient in some backward function, then inplace operations cannot be used.