Skip to content

xrt-smi: support platform device identification and aie2ps validate archive - #10093

Merged
chvamshi-xilinx merged 5 commits into
Xilinx:masterfrom
wendyliang25:devid
Oct 8, 2026
Merged

chvamshi-xilinx merged 5 commits into
Xilinx:masterfrom
wendyliang25:devid

Conversation

@wendyliang25

Copy link
Copy Markdown
Collaborator

Problem solved by the commit

Platform (non-PCI) devices such as xc2ve3858 (Versal Edge / aie2ps / npu12) lacked device identification in xrt-smi and failed during examine and validate. Specifically:

  1. xrt-smi examine attempted to query rom_vbnv and pcie_id, which are not supported on platform devices, resulting in missing or fallback device names and unrecognized hardware types.
  2. xrt-smi validate failed to resolve the validate runner archive path and hardware configuration for aie2ps platform devices.

Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered

Discovered when running xrt-smi examine and xrt-smi validate on platform SoC targets (e.g., xc2ve3858).

How problem was solved, alternative solutions (if any) and why they were rejected

  1. Added device_id_str query (query_requests.h):

    • Added xq::device_id_str to allow shims to report a human-readable part name (e.g. "xc2ve3858") sourced from device-tree compatible strings.
    • Introduced xrt_core::platform::get_device_name() in info_platform.{h,cpp} to inspect device_id_str first, falling back to rom_vbnv and numeric PCIe device ID so existing devices remain unaffected.
    • Updated XBUtilities.cpp to use get_device_name().
  2. Platform device identification in smi_hardware_config (smi.{h,cpp}, smi_ryzen.cpp):

    • Added overloads for get_hardware_type() and get_family() taking std::string devid_str and const xrt_core::device* dev.
    • Checks device_id_str before falling back to pcie_id, mapping "xc2ve3858" to hardware_type::aie2ps / hardware_family::aie2ps.
    • Configured get_validate_archive_path() to resolve hardware_family::aie2ps to Runner/xrt_smi_ve2.a.
    • Updated smi_ryzen.cpp and XBUtilities.cpp to call get_hardware_type(device) instead of querying pcie_id directly.

Risks (if any) associated the changes in the commit

Low risk. Standard PCIe and Ryzen devices continue to fall back to rom_vbnv and pcie_id without behavioral changes.

What has been tested and how, request additional testing if necessary

  • Verified xrt-smi examine on xc2ve3858: device name displays as xc2ve3858 and architecture version displays as aie2ps.
  • Verified xrt-smi validate locates and unpacks the Runner/xrt_smi_ve2.a test suite archive.

Documentation impact (if any)

None

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Comment thread src/runtime_src/core/common/query_requests.h
@wendyliang25
wendyliang25 requested review from aktondak and a balanced review from Copilot and removed request for AShivangi, chvamshi-xilinx, rbramand-xilinx and stsoe October 2, 2026 22:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Advertised AIE2PS validation tests still directly query unsupported PCIe identifiers and can fail during default validation.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds platform-device identification and AIE2PS validation archive routing to xrt-smi.

Changes:

  • Adds string-based device identification with PCIe/VBNV fallbacks.
  • Maps AIE2PS hardware to the VE2 validation archive and Strix configuration.
  • Updates device listings and reports to use platform-aware identification.
File Description
XBUtilities.cpp Uses platform-aware names and hardware detection.
smi.h Adds string/device hardware lookup APIs.
smi.cpp Implements AIE2PS detection and archive routing.
smi_ryzen.cpp Selects Strix configuration for AIE2PS.
query_requests.h Defines the device part-name query.
info_platform.h Declares platform-aware device naming.
info_platform.cpp Implements device-name fallback behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/runtime_src/core/common/smi/smi_ryzen.cpp
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Comment thread src/runtime_src/core/common/smi/smi.cpp Outdated
};
}

config_gen_aie2ps::

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.

Is it captured somewhere in documentation, what all commands are applicable to aie2ps family of devices? Confluence?

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.

Hi @aktondak , it is not in a dedicated page yet. The applicable command surface is defined in code in config_gen_aie2ps (smi_ryzen.cpp)

  • examine reports: aie-partitions/host/platform/telemetry/preemption/clocks/debug;
  • validate tests: latency/throughput/runlist-latency/runlist-throughput;

Comment thread src/runtime_src/core/tools/common/XBUtilities.cpp Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Validation still performs an unsupported direct rom_vbnv query before executing the AIE2PS test archive.

Review effort: Balanced
Findings: 1 High severity · 1 Low severity

Open (2)
Resolved since last review (1)

Comment thread src/runtime_src/core/common/info_platform.cpp
Comment thread src/runtime_src/core/common/smi/smi.cpp
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

wendyliang25 and others added 5 commits October 7, 2026 18:32
Add a device_id_str query so shims can report a human-readable part
number (e.g. xc2ve3858). xrt-smi examine now shows this string as the
device Name, falling back to the ROM VBNV and then the numeric device id
when the query is empty, so existing devices are unaffected.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Wendy Liang <wendy.liang@amd.com>
Support device identification for platform parts (e.g., xc2ve3858) by
querying device_id_str before falling back to pcie_id in smi_hardware_config,
mapping them to the aie2ps hardware family. Use the aie2ps family to resolve
the validate runner archive to Runner/xrt_smi_ve2.a.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Wendy Liang <wendy.liang@amd.com>
Update validation test runners and diagnostic tools to determine hardware
type via get_hardware_type(device) instead of querying pcie_id directly,
preventing errors on platform devices that lack PCIe IDs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Wendy Liang <wendy.liang@amd.com>
Provide a dedicated config_gen_aie2ps configuration generator that
advertises only the validation tests supported on aie2ps devices
(latency and throughput, with runlist tests hidden), avoiding failures
from tests like GEMM which are not packaged in xrt_smi_ve2.a.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Wendy Liang <wendy.liang@amd.com>
Implement device hardware type resolution locally in XBUtilities to avoid
requiring new symbol exports or shim-side implementations. Validation test
runners and diagnostic tools now determine hardware type through
XBUtilities::get_hardware_type(device), checking device_id_str first for
platform parts before querying pcie_id, ensuring backward compatibility with
existing shims.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Wendy Liang <wendy.liang@amd.com>
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@chvamshi-xilinx
chvamshi-xilinx merged commit 1932bdf into Xilinx:master Oct 8, 2026
26 checks passed
stsoe pushed a commit that referenced this pull request Oct 11, 2026
* Remove validate tests from PFs (#10040)



* [XRT-SMI] Cleanup logic into specific files and prune VF specific options (#10047)



* update platform report (#10052)



* CR-1272937: xrt::kernel::group_id() throw on missing memory connectivity (#10028)

When a kernel argument has no memory bank connectivity, group_id() returned
65535 (no_memidx encoded as 0xFFFF). Passing that value to xrt::bo() caused
a cryptic std::out_of_range crash instead of an actionable error.

Validate the argument index and memory group assignment in group_id() and
throw xrt_core::error(EINVAL) with a descriptive message. connectivity and
no_memidx are public so group_id() can use them.




* CR-1272937: throw from group_id() only for buffer arguments (#10059)

group_id() must still throw when a global/constant argument has no memory
connectivity so xrt::bo is not given bank 0xffff. Scalar, stream, and local
arguments are queried by field applications and must keep the legacy encoded
invalid group.




* AIESW-41600 Remove skipped validate tests for npu3 (#10062)




* update list of commands for vf (#10075)



* xrt-smi: gate validate hidden options, align --pmode help, report each --loop iteration (#10076)

Require --advanced to parse validate hidden options (matching examine),
and use the same --pmode mode list as configure for Ryzen/NPU3.

Run the validate --loop iterations from the validate subcommand instead of
inside TestRunner::startTest, so each iteration's result is printed and
recorded in the JSON output instead of only the last one. A warning in a
later iteration no longer masks an earlier failure.



* Support displaying soft realtime in aie-partitions report (#10085)




* [XRT-SMI] Add warning for enabled categories after disable (#10081)



* Use create_dtrace_handle_elf API for creating dtrace handle (#10084)




* xrt-smi: support platform device identification and aie2ps validate archive (#10093)

Signed-off-by: Wendy Liang <wendy.liang@amd.com>
Signed-off-by: Akshay Tondak <aktondak@amd.com>
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.

4 participants