File tree Expand file tree Collapse file tree
torchsparsegradutils/benchmarks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -296,9 +296,9 @@ def format_time(t_us):
296296 if np .isnan (t_us ):
297297 return "N/A"
298298 if t_us >= 1e6 : # >= 1 second
299- return f"{ t_us / 1e6 :.3f} s"
299+ return f"{ t_us / 1e6 :.3f} s"
300300 elif t_us >= 1e3 : # >= 1 millisecond
301- return f"{ t_us / 1e3 :.1f} ms"
301+ return f"{ t_us / 1e3 :.1f} ms"
302302 else :
303303 return f"{ t_us :.1f} μs"
304304
@@ -308,7 +308,7 @@ def format_memory(mem_mb):
308308 if np .isnan (mem_mb ):
309309 return "N/A"
310310 if mem_mb >= 1024 :
311- return f"{ mem_mb / 1024 :.1f} GB"
311+ return f"{ mem_mb / 1024 :.1f} GB"
312312 else :
313313 return f"{ mem_mb :.1f} MB"
314314
@@ -350,7 +350,7 @@ def print_results_table_header():
350350 print (
351351 f" { 'Algorithm' :<25} { 'Shape' :<15} { 'Fwd Time±Std' :<15} { 'Fwd Mem±Std' :<15} { 'Bwd Time±Std' :<15} { 'Bwd Mem±Std' :<15} "
352352 )
353- print (f" { '-' * 25 } { '-' * 15 } { '-' * 15 } { '-' * 15 } { '-' * 15 } { '-' * 15 } " )
353+ print (f" { '-' * 25 } { '-' * 15 } { '-' * 15 } { '-' * 15 } { '-' * 15 } { '-' * 15 } " )
354354
355355
356356def save_benchmark_results (records , benchmark_name ):
Original file line number Diff line number Diff line change @@ -787,7 +787,7 @@ def create_summary_report(self):
787787 algorithms = df [algo_col ].value_counts ()
788788 print (f" - Algorithms tested: { ', ' .join (algorithms .index [:5 ])} " )
789789 if len (algorithms ) > 5 :
790- print (f" (and { len (algorithms )- 5 } more)" )
790+ print (f" (and { len (algorithms ) - 5 } more)" )
791791
792792 print (f"\n Visualization files saved to: { self .output_dir } " )
793793 print ("Generated plots:" )
You can’t perform that action at this time.
0 commit comments