Skip to content

Commit 679889b

Browse files
authored
Copy inputs in minifier as inductor now clears the list (pytorch#1674)
* Copy inputs in minifier as inductor now clears the list * comments
1 parent 50e7c6e commit 679889b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

torchdynamo/debug_utils.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,12 +409,12 @@ def deferred_for_real_inputs(real_inputs):
409409
log.warning("Accuracy failed for the AOT Autograd graph")
410410
dump_compiler_graph_state(
411411
fx.GraphModule(gm, orig_graph),
412-
real_inputs,
412+
example_inputs,
413413
f"{compiler_name}_accuracy",
414414
)
415415
dump_to_minify(
416416
fx.GraphModule(gm, orig_graph),
417-
real_inputs,
417+
example_inputs,
418418
f"{compiler_name}_accuracy",
419419
)
420420
raise ValueError("Bad accuracy detected")
@@ -431,11 +431,15 @@ def deferred_for_real_inputs(real_inputs):
431431
except Exception as e:
432432
if config.repro_level == 1:
433433
dump_compiler_graph_state(
434-
fx.GraphModule(gm, orig_graph), real_inputs, compiler_name
434+
fx.GraphModule(gm, orig_graph),
435+
example_inputs,
436+
compiler_name,
435437
)
436438
elif config.repro_level == 2:
437439
dump_to_minify(
438-
fx.GraphModule(gm, orig_graph), real_inputs, compiler_name
440+
fx.GraphModule(gm, orig_graph),
441+
example_inputs,
442+
compiler_name,
439443
)
440444
raise e
441445

0 commit comments

Comments
 (0)