Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/mldebug/batch_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,12 @@ def schedule_layer_start(self, next_layer):
if pml:
self.impls[sid].enable_pc_halt()
self.state.pm_reload[sid] = False
# Breakpoint has now been observed for this stamp; clear the
# "already scheduled" guard so the next outer-loop layer can
# arm it normally. For stamps whose target_layer is *not* yet
# this next_layer (early-armed for a future target), the flag
# stays True - preventing re-arm/continue while we walk past.
self.state.break_on_stamp_scheduled[sid] = False

# ------------------------------------------------------------------ #
# Core execution primitives (shared by batch and interactive)
Expand Down Expand Up @@ -440,10 +446,9 @@ def run_layer(self, layer, target_itr=None, cur_it=None):
if not res:
self.state.error = True

# At final iteration of multistamp design, reset scheduling state
# At final iteration of a multistamp layer, drain stamps that have no
# remaining future layer so they don't sit halted at their last breakpoint.
if n_stamp > 1 and (target_itr is None or target_itr == layer.lcp.num_iter):
for sid, _ in enumerate(self.state.break_on_stamp_scheduled):
self.state.break_on_stamp_scheduled[sid] = False
for sid in range(1, n_stamp):
if not self.state.get_next_layer_for_stamp(sid, idx=1):
self.impls[sid].continue_aie()
Expand Down
Loading