Skip to content

Tracing Support in XDNA2#181

Draft
Victor-Jung wants to merge 22 commits intopulp-platform:develfrom
Victor-Jung:pr/xdna-support-v2
Draft

Tracing Support in XDNA2#181
Victor-Jung wants to merge 22 commits intopulp-platform:develfrom
Victor-Jung:pr/xdna-support-v2

Conversation

@Victor-Jung
Copy link
Copy Markdown
Member

@Victor-Jung Victor-Jung commented Apr 7, 2026

This PR adds trace generation via control packets in the Chrome Trace Event Format for visualization with Perfetto. Useful information such as kernel runtime, vector unit utilization, and DMA stalls for each AIE core can be visualized this way.

Below is an example of the generated trace for a double-buffered Add node:
double_buffer_trace

Note: This PR builds on top of PR #179 and should be reviewed after #179 is merged.

Added

  • Two new code transformations to configure the AIE cores and MemTile tracing packets.
  • A new code transformation to configure the host-side buffer to store the trace.

Changed

  • Use --dump-intermediate to dump the npu.write32 instructions in main_physical_with_elfs.mlir (used to parse the trace)
  • Update the XDNA2 test harness to declare a buffer for the trace. The buffer size can be changed with the --trace-buffer-size <size> flag.

Fixed

PR Merge Checklist

  1. The PR is rebased on the latest devel commit and pointing to devel.
  2. Your PR reviewed and approved.
  3. All checks are passing.
  4. The CHANGELOG.md file has been updated.
  5. If the docker was modified, change back its link after review.

@Victor-Jung Victor-Jung added this to the Release 0.2.2 milestone Apr 7, 2026
@Victor-Jung Victor-Jung self-assigned this Apr 7, 2026
@Victor-Jung Victor-Jung added the Feature Addition of new features label Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Addition of new features

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant