Skip to content

Commit 779a7ad

Browse files
authored
Add sort_by_time flag to debug_executor.run method (#12402)
1 parent db1ed77 commit 779a7ad

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

python/tvm/contrib/debugger/debug_executor.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ def run(
284284
limit_zero_time_iterations=100,
285285
cooldown_interval_ms=0,
286286
repeats_to_cooldown=1,
287+
sort_by_time=True,
287288
**input_dict,
288289
):
289290
"""Run forward execution of the graph with debug
@@ -320,6 +321,9 @@ def run(
320321
repeats_to_cooldown: int, optional
321322
The number of repeats before the cooldown is activated.
322323
324+
sort_by_time: bool, optional
325+
Whether to sort the debug output by time.
326+
323327
input_dict : dict of str to NDArray
324328
List of input values to be feed to
325329
"""
@@ -340,7 +344,7 @@ def run(
340344
# Step 3. Dump the Chrome trace to the dump folder
341345
self.debug_datum.dump_chrome_trace()
342346
# Step 4. Display the collected information
343-
self.debug_datum.display_debug_result()
347+
self.debug_datum.display_debug_result(sort_by_time)
344348

345349
def run_individual(
346350
self,

0 commit comments

Comments
 (0)