Commit 9951499
zhusy54
Refactor: unify two-phase dispatch with per-core pending awareness
Replace the separate idle-dispatch and AIC-only pending-dispatch loops
with a single dispatch_shape() that iterates IDLE then PENDING phases
for every resource shape (AIC, AIV, MIX).
Key changes:
- Add CoreTracker::DispatchPhase enum and get_dispatchable_cores() as
a unified query for both phases
- Rename get_idle_cluster_offset_states -> get_idle_core_offset_states;
skip AIC-centric pending_occupied filter for AIV/MIX (fixes a latent
bug where running+pending AIC blocked AIV idle dispatch)
- Consolidate get_pending_only_cluster_offset_states into
get_pending_core_offset_states, extending pending dispatch to AIV
and MIX shapes
- MIX pending dispatch: require at least one running core per cluster
but allow idle cores to participate; dispatch_mix_block_to_cluster
resolves per-core to_pending (idle cores use to_pending=false to
trigger change_core_state, running cores use to_pending=true)
- Rename dispatch_block_to_cluster -> dispatch_block with a to_pending
parameter; AIV pending dispatch passes resolved core bit offset
- Fix infinite spin when all tasks in a pending-phase batch are
sync_start (requeued without dispatching); dispatch_shape now breaks
when dispatched_any is false1 parent 638da68 commit 9951499
2 files changed
Lines changed: 365 additions & 378 deletions
File tree
- src
- a2a3/runtime/tensormap_and_ringbuffer/aicpu
- a5/runtime/tensormap_and_ringbuffer/aicpu
0 commit comments