1414
1515from graph_net .paddle import utils
1616from graph_net import path_utils
17- from graph_net import test_compiler_utils
17+ from graph_net import test_compiler_util
1818from graph_net .benchmark_result import BenchmarkResult
1919
2020
@@ -103,8 +103,8 @@ def measure_performance(model_call, args, synchronizer_func):
103103
104104 for i in range (args .trials ):
105105 # End-to-end timing (naive_timer)
106- duration_box = test_compiler_utils .DurationBox (- 1 )
107- with test_compiler_utils .naive_timer (duration_box , synchronizer_func ):
106+ duration_box = test_compiler_util .DurationBox (- 1 )
107+ with test_compiler_util .naive_timer (duration_box , synchronizer_func ):
108108 # GPU-only timing (CUDA Events)
109109 start_event = paddle .device .Event (enable_timing = True )
110110 end_event = paddle .device .Event (enable_timing = True )
@@ -120,8 +120,8 @@ def measure_performance(model_call, args, synchronizer_func):
120120 f"Trial { i + 1 } : e2e={ duration_box .value :.5f} ms, gpu={ gpu_time_ms :.5f} ms"
121121 )
122122
123- stats ["e2e" ] = test_compiler_utils .get_timing_stats (e2e_times )
124- stats ["gpu" ] = test_compiler_utils .get_timing_stats (gpu_times )
123+ stats ["e2e" ] = test_compiler_util .get_timing_stats (e2e_times )
124+ stats ["gpu" ] = test_compiler_util .get_timing_stats (gpu_times )
125125 else : # CPU or other devices
126126 hardware_name = platform .processor ()
127127 print (
@@ -130,12 +130,12 @@ def measure_performance(model_call, args, synchronizer_func):
130130
131131 e2e_times = []
132132 for i in range (args .trials ):
133- duration_box = test_compiler_utils .DurationBox (- 1 )
134- with test_compiler_utils .naive_timer (duration_box , synchronizer_func ):
133+ duration_box = test_compiler_util .DurationBox (- 1 )
134+ with test_compiler_util .naive_timer (duration_box , synchronizer_func ):
135135 outs = model_call ()
136136 print (f"Trial { i + 1 } : e2e={ duration_box .value :.4f} ms" )
137137 e2e_times .append (duration_box .value )
138- stats ["e2e" ] = test_compiler_utils .get_timing_stats (e2e_times )
138+ stats ["e2e" ] = test_compiler_util .get_timing_stats (e2e_times )
139139
140140 return outs , stats
141141
@@ -261,7 +261,7 @@ def test_single_model(args):
261261 if running_eager_success and running_compiled_success :
262262 check_outputs (args , expected_out , compiled_out )
263263
264- test_compiler_utils .print_times_and_speedup (
264+ test_compiler_util .print_times_and_speedup (
265265 args , eager_time_stats , compiled_time_stats
266266 )
267267
0 commit comments