Wire the AIE trace buffer through the fused full ELF flow - #154
Open
asyms wants to merge 5 commits into
Open
Conversation
Trace lowering records the buffer's index in the sequence it configures, but that index is resolved against the kernel the host dispatches, which for a fused build is the wrapper rather than the operator. The address was patched from an argument the wrapper did not have, so the trace DMA wrote nowhere and the buffer came back empty. Give the wrapper the buffer at the same index.
Tracing adds a runtime-sequence argument, so a traced ELF cannot be reused by an untraced run or the other way round: the two now get different artifact names and toggling the flag no longer needs the build directory wiped.
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.
stream-dse can now emit AIE tracing, but the trace buffer never reaches the device through the fused full ELF flow: lowering appends it to the operator's runtime sequence, and the address gets patched against the dispatched kernel instead, which is the wrapper. This wires the buffer through so a traced design produces real data, and leaves untraced builds exactly as they were.
trace_sizeinto the sequence, andtrace_sizeandtrace_max_tilesinto stream-dse's codegen, so the design is generated with tracing rather than having it added afterwards.IRON_TRACE_SIZE, and pick how many tiles withIRON_TRACE_NTILES. Off by default, since tracing changes the calling convention and its packet flows need routing a full design may not have spare.This reopens #151, which targeted
update-mlir-aie-latest-nightlyand was closed when that branch merged as #150. It is based ondevelnow, and carries one extra commit for the ELF cache key above.Checked on Strix in a clean venv built exactly as
.github/actions/prereqsdoes, against stream-dse 1.14.0 (what the>=1.13.14floor resolves to today) and mlir-aie 1.4.2.dev16:pytest -m "not extensive" iron/operators/ iron/tests/gives 990 passed, a traced k=1 build passes on hardware, and turning tracing on and off again in one build directory works both ways.black --checkandreuse lintare clean.