Open
Conversation
07e73ff to
bc8a391
Compare
zoecarver
commented
Feb 2, 2026
| @@ -0,0 +1,118 @@ | |||
| # SPDX-FileCopyrightText: (c) 2025 Tenstorrent AI ULC | |||
Contributor
Author
There was a problem hiding this comment.
move the pipe tests into their own directory
Lower ttl.if_src and ttl.if_dst to scf.if with core coordinate checks.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The NOC writes are async, so we need a barrier to ensure all tile writes complete before signaling the destination via semaphore. Without this, the receiver may wake up before all data arrives. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
e7536da to
ed9aba2
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.
Still mostly a poc, but adds primitives to start testing pipe functionality. These can later be used to implement the full spec implementation.
Fairly self contained (added lowering), but does modify copy lowering.
The pipe lowering targets these TTKernel operations:
NocAsyncWriteMulticastOpwrites data from source to all destinations in a rectangular region.NocAsyncWriteMulticastLoopbackSrcOpis the variant used when the source core is within the destination rangeGetNocMulticastAddrOpcomputes the NOC address for a multicast destination region.ConvertLogicalXToTranslatedOp/ConvertLogicalYToTranslatedOpconvert logical core coordinates to NOC-translated coordinatesNocSemaphoreIncOpatomically increments a remote semaphore (used for gather patterns).NocSemaphoreSetMulticastOpmulticasts a semaphore set to all destinations.NocSemaphoreWaitMinOpwaits for semaphore to reach a thresholdNocAsyncWriteBarrierOpensures writes complete before signalingMyLogicalXOp/MyLogicalYOpreturn current core coordinates forif_src/if_dstconditionalsPipeGraph and Semaphore Setup:
PipeGraph::build()walks the module to find all Pipe->CB copy operations (the receiver side). For each pipe, it records the receiver's CB index and the pipe's source coordinates. This information is emitted to a json file (like the dataflow analysis for auto profiler).kernel_runnerreads the pipe graph and determines the maximum semaphore index needed (max(p.srcX for p in pipe_graph)). It then createsSemaphoreDescriptorobjects for indices 0 through max, all initialized to 0, and passes them tottnn.ProgramDescriptorRisk:
Almost entirely self-contained; adds new types (PipeType), new ops (
create_pipe,if_src,if_dst), and new lowering patterns. The only modification to existing code is in CopyLowering which adds detection for pipe operands at the start of matchAndRewrite before falling through to existing tensor/CB copy logic. The pipe codepath is fully separate from existing copy lowering.