@@ -65,7 +65,6 @@ def _atexit_print_fn():
6565 destination_file = config .profiling__destination
6666
6767 with extended_open (destination_file , mode = "w" ):
68-
6968 # Reverse sort in the order of compile+exec time
7069 for ps in sorted (
7170 _atexit_print_list , key = lambda a : a .compile_time + a .fct_call_time
@@ -358,7 +357,7 @@ def class_impl(self):
358357 """
359358 # timing is stored by node, we compute timing by class on demand
360359 rval = {}
361- for ( fgraph , node ) in self .apply_callcount :
360+ for fgraph , node in self .apply_callcount :
362361 typ = type (node .op )
363362 if self .apply_cimpl [node ]:
364363 impl = "C "
@@ -401,7 +400,7 @@ def compute_total_times(self):
401400
402401 """
403402 rval = {}
404- for ( fgraph , node ) in self .apply_time :
403+ for fgraph , node in self .apply_time :
405404 if node not in rval :
406405 self .fill_node_total_time (fgraph , node , rval )
407406 return rval
@@ -437,7 +436,7 @@ def op_impl(self):
437436 """
438437 # timing is stored by node, we compute timing by Op on demand
439438 rval = {}
440- for ( fgraph , node ) in self .apply_callcount :
439+ for fgraph , node in self .apply_callcount :
441440 if self .apply_cimpl [node ]:
442441 rval [node .op ] = "C "
443442 else :
@@ -711,7 +710,7 @@ def summary_nodes(self, file=sys.stderr, N=None):
711710
712711 atimes .sort (reverse = True , key = lambda t : (t [1 ], t [3 ]))
713712 tot = 0
714- for ( f , t , a , nd_id , nb_call ) in atimes [:N ]:
713+ for f , t , a , nd_id , nb_call in atimes [:N ]:
715714 tot += t
716715 ftot = tot * 100 / local_time
717716 if nb_call == 0 :
@@ -840,7 +839,7 @@ def summary_memory(self, file, N=None):
840839 var_mem = {} # variable->size in bytes; don't include input variables
841840 node_mem = {} # (fgraph, node)->total outputs size (only dense outputs)
842841
843- for ( fgraph , node ) in self .apply_callcount :
842+ for fgraph , node in self .apply_callcount :
844843 fct_memory .setdefault (fgraph , {})
845844 fct_memory [fgraph ].setdefault (node , [])
846845 fct_shapes .setdefault (fgraph , {})
@@ -1610,7 +1609,7 @@ def exp_float32_op(op):
16101609 printed_tip = True
16111610
16121611 # tip 4
1613- for ( fgraph , a ) in self .apply_time :
1612+ for fgraph , a in self .apply_time :
16141613 node = a
16151614 if isinstance (node .op , Dot ) and all (
16161615 len (i .type .broadcastable ) == 2 for i in node .inputs
@@ -1630,7 +1629,7 @@ def exp_float32_op(op):
16301629 # The tip was about MRG_RandomStream which is removed
16311630
16321631 # tip 6
1633- for ( fgraph , a ) in self .apply_time :
1632+ for fgraph , a in self .apply_time :
16341633 node = a
16351634 if isinstance (node .op , Dot ) and len ({i .dtype for i in node .inputs }) != 1 :
16361635 print (
0 commit comments