Hi,
The problem here is that the original value of some_const was required and you modified it.
Hence the error you’re seeing.
If you want explicitly change that value so that autograd will compute wrong gradients, then I don’t think you should be doing that  In particular, it is an implementation detail of the different formulas which Tensor is saved and used or not. So you cannot predict what effect changing this Tensor inplace will have because it might not be used in the backward computation at all.