Skip to content

Commit d2e1dbc

Browse files
bdhirshpytorchmergebot
authored andcommitted
make aotdispatcher opinfo tests keep input mutations in graph (pytorch#165327)
This stack is going to turn off functionalization and turn on the default partitioner, so I'm going to separate out a few changes before turning off functionalization in our OpInfo tests: (1) run our tests with input mutations allowed inside the graph (2) run our tests with the default partitioner (3) run with functionalization off (4) (later) make the tests properly test for bitwise equivalence Pull Request resolved: pytorch#165327 Approved by: https://github.com/ezyang
1 parent 89298ad commit d2e1dbc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

torch/testing/_internal/optests/aot_autograd.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,13 @@ def func_no_tensors(args):
6464
return func(*c_args, **c_kwargs)
6565

6666
compiled_f = compiled_function(
67-
func_no_tensors, nop, nop, dynamic=dynamic, partition_fn=min_cut_rematerialization_partition)
67+
func_no_tensors,
68+
nop,
69+
nop,
70+
dynamic=dynamic,
71+
partition_fn=min_cut_rematerialization_partition,
72+
keep_inference_input_mutations=True
73+
)
6874

6975
out = wrapper_set_seed(func_no_tensors, args)
7076
if check_gradients == "auto":

0 commit comments

Comments
 (0)