Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[XDP] Deprecate compile time trace #8788

Merged
merged 2 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading