Skip to content

Trace infrastructure improvement ideas #3013

@yenjames

Description

@yenjames

Summary

This issue documents potential ideas and concerns that need to be addressed for trace infrastructure improvement. Moving trace lowering into MLIR should expose more information to make trace setup decisions automatically.

Automatic Shim Tile destination, packet ID, BD ID, and channel selection

  • We can select available shim tile, S2MM channel, BD ID, and packet ID by inspecting aie.flow and aie.packet_flow ops present in the IR, but this requires restructuring the pass ordering. The key is aie-insert-trace-flows runs after aie-objectfifo-stateful-transform.
  • Prevents collision with any data flow setups.
  • Can work in --lateral-routing and --distribute-channels in #3001.

Multi-shim destination strategy

  • This requires more thinking on use cases we may encounter.
  • Timer synchronization: Should each shim independently start/stop its group of traces.
  • Likely need to share a single XRT buffer to avoid exhausting the 5 available slots, most of which already used for data I/O.

C++ host programs cannot determine trace offset

  • If trace data shares XRT buffer with runtime data, host side must allocate large enough buffer for output_data + trace_data.
  • Python host: Works because it can inspect tensor shapes to find runtime data size.
  • C++ host: Users must manually compute the offset and hardcode it in their host.
  • Consider emitting trace offset metadata into xclbin or generate C++ header with trace constants?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions