Skip to content

Commit c8c06a8

Browse files
committed
Assert that there are no None arguments to backwards
This assert would have caught #96219 Signed-off-by: Edward Z. Yang <ezyang@meta.com> [ghstack-poisoned]
1 parent f96bd52 commit c8c06a8

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

torch/_functorch/aot_autograd.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2328,6 +2328,7 @@ def backward(ctx, *flat_args):
23282328

23292329
def call_compiled_backward():
23302330
if CompiledFunction.compiled_bw is None:
2331+
assert all(a is not None for a in all_args)
23312332
if aot_config.dynamic_shapes:
23322333
all_args_list = list(all_args)
23332334
CompiledFunction.compiled_bw = create_aot_dispatcher_function(

0 commit comments

Comments
 (0)