fix cudagraphify for inplace parameter change (#87060)
Fixes https://github.com/pytorch/torchdynamo/issues/1687
cc @albanD, @chillee, I don't know what I'm doing.
According to previous discussions, calling `detach()` on inputs can cause bugs if inputs are later inplace-resized (cc @ezyang) https://github.com/pytorch/pytorch/pull/85301/files#diff-8678402e01603e588fcf175a61de9ed578d885b1cc082e028021856190223fb7L433, but should we weed out these patterns before they are sent to cudagraphify?
Pull Request resolved: https://github.com/pytorch/pytorch/pull/87060
Approved by: https://github.com/jansel, https://github.com/albanD