From dad3cc4d026794ad3ec309f7ae38e9c3798ce34f Mon Sep 17 00:00:00 2001 From: Tugsbayasgalan Manlaibaatar Date: Thu, 23 Nov 2023 11:49:52 -0800 Subject: [PATCH] Fix type for keep_inference_mutation flag (#114482) Pull Request resolved: https://github.com/pytorch/pytorch/pull/114482 Approved by: https://github.com/Skylion007 ghstack dependencies: #114421, #114479, #114481 --- torch/_functorch/aot_autograd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torch/_functorch/aot_autograd.py b/torch/_functorch/aot_autograd.py index 92ae0f6314f7a3..58bf329dc566b8 100644 --- a/torch/_functorch/aot_autograd.py +++ b/torch/_functorch/aot_autograd.py @@ -564,7 +564,7 @@ class ViewAndMutationMeta: num_intermediate_bases: int # For inference only: instructs us to keep data-only input mutations directly in the graph - keep_input_mutations: int + keep_input_mutations: bool # length = (# inputs w data mutations) + (# user outputs that are non_aliasing tensors) # + (# intermediate bases)