Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 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
9 changes: 8 additions & 1 deletion profile/plugin/aie_profile/aie_profile_metadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ namespace xdp {
}
catch (...) {
std::stringstream msg;
msg << "Channel specifications in graph_based_interface_metrics "
msg << "Channel specifications in graph_based_interface_tile_metrics "
<< "are not valid and hence ignored.";
xrt_core::message::send(severity_level::warning, "XRT", msg.str());
}
Expand Down Expand Up @@ -1083,6 +1083,9 @@ namespace xdp {
}
catch (std::invalid_argument const&) {
// maxColumn is not an integer i.e either 1st style or wrong format, skip for now
xrt_core::message::send(severity_level::warning, "XRT",
"tile_based_interface_tile_metrics: invalid range line. Ignored: "
+ metricsSettings[i]);
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

Pass 2’s new "invalid range line" warning is also hit for valid single-column settings that include channels (e.g. <col>:<metric>:<channel>), because metrics[i][1] is the metric name and convertStringToUint8(metrics[i][1]) throws. Pass 3 then handles the entry successfully, so this warning becomes a false positive. Consider keeping this branch silent (skip and let Pass 3 parse), or disambiguating before warning (e.g., only warn if the entry can’t match any supported form after all passes).

Suggested change
// maxColumn is not an integer i.e either 1st style or wrong format, skip for now
xrt_core::message::send(severity_level::warning, "XRT",
"tile_based_interface_tile_metrics: invalid range line. Ignored: "
+ metricsSettings[i]);
// maxColumn is not an integer. This may be a valid single-column setting
// (for example <col>:<metric>:<channel>) that is handled in a later pass,
// so do not warn here.

Copilot uses AI. Check for mistakes.
continue;
}

Expand Down Expand Up @@ -1149,6 +1152,10 @@ namespace xdp {

try {
col = aie::convertStringToUint8(metrics[i][1]);
xrt_core::message::send(severity_level::warning, "XRT",
"tile_based_interface_tile_metrics: invalid format. Ignored: "
+ metricsSettings[i]);
continue;
Comment on lines 1168 to +1173
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

In Pass 3, successfully parsing metrics[i][1] as an integer (max column) corresponds to a valid range-style entry like <mincol>:<maxcol>:<metric> (size 3). Because Pass 3 doesn’t exclude size-3 range entries (it only skips metrics[i].size() == 4), this code will emit "invalid format" warnings for valid range settings that were already applied in Pass 2. Consider skipping range-style entries in Pass 3 (e.g., detect/skip when metrics[i].size() >= 3 and metrics[i][1] is an integer), or track processed indices across passes like the trace parser does.

Copilot uses AI. Check for mistakes.
}
catch (std::invalid_argument const&) {
// max column is not a number, so the expected single column specification. Handle this here
Expand Down
5 changes: 4 additions & 1 deletion profile/plugin/aie_profile/edge/aie_profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ namespace xdp {
if (!runtimeCounters) {
// No runtime counters means there were no valid metrics configured for profiling this design. There is nothing to profile, so return early.
xrt_core::message::send(severity_level::warning, "XRT",
"No valid metric setting found for this design. Please specify valid tile_based_[aie|aie_memory|interface_tile]_metrics under \"AIE_profile_settings\" section in your xrt.ini if you want to configure this design.");
"No valid metric setting found for this design. Please specify valid "
"graph_based_[aie|aie_memory|memory_tile|interface_tile]_metrics and/or "
"tile_based_[aie|aie_memory|memory_tile|interface_tile|microcontroller]_metrics "
"under \"AIE_profile_settings\" section in your xrt.ini if you want to configure this design.");
return;
}
}
Expand Down
5 changes: 4 additions & 1 deletion profile/plugin/aie_profile/ve2/aie_profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ namespace xdp {

if (counters.empty()) {
xrt_core::message::send(severity_level::warning, "XRT",
"AIE Profile Counters were not found for this design. Please specify tile_based_[aie|aie_memory|interface_tile]_metrics under \"AIE_profile_settings\" section in your xrt.ini.");
"AIE Profile Counters were not found for this design. Please specify "
"graph_based_[aie|aie_memory|memory_tile|interface_tile]_metrics and/or "
"tile_based_[aie|aie_memory|memory_tile|interface_tile|microcontroller]_metrics "
"under \"AIE_profile_settings\" section in your xrt.ini.");
(db->getStaticInfo()).setIsAIECounterRead(deviceID,true);
return;
}
Expand Down
13 changes: 10 additions & 3 deletions profile/plugin/aie_trace/aie_trace_metadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ namespace xdp {
&& (std::find(allValidEntries.begin(), allValidEntries.end(), graphMetrics[i][1]) == allValidEntries.end())) {
std::stringstream msg;
msg << "Could not find " << entryType << " " << graphMetrics[i][1]
<< " as specified in graph_based_" << tileName << "_metrics setting."
<< " as specified in graph_based_" << tileName << "_tile_metrics setting."
<< " The following " << entryType << "s are valid : ";
if (!allValidEntries.empty()) {
msg << allValidEntries[0];
Expand Down Expand Up @@ -460,7 +460,7 @@ namespace xdp {
&& (std::find(allValidEntries.begin(), allValidEntries.end(), graphMetrics[i][1]) == allValidEntries.end())) {
std::stringstream msg;
msg << "Could not find " << entryType << " " << graphMetrics[i][1]
<< " as specified in graph_based_" << tileName << "_metrics setting."
<< " as specified in graph_based_" << tileName << "_tile_metrics setting."
<< " The following " << entryType << "s are valid : ";
if (!allValidEntries.empty()) {
msg << allValidEntries[0];
Expand Down Expand Up @@ -788,7 +788,7 @@ namespace xdp {
}
} catch (...) {
std::stringstream msg;
msg << "Channel specifications in graph_based_interface_metrics "
msg << "Channel specifications in graph_based_interface_tile_metrics "
<< "are not valid and hence ignored.";
xrt_core::message::send(severity_level::warning, "XRT", msg.str());
}
Expand Down Expand Up @@ -894,6 +894,9 @@ namespace xdp {
}
catch (std::invalid_argument const&) {
// Max column is not an integer, so either first style or wrong format. Skip for now.
xrt_core::message::send(severity_level::warning, "XRT",
"tile_based_interface_tile_metrics: invalid range line. Ignored: "
+ metricsSettings[i]);
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

The new warning in the maxCol parse failure path will also trigger for valid single-column settings that include a channel (e.g. <col>:<metric>:<channel>). In that case metrics[i][1] is the metric name (non-integer), Pass 2 will warn "invalid range line" and then Pass 3 will still correctly process the setting, producing a misleading warning. Consider not warning here (as the existing comment says “skip for now”), or only emitting the warning after all passes if the entry is still unprocessed / cannot be parsed as any supported form.

Suggested change
// Max column is not an integer, so either first style or wrong format. Skip for now.
xrt_core::message::send(severity_level::warning, "XRT",
"tile_based_interface_tile_metrics: invalid range line. Ignored: "
+ metricsSettings[i]);
// Max column is not an integer, so this may be another supported style.
// Skip this pass and allow later passes to process it.

Copilot uses AI. Check for mistakes.
continue;
}

Expand Down Expand Up @@ -952,6 +955,10 @@ namespace xdp {
uint8_t col = 0;
try {
col = aie::convertStringToUint8(metrics[i][1]);
xrt_core::message::send(severity_level::warning, "XRT",
"tile_based_interface_tile_metrics: invalid format. Ignored: "
+ metricsSettings[i]);
continue;
}
catch (std::invalid_argument const&) {
// Max column is not an integer, so expected single column specification. Handle this here.
Expand Down
Loading