[dynamo] Skip mutation detection for inference mode (#88406)
Skip the mutation detection for inference_mode, and raise a warning. This helps one internal model
Related to https://github.com/pytorch/torchdynamo/issues/1768
@ezyang What do you think about this? The issue that Dynamo mutation detector uses version counter to detect mutation.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/88406
Approved by: https://github.com/ezyang