@@ -4350,7 +4350,7 @@ def fn(x, y):
43504350 opt_fn = torch ._dynamo .optimize (cnt , nopython = True )(fn )
43514351 x = torch .rand ([2 , 2 ])
43524352 opt_fn (x , x )
4353- self .assertEqual (cnt .frame_count , 1 )
4353+ self .assertExpectedInline (cnt .frame_count , """1""" )
43544354
43554355 @torch ._dynamo .config .patch (capture_scalar_outputs = True )
43564356 def test_unbacked_arange_in_bounds (self ):
@@ -4419,7 +4419,7 @@ def fn(x, y):
44194419 opt_fn = torch ._dynamo .optimize (cnt , nopython = True )(fn )
44204420 x = torch .rand ([2 , 2 ])
44214421 self .assertEqual (opt_fn (x , [5 ]), fn (x , [5 ]))
4422- self .assertEqual (cnt .frame_count , 1 )
4422+ self .assertExpectedInline (cnt .frame_count , """1""" )
44234423
44244424 def test_user_ctor_ctx_manager_custom_init_graph_break (self ):
44254425 counter = [0 ]
@@ -4447,7 +4447,10 @@ def fn(x, counter):
44474447 for i in range (0 , 10 ):
44484448 opt_fn (x , counter )
44494449 self .assertEqual (counter [0 ], 12 )
4450- self .assertEqual (cnt .frame_count , torch ._dynamo .utils .ifdynstaticdefault (3 , 2 ))
4450+ if torch ._dynamo .config .assume_static_by_default :
4451+ self .assertExpectedInline (cnt .frame_count , """2""" )
4452+ else :
4453+ self .assertExpectedInline (cnt .frame_count , """1""" )
44514454
44524455 @unittest .expectedFailure
44534456 def test_many_overlapping_inputs_does_not_explode_guards (self ):
0 commit comments