@@ -4287,7 +4287,7 @@ def fn(x, y):
42874287 opt_fn = torch ._dynamo .optimize (cnt , nopython = True )(fn )
42884288 x = torch .rand ([2 , 2 ])
42894289 opt_fn (x , x )
4290- self .assertEqual (cnt .frame_count , 1 )
4290+ self .assertExpectedInline (cnt .frame_count , """1""" )
42914291
42924292 @torch ._dynamo .config .patch (capture_scalar_outputs = True )
42934293 def test_unbacked_arange_in_bounds (self ):
@@ -4356,7 +4356,7 @@ def fn(x, y):
43564356 opt_fn = torch ._dynamo .optimize (cnt , nopython = True )(fn )
43574357 x = torch .rand ([2 , 2 ])
43584358 self .assertEqual (opt_fn (x , [5 ]), fn (x , [5 ]))
4359- self .assertEqual (cnt .frame_count , 1 )
4359+ self .assertExpectedInline (cnt .frame_count , """1""" )
43604360
43614361 def test_user_ctor_ctx_manager_custom_init_graph_break (self ):
43624362 counter = [0 ]
@@ -4384,7 +4384,10 @@ def fn(x, counter):
43844384 for i in range (0 , 10 ):
43854385 opt_fn (x , counter )
43864386 self .assertEqual (counter [0 ], 12 )
4387- self .assertEqual (cnt .frame_count , torch ._dynamo .utils .ifdynstaticdefault (3 , 2 ))
4387+ if torch ._dynamo .config .assume_static_by_default :
4388+ self .assertExpectedInline (cnt .frame_count , """2""" )
4389+ else :
4390+ self .assertExpectedInline (cnt .frame_count , """1""" )
43884391
43894392 @unittest .expectedFailure
43904393 def test_many_overlapping_inputs_does_not_explode_guards (self ):
0 commit comments