Skip to content

AIESW-29257: Fix xrt-smi device ID reporting#9716

Open
sandilya-xilinx wants to merge 4 commits intoXilinx:masterfrom
sandilya-xilinx:29257
Open

AIESW-29257: Fix xrt-smi device ID reporting#9716
sandilya-xilinx wants to merge 4 commits intoXilinx:masterfrom
sandilya-xilinx:29257

Conversation

@sandilya-xilinx
Copy link
Copy Markdown

[why]
xrt-smi JSON report showed "id": "00000000-0000-0000-0000-000000000000" for all Ryzen/NPU devices (Phoenix, Strix, Strix2, StrixH, Krackan, Medusa, Soundwave). The root cause: rom_time_since_epoch returns a hardcoded 0 for Ryzen devices instead of throwing, so the existing Alveo 1RP path silently set id="0". No Ryzen-specific path existed, leaving every NPU device with an identical, non-unique identifier in the JSON output.

[how]
Extract device ID generation into a dedicated get_device_id() function in XBUtilities.cpp. For Ryzen/NPU devices, derive the UUID from PCIe BDF (domain, bus, device, function) using the same memcpy byte-packing as hip_device_get_uuid(), ensuring the xrt-smi id is consistent with the HIP UUID API. Alveo 2RP (xclbin logic UUID) and 1RP (ROM timestamp) paths are retained as fallbacks for non-Ryzen devices.

AIESW-29257

Problem solved by the commit

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

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

Risks (if any) associated the changes in the commit

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

Documentation impact (if any)

[why]
xrt-smi JSON report showed "id": "00000000-0000-0000-0000-000000000000"
for all Ryzen/NPU devices (Phoenix, Strix, Strix2, StrixH, Krackan,
Medusa, Soundwave). The root cause: rom_time_since_epoch returns a
hardcoded 0 for Ryzen devices instead of throwing, so the existing
Alveo 1RP path silently set id="0". No Ryzen-specific path existed,
leaving every NPU device with an identical, non-unique identifier in
the JSON output.

[how]
Extract device ID generation into a dedicated get_device_id() function
in XBUtilities.cpp. For Ryzen/NPU devices, derive the UUID from PCIe
BDF (domain, bus, device, function) using the same memcpy byte-packing
as hip_device_get_uuid(), ensuring the xrt-smi id is consistent with
the HIP UUID API. Alveo 2RP (xclbin logic UUID) and 1RP (ROM timestamp)
paths are retained as fallbacks for non-Ryzen devices.

AIESW-29257
@xrt-pr-bot
Copy link
Copy Markdown

xrt-pr-bot bot commented Apr 6, 2026

⚠️ Authorization Failed

@sandilya-xilinx is not a repository collaborator.

To proceed:

  • XRT Admins: Add the build label to authorize this PR build
  • OR Add @sandilya-xilinx as a repository collaborator

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

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

Replace C-style byte array and magic number indices with xuid_t +
std::apply fold, eliminating all cppcoreguidelines-avoid-magic-numbers
and cppcoreguidelines-avoid-c-arrays warnings.

AIESW-29257
@xrt-pr-bot
Copy link
Copy Markdown

xrt-pr-bot bot commented Apr 6, 2026

⚠️ Authorization Failed

@sandilya-xilinx is not a repository collaborator.

To proceed:

  • XRT Admins: Add the build label to authorize this PR build
  • OR Add @sandilya-xilinx as a repository collaborator

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

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

@xrt-pr-bot
Copy link
Copy Markdown

xrt-pr-bot bot commented Apr 6, 2026

⚠️ Authorization Failed

@sandilya-xilinx is not a repository collaborator.

To proceed:

  • XRT Admins: Add the build label to authorize this PR build
  • OR Add @sandilya-xilinx as a repository collaborator

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

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

I, Sandilya Bhagi <sandilya.bhagi@amd.com>, hereby add my Signed-off-by to this commit: 498ab2f
I, Sandilya Bhagi <sandilya.bhagi@amd.com>, hereby add my Signed-off-by to this commit: 8ecf10b
I, Sandilya Bhagi <sandilya.bhagi@amd.com>, hereby add my Signed-off-by to this commit: fc560b2

Signed-off-by: Sandilya Bhagi <sandilya.bhagi@amd.com>

Signed-off-by: Sandilya Bhagi <sandilya.bhagi@amd.com>
@xrt-pr-bot
Copy link
Copy Markdown

xrt-pr-bot bot commented Apr 6, 2026

⚠️ Authorization Failed

@sandilya-xilinx is not a repository collaborator.

To proceed:

  • XRT Admins: Add the build label to authorize this PR build
  • OR Add @sandilya-xilinx as a repository collaborator

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

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

@aktondak aktondak self-requested a review April 6, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants