[ttl] Allocate pipe resources by transfer liveness#627
Draft
brnorris03 wants to merge 11 commits into
Draft
Conversation
This was referenced May 25, 2026
Use Pipe Transfer IR intervals to reuse sender-ready counters and source-core address-table slots when transfer lifetimes do not overlap. Keep receiver completion per PipeNet. Add focused MLIR checks and a Python lit runtime reproducer for the dual-route PipeNet case.
40f7c7d to
c5c59fe
Compare
cc7254f to
a24473f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem description
PR #624 introduces explicit Pipe Transfer IR, but physical synchronization resources are still allocated mostly by logical pipe or PipeNet identity. That means two same-source transfers consume distinct sender-ready counters and address-table slots even when their transfer lifetimes do not overlap.
In this PR, a transfer is live from the receive post (
ttl.copyfrom pipe to destination DFB) that publishes the receiver-owned destination address until the send (ttl.copyfrom source DFB to pipe) that consumes that address and the corresponding sender-ready count. After that send, the source-core address-table slot and sender-ready counter can be reused even if the public transfer handle remains live untilttl.wait. Allocating by logical pipe keeps resource use tied to the number of logical pipes instead of the number of concurrently live transfers, and prevents the generated resource plan from expressing reuse when same-source transfers are serialized.What's changed
This PR uses explicit Pipe Transfer IR lifetimes to allocate the source-core resources whose values are needed only between receive post (
ttl.copyfrom pipe to destination DFB) and send (ttl.copyfrom source DFB to pipe). For example, this reduces the issue #625 reproducer compiler-managed pipe SRAM scratch from 160 bytes to 32 bytes by reusing non-overlapping address-table entries.ttl.create_pipe,ttl.copy, andttl.waitbehavior unchanged.This PR does not add phased lowering, receive-ahead transfer posting, DFB batching, or transfer grouping (future planned PRs, see below).
Tests
New tests cover same-source overlap and reuse in MLIR lowering, the queue-depth diagnostic for a second receive post before an intervening send, the updated non-uniform multicast destination diagnostic, and runtime Python lit regression coverage based on the dual-route ksplit PipeNet schedule in #625.
Stacked PR sequence
Pipe compilation work required to match Blaze's scalable communication model: GlobalSemaphore-backed counting, explicit L1 address/state, live-interval allocation, and batching where storage is limiting.
ttl.copyplacement.