Skip to content

Commit

Permalink
Remove compile time trace
Browse files Browse the repository at this point in the history
Signed-off-by: Vinod Pangul <[email protected]>
  • Loading branch information
vipangul committed Feb 25, 2025
1 parent ae4ce7a commit 912bab4
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ namespace xdp {
if (!metadataReader)
return;

// Catch when compile-time trace is specified (e.g., --event-trace=functions)
// Make sure compiler trace option is available as runtime
auto compilerOptions = metadataReader->getAIECompilerOptions();
setRuntimeMetrics(compilerOptions.event_trace == "runtime");

if (!getRuntimeMetrics()) {
std::stringstream msg;
msg << "Found compiler trace option of " << compilerOptions.event_trace
<< ". No runtime AIE metrics will be changed.";
msg << "AIE trace will not be configured since design was not compiled with --event-trace=runtime."
<< " If runtime configuration is desired, please use --event-trace=runtime."
xrt_core::message::send(severity_level::info, "XRT", msg.str());
return;
}

// Process AIE_trace_settings metrics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,22 +139,14 @@ void AieTracePluginUnified::updateAIEDevice(void *handle) {
xrt_core::message::send(severity_level::warning, "XRT", "AIE Metadata is empty for AIE Trace");
return;
}
if (AIEData.metadata->configMetricsEmpty() && AIEData.metadata->getRuntimeMetrics()) {
if (AIEData.metadata->configMetricsEmpty()) {
AIEData.valid = false;
xrt_core::message::send(severity_level::warning, "XRT",
AIE_TRACE_TILES_UNAVAILABLE);
return;
}
AIEData.valid = true; // initialize struct

//TODO: Should be removed in 2025.1 release.
if(!AIEData.metadata->getRuntimeMetrics())
{
xrt_core::message::send(severity_level::warning, "XRT",
"AI Engine compile time event-trace arguments will be deprecated. "
"Please plan to use runtime event trace by re-compiling AI Engine with --event-trace=runtime.");
}

#ifdef XDP_CLIENT_BUILD
AIEData.metadata->setHwContext(context);
AIEData.implementation = std::make_unique<AieTrace_WinImpl>(db, AIEData.metadata);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ namespace xdp {
{
xrt_core::message::send(severity_level::info, "XRT", "Calling AIE Trace IPU updateDevice.");

// compile-time trace
// Make sure compiler trace option is available as runtime
if (!metadata->getRuntimeMetrics())
return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ namespace xdp {
return false;
}

// Check compile-time trace
// Make sure compiler trace option is available as runtime
if (!metadata->getRuntimeMetrics()) {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ namespace xdp {
return false;
}

// Check compile-time trace
// Make sure compiler trace option is available as runtime
if (!metadata->getRuntimeMetrics()) {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ AieTrace_x86Impl::AieTrace_x86Impl(VPDatabase *database,
}

void AieTrace_x86Impl::updateDevice() {
// compile-time trace
// Make sure compiler trace option is available as runtime
if (!metadata->getRuntimeMetrics()) {
return;
}
Expand Down

0 comments on commit 912bab4

Please sign in to comment.