Skip to content

Reorder core tick pipeline and make driver I/O progress per-port#47

Draft
Copilot wants to merge 1 commit intonew_verify_updatefrom
copilot/sub-pr-43-yet-again
Draft

Reorder core tick pipeline and make driver I/O progress per-port#47
Copilot wants to merge 1 commit intonew_verify_updatefrom
copilot/sub-pr-43-yet-again

Conversation

Copy link

Copilot AI commented Feb 28, 2026

This PR updates cycle behavior to avoid barrier-induced stalls: the core now receives before executing and sends after execution, and driver FeedIn/Collect now advance independently per port instead of waiting for full-round synchronization. It also aligns task validation and tests with the new progress model.

  • Core tick sequencing

    • Reordered core.Tick() from send/execute-style flow to:
      • doRecv() -> runProgram() -> doSend()
    • Improves forward progress when inputs arrive asynchronously across ports.
  • Driver FeedIn/Collect semantics

    • Replaced global round tracking with per-port progress (portRounds) in both feedInTask and collectTask.
    • Feed-in/collect loops now opportunistically process whichever ports are ready in the current cycle.
    • Task completion is determined by all ports reaching rounds, not by lockstep round barriers.
  • Layout safety and failure behavior

    • Added/used validateTaskLayout(...) to enforce valid (dataLen, stride, portCount) combinations up front.
    • Out-of-range index paths in active processing are treated as invariant violations (panic), preventing silent drops/stalls from inconsistent task configuration.
  • Test updates

    • Updated internal driver tests to the new task fields and semantics (rounds + portRounds).
    • Added/updated opportunistic behavior assertions for non-uniform port readiness in both FeedIn and Collect paths.
    • Removed obsolete barrier-era helper usage.
func (c *Core) Tick() (madeProgress bool) {
	madeProgress = c.doRecv() || madeProgress
	madeProgress = c.runProgram() || madeProgress
	madeProgress = c.doSend() || madeProgress
	return madeProgress
}

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Modify order processing and update feed-in logic Reorder core tick pipeline and make driver I/O progress per-port Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants