@@ -194,7 +194,6 @@ def rewrite(self, context):
194
194
return REWRITER_RESULT .FAIL
195
195
196
196
def run_internal (self ):
197
- log .debug ("enter loop rewriter" )
198
197
for op in self .g .get_nodes ():
199
198
if not is_loopcond_op (op ):
200
199
continue
@@ -278,11 +277,9 @@ def _crop_loop_body_sub_graph(self, context):
278
277
output_ids = [out_tensor_value_info .id for out_tensor_value_info in outputs ]
279
278
ops , enter_nodes , _ = self .find_subgraph (set (input_ids ), set (output_ids ), self .g , merge_as_end = False )
280
279
281
- other_enter_input_ids = []
282
280
for enter_node in enter_nodes :
283
281
# connect Enter's output to Enter's input
284
282
self .g .replace_all_inputs (ops , enter_node .output [0 ], enter_node .input [0 ])
285
- other_enter_input_ids .append (enter_node .input [0 ])
286
283
287
284
return GraphInfo (ops , inputs , outputs )
288
285
@@ -292,11 +289,9 @@ def _crop_loop_condition_sub_graph(self, context):
292
289
outputs = [TensorValueInfo (o , self .g ) for o in output_ids ]
293
290
ops , enter_nodes , merge_nodes = self .find_subgraph (set (input_ids ), set (output_ids ), self .g , merge_as_end = True )
294
291
295
- other_enter_input_ids = []
296
292
for enter_node in enter_nodes :
297
293
# connect Enter's output to Enter's input
298
294
self .g .replace_all_inputs (ops , enter_node .output [0 ], enter_node .input [0 ])
299
- other_enter_input_ids .append (enter_node .input [0 ])
300
295
301
296
dependent_vars = []
302
297
for merge_node in merge_nodes :
0 commit comments