fix: share cpu sim pipe state across runtime tasks#29
Merged
Conversation
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.
Summary
TPipeshared state by runtime task cookie as well as block/pipe metadata, so mixed tasks on the same cluster do not alias the same FIFO stateDIR_C2Vlocal FIFO semantics from the earlier fix, but make them safe for the cross-DSOa5simexecution modelRoot Cause
The original CPU-sim split-pipe fix only covered in-process tests. In the real
a5simBGEMM flow, the producer and consumers run through separate DSOs under the host runtime, so plain header-local static pipe state is not shared across them. On top of that, reusing one shared FIFO per block was too coarse for the PTO2 scheduler, which can dispatch multiple mixed tasks on the same cluster.This PR moves CPU-sim pipe coordination onto runtime-provided hooks and keys the shared state by task cookie, which makes the public PTO ISA interface work unchanged across CPU sim and A5.
Validation
Result:
12/12tests passedEnd-to-end validation was also run against the real
simplera5simBGEMM flow after the paired runtime-side fix:Result:
TEST PASSEDC: PASS (131072/131072 elements matched)Related
Closes #26.