[CI Test] TRID DMA barrier lowering#1
Closed
shutovilyaep wants to merge 4 commits into
Closed
Conversation
8bb8613 to
6a952dc
Compare
Add use-trid-barriers option to convert-ttl-to-ttkernel pass and
ttl-to-ttkernel-pipeline. When enabled, ttl.copy emits
noc_async_{read,write}_set_trid before DMA operations, and ttl.wait
emits noc_async_{read,write}_barrier_with_trid instead of global
barriers.
Default behavior (use-trid-barriers=false) preserves existing global
barrier semantics from main branch.
Key changes:
- TridAllocator class manages 16 TRID slots with overflow handling
- CopyLowering/WaitLowering patterns respect useTridBarriers flag
- TTKernel cleanup patterns conditionally registered for TRID mode
- SCF structural type conversions enabled for transfer handle types
Addresses: tenstorrent#87
- trid_barriers.mlir: Tests TRID-aware lowering with use-trid-barriers=true
- Verifies noc_async_{read,write}_set_trid emission
- Verifies noc_async_{read,write}_barrier_with_trid emission
- Tests TRID overflow handling (17 copies without waits)
- dma_global_barriers.mlir: Tests default global barrier mode
- Verifies noc_async_{read,write}_barrier emission (no TRID)
- Ensures backward compatibility with main branch behavior
- Update existing tests to use explicit use-trid-barriers=true where
they expect TRID-specific output
Enable use-trid-barriers in TTLToCpp translation tests that verify TRID-specific C++ codegen output. Tests now explicitly request TRID mode to match their expected noc_async_*_set_trid and barrier_with_trid output.
Add use_trid_barriers to E2EConfig and TestConfig to enable runtime testing of both barrier modes: - E2EConfig.use_trid_barriers controls pipeline pass option - TestConfig includes use_trid_barriers for test ID disambiguation - Pipeline builder forwards option to convert-ttl-to-ttkernel - Runner includes use_trid_barriers in kernel cache key - CONFIGS includes one TRID-enabled config for coverage Test IDs now include _trid suffix when use_trid_barriers=True to ensure unique pytest node IDs.
37c11ba to
2dba10e
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.
deprecated in favor of #2