Skip to content

Add Debug.profiling_runtime_config consumer for aie_dtrace#55

Open
jyothees99 wants to merge 1 commit intoXilinx:masterfrom
jyothees99:aie-dtrace-profiling-runtime-config
Open

Add Debug.profiling_runtime_config consumer for aie_dtrace#55
jyothees99 wants to merge 1 commit intoXilinx:masterfrom
jyothees99:aie-dtrace-profiling-runtime-config

Conversation

@jyothees99
Copy link
Copy Markdown
Collaborator

Introduce a shared XDP utility under plugin/vp_base/profiling_runtime_config.{h,cpp} that parses the inline JSON blob carried by the new xrt.ini option Debug.profiling_runtime_config exactly once and exposes its control_instrumentation section. The schema currently recognized is control_instrumentation = { aie_tile, mem_tile, interface_tile }; any other top-level keys (e.g. event_trace) are accepted but ignored and can be wired up in a follow-up. Parse failures and unknown keys produce one-shot warnings; recognized keys produce one info line each.

The aie_dtrace plugin (aie_dtrace_plugin.cpp, aie_dtrace_ve2.cpp) now guards its hooks on profiling_runtime_config::aie_dtrace_enabled(), which returns true when either Debug.aie_dtrace is set in xrt.ini or the blob carries control_instrumentation. The corresponding load gate in xrt_coreutil (core/common/xdp/profile.cpp, in the XRT repo) uses the same auto-enable rule.

AieProfileMetadata's aie_dtrace_ini_metadata_tag constructor now prefers the blob: control_instrumentation.interface_tile is synthesized into "all:" and forwarded to getConfigMetricsForInterfaceTiles (unblocks the ddr_bandwidth use case today). aie_tile and mem_tile entries are logged for a follow-up. When the blob is empty, missing or malformed, behavior is identical to before (legacy AIE_dtrace_settings.* xrt.ini reads).

aie_trace, aie_profile, and ml_timeline are intentionally untouched and keep using their existing xrt.ini settings.

Made-with: Cursor

Introduce a shared XDP utility under plugin/vp_base/profiling_runtime_config.{h,cpp}
that parses the inline JSON blob carried by the new xrt.ini option
Debug.profiling_runtime_config exactly once and exposes its
control_instrumentation section. The schema currently recognized is
control_instrumentation = { aie_tile, mem_tile, interface_tile }; any
other top-level keys (e.g. event_trace) are accepted but ignored and
can be wired up in a follow-up. Parse failures and unknown keys produce
one-shot warnings; recognized keys produce one info line each.

The aie_dtrace plugin (aie_dtrace_plugin.cpp, aie_dtrace_ve2.cpp) now
guards its hooks on profiling_runtime_config::aie_dtrace_enabled(),
which returns true when either Debug.aie_dtrace is set in xrt.ini or
the blob carries control_instrumentation. The corresponding load gate
in xrt_coreutil (core/common/xdp/profile.cpp, in the XRT repo) uses
the same auto-enable rule.

AieProfileMetadata's aie_dtrace_ini_metadata_tag constructor now
prefers the blob: control_instrumentation.interface_tile is synthesized
into "all:<metric>" and forwarded to getConfigMetricsForInterfaceTiles
(unblocks the ddr_bandwidth use case today). aie_tile and mem_tile
entries are logged for a follow-up. When the blob is empty, missing or
malformed, behavior is identical to before (legacy
AIE_dtrace_settings.* xrt.ini reads).

aie_trace, aie_profile, and ml_timeline are intentionally untouched and
keep using their existing xrt.ini settings.

Made-with: Cursor
xrt_core::message::send(severity_level::info, "XRT", "AIE dtrace: update device.");

if (!xrt_core::config::get_aie_dtrace())
if (!profiling_runtime_config::aie_dtrace_enabled())
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jyothees99 We want to keep supporting enabling dtrace with xrt.ini for non-VAIML flow. So, we need to include the xrt ini config check too.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IshitaGhosh I am using xrt.ini value also to determine aie_dtrace_enabled. It's OR of xrt.ini and profile_runtime_config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants