Repository navigation
build(ualoe/amdsmi): sync UALoE lib - #9688
Conversation
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
There was a problem hiding this comment.
Pull request overview
This PR re-syncs the vendored UALoE library (ualoe_lib) with upstream ualoe_access_lib (commit 470147b, 2026-07-07) to restore parity and add upstream telemetry support so amd-smi can build and expose the updated capabilities.
Changes:
- Add upstream telemetry parsing/support (new telemetry headers +
ualoe_telem.cand build integration). - Expand UALoE netlink/cdev functionality and public API surface (netport list v2, IFCP state/stats, scale-up fabric and GPU identity queries, telemetry category mask, diagnostics helpers).
- Add hardware-free unit tests validating
amdsmi_fabric_telem_id_to_string()mappings against vendored telemetry IDs.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| projects/amdsmi/tests/amd_smi_test/functional/ifoe/fabric/fabric_read_test.cc | Adds hardware-free tests for telemetry ID-to-string mapping behavior. |
| projects/amdsmi/src/ualoe_lib/ualoe_telem.c | Adds telemetry snapshot parsing from vendored TLV telemetry layout. |
| projects/amdsmi/src/ualoe_lib/ualoe_nl.c | Adds/updates netlink commands (netport list v2, addr map get, IFCP, scale-up fabric, GPU identity, telemetry mask, diagnostics). |
| projects/amdsmi/src/ualoe_lib/ualoe_lib.c | Exposes new public UALoE wrapper APIs and argument validation. |
| projects/amdsmi/src/ualoe_lib/ualoe_cdev.c | Updates cdev discovery/connection, adds mmap telemetry fast-path, and callback wiring changes. |
| projects/amdsmi/src/ualoe_lib/ualoe_cb.c | Extends event callback handling to include telemetry-ready notifications. |
| projects/amdsmi/src/ualoe_lib/CMakeLists.txt | Ensures new telemetry source (ualoe_telem.c) is compiled into the library. |
| projects/amdsmi/include/ualoe_lib/ualoe_telem.h | Adds public declarations for telemetry parsing helpers. |
| projects/amdsmi/include/ualoe_lib/ualoe_nl.h | Adds prototypes for new/updated netlink entrypoints. |
| projects/amdsmi/include/ualoe_lib/ualoe_mcdi_defs.h | Extends enum/definitions to match upstream additions. |
| projects/amdsmi/include/ualoe_lib/ualoe_lib.h | Large public API/doc refresh, adds new structs/enums/APIs for telemetry/IFCP/scale-up fabric/CPER. |
| projects/amdsmi/include/ualoe_lib/ualoe_cdev.h | Adds new cdev helper prototype for telemetry allocation state. |
| projects/amdsmi/include/ualoe_lib/ualoe_cb.h | Updates callback init signature to pass cdev fd for telemetry readiness filtering. |
| projects/amdsmi/include/ualoe_lib/telemetry_dataset.h | Adds vendored telemetry TLV layout/types and constants. |
| projects/amdsmi/include/ualoe_lib/ifoe_telemetry_hostapp.h | Updates vendored telemetry ID definitions/categories to upstream state. |
| projects/amdsmi/include/ualoe_lib/ifoe_mcdi_hostapp.h | Updates vendored MCDI hostapp definitions to upstream state. |
| projects/amdsmi/include/ualoe_lib/cbl_cfg/uapi.h | Updates vendored kernel UAPI definitions for new telemetry/events/commands/attrs. |
Suppressed comments (2)
projects/amdsmi/include/ualoe_lib/ualoe_lib.h:967
- Typo in documentation: "alternatve" should be "alternative".
/** Count of number of streams currently in a failover state which have
* been remapped to an alternatve Network Port. */
unsigned streams_failover;
projects/amdsmi/include/ualoe_lib/ifoe_telemetry_hostapp.h:891
- Typo in telemetry ID comment: "fpr" should be "for".
/* enum: Total number of truncated packets received fpr IFoE Request RX queue
*/
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1252b3b to
5ec04d9
Compare
2c06705 to
277ed23
Compare
…ew findings The ualoe_lib sync (new telemetry API, uapi.h additions, netlink refactor) belongs to PR #9688 and should land there instead of bundled with the tray-info feature. Reverting src/ualoe_lib/ and include/ualoe_lib/ to develop's state. Also addresses review findings on the remaining physical_acc_id/tray_info feature: - F-2 (blocking): add amd-smi node --tray CLI test coverage (display, --json, --csv) in tests/python/cli/test_static.py. - F-3 (important): document the node --tray CLI flag in amdsmi-cli-tool.md, including a full amd-smi node section and sample output; fix PHYSICAL_ACC_ID sample ordering. - F-4 (important): fix amdsmi_get_tray_info docstring to state it raises AmdSmiLibraryException when no UALoE session is active, rather than describing an unreachable "N/A" return path. Minor fixups included: enum-value static_asserts and memset(info) in amd_smi_ualoe.cc (F-7/F-8), @return/@note additions in amdsmi.h (F-10/F-13), node_handle type hint and py-api doc (F-11/F-14), and tightened asserts in the ifoe/tray functional and gtest coverage (F-5/F-6/F-12). Signed-off-by: Bill Liu <shuzhliu@amd.com>
…ew findings The ualoe_lib sync (new telemetry API, uapi.h additions, netlink refactor) belongs to PR #9688 and should land there instead of bundled with the tray-info feature. Reverting src/ualoe_lib/ and include/ualoe_lib/ to develop's state. Also addresses review findings on the remaining physical_acc_id/tray_info feature: - F-2 (blocking): add amd-smi node --tray CLI test coverage (display, --json, --csv) in tests/python/cli/test_static.py. - F-3 (important): document the node --tray CLI flag in amdsmi-cli-tool.md, including a full amd-smi node section and sample output; fix PHYSICAL_ACC_ID sample ordering. - F-4 (important): fix amdsmi_get_tray_info docstring to state it raises AmdSmiLibraryException when no UALoE session is active, rather than describing an unreachable "N/A" return path. Minor fixups included: enum-value static_asserts and memset(info) in amd_smi_ualoe.cc (F-7/F-8), @return/@note additions in amdsmi.h (F-10/F-13), node_handle type hint and py-api doc (F-11/F-14), and tightened asserts in the ifoe/tray functional and gtest coverage (F-5/F-6/F-12). Signed-off-by: Bill Liu <shuzhliu@amd.com>
Sync UALoE library (ualoe_lib) with upstream (ualoe_access_lib) The update aligns with latest upstream commit: * 629b8cb - 2026-08-06 Files are updated, relicensed, and clang-formatted to match project and pre-commit requirement. It solves: AILITOOLS-295, ROCM-99999 Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>
- Add ualoe_lib/ to the top-level pre-commit exclude so clang-format and codespell skip the vendored sources under include/ and src/. - Prevents format/spelling churn on upstream-owned code, matching the existing esmi_ib_library/ and third_party/ exclusions. Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
- Add static_asserts before the reinterpret_cast so a UALoE re-sync that diverges the telemetry item/instance/dataset layouts (or drops below amd-smi's category count) fails the build instead of mis-aliasing. - Replace the misleading "binary compatible" comment with the invariant the cast actually relies on. Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
- Pin the first, mid, and last entries of the telemetry id table via numeric literals (no vendored headers) so a reorder or drop anywhere is caught, not just the first entry. - Rename kKnownTelemId to kFirstTelemId and tighten the comments. Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
54c2cda to
3fdcb48
Compare
bill-shuzhou-liu
left a comment
There was a problem hiding this comment.
Regarding the failures in CI, it is not caused by this PR:
-
Build DEB Packages — fails with
ValueError: Version string '' does not have major.minor versionsinbuild_tools/packaging/linux/build_package.py:582. The release-version manifest field is empty. Not related to this PR. -
Build RPM Packages — same
ValueError: Version string ''...from the same script. Not related to this PR. -
Test hip-tests (gfx94X-dcgpu, shard 4/4) — 1 of 1253 tests failed:
Unit_hipGraphStreamPoolFootprint.REQUIRE(per_graph <= kMaxBytesPerGraph)failed — 14MB actual vs 2MB budget over 64 graphs (hipGraphStreamPoolFootprint.cc:107). Unrelated HIP graph memory-footprint test, nothing to do with amdsmi. Not related to this PR. -
Windows Test ROCm wheels (gfx110X-all / py3.12) —
testLibrariesMirroredIntoDevelfailed: hipblaslt Tensile.colibrary files present in the runtime tree but missing from the devel/mirror tree. Not related to this PR. -
Multi-Arch CI Summary / therock-pr-bot — aggregator jobs; they just report/wait on the checks above.
therock-pr-bottimed out waiting for required checks because DEB/RPM/hip-tests/Windows were still failing. Meta-failures, not independent bugs.
Sync UALoE library (`ualoe_lib`) with upstream (`ualoe_access_lib`) The update aligns with the latest upstream commit: * 629b8cb - 2026-08-06 Files are updated, relicensed, and clang-formatted to match project and pre-commit requirements ## Issue Tracking JIRA ID: AILITOOLS-295, ROCM-99999 ## Test Plan - Build `amdsmitst`; run the hardware-free `IfoeFunctionalReadOnly.FabricTelemIdToString*` cases ## Test Result - 3 tests from IfoeFunctionalReadOnly ran — 3 PASSED. Device-dependent fabric cases unchanged (skip without hardware) --------- Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com> Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Sync UALoE library (`ualoe_lib`) with upstream (`ualoe_access_lib`) The update aligns with the latest upstream commit: * 629b8cb - 2026-08-06 Files are updated, relicensed, and clang-formatted to match project and pre-commit requirements ## Issue Tracking JIRA ID: AILITOOLS-295, ROCM-99999 ## Test Plan - Build `amdsmitst`; run the hardware-free `IfoeFunctionalReadOnly.FabricTelemIdToString*` cases ## Test Result - 3 tests from IfoeFunctionalReadOnly ran — 3 PASSED. Device-dependent fabric cases unchanged (skip without hardware) --------- Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com> Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
…0845) ## Why #10402 converted every amd-smi source to the two-line SPDX MIT header and added the `amdsmi-license-headers` pre-commit hook to hold the line. **The hook currently fails on `develop` itself**, so every open amd-smi PR is red — including ones that touch none of the offending files. ``` $ git checkout origin/develop $ python3 projects/amdsmi/tests/check_license_headers.py Missing or malformed AMD SPDX license header: src/ualoe_lib/ualoe_nl.c src/ualoe_lib/ualoe_telem.c tests/amd_smi_test/unit/system/status_string_test.cc tests/python/unit/gpu/test_cli_vram_type_lpddr5.py tests/python/unit/system/test_expect_status.py ``` The blast radius is wide because the hook is `pass_filenames: false` and rescans the whole tracked tree. It fires for any PR touching a single amd-smi `.py`/`.cc`/`.txt` and then reports files that PR never went near. #10083 trips it by editing one line of `src/CMakeLists.txt`. ## What The five files fall into two groups with different causes. **Three are amd-smi's own**, and simply landed while #10402 was in review, so its branch never saw them and they arrived with the old twenty-line MIT block. Converted here: | File | Landed via | |---|---| | `tests/amd_smi_test/unit/system/status_string_test.cc` | #10177 | | `tests/python/unit/gpu/test_cli_vram_type_lpddr5.py` | #10775 | | `tests/python/unit/system/test_expect_status.py` | `88dbbe3b93c` | **The other two are not ours to edit.** `src/ualoe_lib/` is the vendored UALoE library, replaced wholesale by the periodic *"sync UALoE lib"* drops — which is exactly why #9688 added `ualoe_lib/` to the pre-commit `exclude:` block, keeping clang-format and the rest off that code. #10402 carried only the `include/ualoe_lib/` half of that exclusion into the checker and left `src/` behind, so the checker now polices code the next sync will overwrite. Rewriting those headers would be reverted by the next drop and the hook would break again, so the missing prefix is added to `EXCLUDE_PREFIX` instead. The three files #10402 did rewrite under `src/ualoe_lib/` are left alone; they now fall outside the check and will drift back on their own at the next sync. Header text and check scope only — no functional change. ## Verification ``` $ python3 projects/amdsmi/tests/check_license_headers.py # exit 0 $ python3 projects/amdsmi/tests/run_amdsmi_license_header_test.py # 6/6 cases $ pre-commit run --config projects/amdsmi/.pre-commit-config.yaml --files <changed> codespell / trailing-whitespace / end-of-file-fixer / merge-conflicts / large-files / mixed-line-ending / clang-format / ruff format / amd-smi C++ test conventions / amd-smi SPDX license headers ....... all Passed ``` Confirmed the two vendored files are byte-identical to `develop` (`git diff origin/develop -- projects/amdsmi/src/ualoe_lib/` is empty), and that the checker skips them when named explicitly. Fixes the `amdsmi-license-headers` hook regression introduced by #10402.
ROCm#10402 converted every amd-smi source to the two-line SPDX MIT header and added the `amdsmi-license-headers` pre-commit hook to hold the line. The hook currently fails on develop itself, so every open amd-smi PR is red. The hook is `pass_filenames: false` and rescans the whole tracked tree, so it fires for any PR touching a single amd-smi `.py`/`.cc`/`.txt` and then reports files that PR never went near. Five files were flagged, in two groups with different causes. Three are amd-smi's own, and simply landed while ROCm#10402 was in review, so its branch never saw them and they arrived with the old twenty-line MIT block. They are converted here: tests/amd_smi_test/unit/system/status_string_test.cc (ROCm#10177) tests/python/unit/gpu/test_cli_vram_type_lpddr5.py (ROCm#10775) tests/python/unit/system/test_expect_status.py The other two, src/ualoe_lib/ualoe_nl.c and ualoe_telem.c, are not ours to edit. src/ualoe_lib is the vendored UALoE library, replaced wholesale by the periodic "sync UALoE lib" drops (ROCm#9688), which is why that PR excluded `ualoe_lib/` from the rest of the pre-commit suite. ROCm#10402 carried only the `include/ualoe_lib/` half of that exclusion into the checker and left `src/`, so the checker polices code the next sync will overwrite - a header rewritten here reverts, and the hook breaks again. The missing prefix is added instead. The three files ROCm#10402 did rewrite under src/ualoe_lib are left alone; they now fall outside the check and will drift back on their own. Header text and check scope only - no functional change.
…0226) ## Motivation On Helios/Titan compute trays, the logical OAM ID is not a stable hardware identifier and callers have no way to query the tray form factor or how many accelerators share a tray. This adds a stable physical accelerator ID and a node-scoped tray-info API, both sourced from UALoE over the IFoE sideband path. ## Technical Details - `amdsmi.h` / `amd_smi.cc`: add `physical_acc_id` to `amdsmi_asic_info_t` (populated by `amdsmi_get_gpu_asic_info()`); add `amdsmi_node_handle`, `amdsmi_compute_tray_type_t`, `amdsmi_tray_info_t`, and the new node-scoped `amdsmi_get_tray_info()` API - `src/amd_smi/amd_smi_ualoe.cc`, `include/amd_smi/impl/amd_smi_ualoe.h`: new UALoE-backed helpers for physical accelerator id and tray info, keeping `ualoe_lib` types out of `amd_smi.cc` - `src/ualoe_lib`, `include/ualoe_lib`: **not part of this PR** — the vendored `ualoe_lib` sync (telemetry/identity support needed by this feature) was split out to #9688 - `py-interface`: extend `amdsmi_interface.py` and regenerate `amdsmi_wrapper.py` for the new struct fields and the `amdsmi_get_tray_info` binding - `amdsmi_cli`: expose `PHYSICAL_ACC_ID` in `amd-smi static --asic`; add `amd-smi node --tray`/`-T` to print compute tray type and accelerator count - `docs`: document the new API and CLI flag in `amdsmi-py-api.md` and `amdsmi-cli-tool.md` - `tests`: add `tray_info_read_test.cc`/`.h`, extend `ifoe_info_read_test.cc` Both new APIs report `AMDSMI_STATUS_NOT_SUPPORTED` (or the `UINT32_MAX` sentinel for `physical_acc_id`) on systems without an active UALoE session. ## Dependencies This PR requires #9688 (vendored `ualoe_lib` sync) to build successfully in CI. `amd_smi_ualoe.cc` uses `ualoe_lib` telemetry/identity symbols (`ualoe_gpu_identity_t`, `ualoe_get_gpu_identity`, `UALOE_COMPUTE_TRAY_TYPE_*`, etc.) that only exist once #9688 lands; until then, CI builds here will fail with undeclared-symbol errors. #9688 should merge first, or this branch should be rebased on top of it before merging. ## Issue Tracking JIRA ID: ROCM-24510 ## Test Plan - Built locally via CMake (`ci-build`/`ci-artifact`), including `BUILD_TESTS=ON` - Ran the `amdsmitst` GTest suite; all `ifoe`/`tray`-specific tests pass - Ran `pre-commit` against `projects/amdsmi/.pre-commit-config.yaml` for the changed files (codespell, clang-format, ruff-format, gersemi, test-convention hook) ## Test Result - `amdsmitst`: all IFoE identity and tray tests pass. Two unrelated pre-existing failures (`TempRead`, `TestFrequenciesRead`) reproduce on this RX 7900 XT (gfx1100) test machine independent of this change and are hardware-capability gaps, not regressions. - `pre-commit`: all hooks pass ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md. --------- Signed-off-by: Bill Liu <shuzhliu@amd.com>
#10402 converted every amd-smi source to the two-line SPDX MIT header and added the `amdsmi-license-headers` pre-commit hook to hold the line. The hook currently fails on develop itself, so every open amd-smi PR is red. The hook is `pass_filenames: false` and rescans the whole tracked tree, so it fires for any PR touching a single amd-smi `.py`/`.cc`/`.txt` and then reports files that PR never went near. Five files were flagged, in two groups with different causes. Three are amd-smi's own, and simply landed while #10402 was in review, so its branch never saw them and they arrived with the old twenty-line MIT block. They are converted here: tests/amd_smi_test/unit/system/status_string_test.cc (#10177) tests/python/unit/gpu/test_cli_vram_type_lpddr5.py (#10775) tests/python/unit/system/test_expect_status.py The other two, src/ualoe_lib/ualoe_nl.c and ualoe_telem.c, are not ours to edit. src/ualoe_lib is the vendored UALoE library, replaced wholesale by the periodic "sync UALoE lib" drops (#9688), which is why that PR excluded `ualoe_lib/` from the rest of the pre-commit suite. #10402 carried only the `include/ualoe_lib/` half of that exclusion into the checker and left `src/`, so the checker polices code the next sync will overwrite - a header rewritten here reverts, and the hook breaks again. The missing prefix is added instead. The three files #10402 did rewrite under src/ualoe_lib are left alone; they now fall outside the check and will drift back on their own. Header text and check scope only - no functional change.
…0845) ## Why #10402 converted every amd-smi source to the two-line SPDX MIT header and added the `amdsmi-license-headers` pre-commit hook to hold the line. **The hook currently fails on `develop` itself**, so every open amd-smi PR is red — including ones that touch none of the offending files. ``` $ git checkout origin/develop $ python3 projects/amdsmi/tests/check_license_headers.py Missing or malformed AMD SPDX license header: src/ualoe_lib/ualoe_nl.c src/ualoe_lib/ualoe_telem.c tests/amd_smi_test/unit/system/status_string_test.cc tests/python/unit/gpu/test_cli_vram_type_lpddr5.py tests/python/unit/system/test_expect_status.py ``` The blast radius is wide because the hook is `pass_filenames: false` and rescans the whole tracked tree. It fires for any PR touching a single amd-smi `.py`/`.cc`/`.txt` and then reports files that PR never went near. #10083 trips it by editing one line of `src/CMakeLists.txt`. ## What The five files fall into two groups with different causes. **Three are amd-smi's own**, and simply landed while #10402 was in review, so its branch never saw them and they arrived with the old twenty-line MIT block. Converted here: | File | Landed via | |---|---| | `tests/amd_smi_test/unit/system/status_string_test.cc` | #10177 | | `tests/python/unit/gpu/test_cli_vram_type_lpddr5.py` | #10775 | | `tests/python/unit/system/test_expect_status.py` | `88dbbe3b93c` | **The other two are not ours to edit.** `src/ualoe_lib/` is the vendored UALoE library, replaced wholesale by the periodic *"sync UALoE lib"* drops — which is exactly why #9688 added `ualoe_lib/` to the pre-commit `exclude:` block, keeping clang-format and the rest off that code. #10402 carried only the `include/ualoe_lib/` half of that exclusion into the checker and left `src/` behind, so the checker now polices code the next sync will overwrite. Rewriting those headers would be reverted by the next drop and the hook would break again, so the missing prefix is added to `EXCLUDE_PREFIX` instead. The three files #10402 did rewrite under `src/ualoe_lib/` are left alone; they now fall outside the check and will drift back on their own at the next sync. Header text and check scope only — no functional change. ## Verification ``` $ python3 projects/amdsmi/tests/check_license_headers.py # exit 0 $ python3 projects/amdsmi/tests/run_amdsmi_license_header_test.py # 6/6 cases $ pre-commit run --config projects/amdsmi/.pre-commit-config.yaml --files <changed> codespell / trailing-whitespace / end-of-file-fixer / merge-conflicts / large-files / mixed-line-ending / clang-format / ruff format / amd-smi C++ test conventions / amd-smi SPDX license headers ....... all Passed ``` Confirmed the two vendored files are byte-identical to `develop` (`git diff origin/develop -- projects/amdsmi/src/ualoe_lib/` is empty), and that the checker skips them when named explicitly. Fixes the `amdsmi-license-headers` hook regression introduced by #10402.
#10402 converted every amd-smi source to the two-line SPDX MIT header and added the `amdsmi-license-headers` pre-commit hook to hold the line. The hook currently fails on develop itself, so every open amd-smi PR is red. The hook is `pass_filenames: false` and rescans the whole tracked tree, so it fires for any PR touching a single amd-smi `.py`/`.cc`/`.txt` and then reports files that PR never went near. Five files were flagged, in two groups with different causes. Three are amd-smi's own, and simply landed while #10402 was in review, so its branch never saw them and they arrived with the old twenty-line MIT block. They are converted here: tests/amd_smi_test/unit/system/status_string_test.cc (#10177) tests/python/unit/gpu/test_cli_vram_type_lpddr5.py (#10775) tests/python/unit/system/test_expect_status.py The other two, src/ualoe_lib/ualoe_nl.c and ualoe_telem.c, are not ours to edit. src/ualoe_lib is the vendored UALoE library, replaced wholesale by the periodic "sync UALoE lib" drops (#9688), which is why that PR excluded `ualoe_lib/` from the rest of the pre-commit suite. #10402 carried only the `include/ualoe_lib/` half of that exclusion into the checker and left `src/`, so the checker polices code the next sync will overwrite - a header rewritten here reverts, and the hook breaks again. The missing prefix is added instead. The three files #10402 did rewrite under src/ualoe_lib are left alone; they now fall outside the check and will drift back on their own. Header text and check scope only - no functional change.
…0845) ## Why #10402 converted every amd-smi source to the two-line SPDX MIT header and added the `amdsmi-license-headers` pre-commit hook to hold the line. **The hook currently fails on `develop` itself**, so every open amd-smi PR is red — including ones that touch none of the offending files. ``` $ git checkout origin/develop $ python3 projects/amdsmi/tests/check_license_headers.py Missing or malformed AMD SPDX license header: src/ualoe_lib/ualoe_nl.c src/ualoe_lib/ualoe_telem.c tests/amd_smi_test/unit/system/status_string_test.cc tests/python/unit/gpu/test_cli_vram_type_lpddr5.py tests/python/unit/system/test_expect_status.py ``` The blast radius is wide because the hook is `pass_filenames: false` and rescans the whole tracked tree. It fires for any PR touching a single amd-smi `.py`/`.cc`/`.txt` and then reports files that PR never went near. #10083 trips it by editing one line of `src/CMakeLists.txt`. ## What The five files fall into two groups with different causes. **Three are amd-smi's own**, and simply landed while #10402 was in review, so its branch never saw them and they arrived with the old twenty-line MIT block. Converted here: | File | Landed via | |---|---| | `tests/amd_smi_test/unit/system/status_string_test.cc` | #10177 | | `tests/python/unit/gpu/test_cli_vram_type_lpddr5.py` | #10775 | | `tests/python/unit/system/test_expect_status.py` | `88dbbe3b93c` | **The other two are not ours to edit.** `src/ualoe_lib/` is the vendored UALoE library, replaced wholesale by the periodic *"sync UALoE lib"* drops — which is exactly why #9688 added `ualoe_lib/` to the pre-commit `exclude:` block, keeping clang-format and the rest off that code. #10402 carried only the `include/ualoe_lib/` half of that exclusion into the checker and left `src/` behind, so the checker now polices code the next sync will overwrite. Rewriting those headers would be reverted by the next drop and the hook would break again, so the missing prefix is added to `EXCLUDE_PREFIX` instead. The three files #10402 did rewrite under `src/ualoe_lib/` are left alone; they now fall outside the check and will drift back on their own at the next sync. Header text and check scope only — no functional change. ## Verification ``` $ python3 projects/amdsmi/tests/check_license_headers.py # exit 0 $ python3 projects/amdsmi/tests/run_amdsmi_license_header_test.py # 6/6 cases $ pre-commit run --config projects/amdsmi/.pre-commit-config.yaml --files <changed> codespell / trailing-whitespace / end-of-file-fixer / merge-conflicts / large-files / mixed-line-ending / clang-format / ruff format / amd-smi C++ test conventions / amd-smi SPDX license headers ....... all Passed ``` Confirmed the two vendored files are byte-identical to `develop` (`git diff origin/develop -- projects/amdsmi/src/ualoe_lib/` is empty), and that the checker skips them when named explicitly. Fixes the `amdsmi-license-headers` hook regression introduced by #10402.
#10402 converted every amd-smi source to the two-line SPDX MIT header and added the `amdsmi-license-headers` pre-commit hook to hold the line. The hook currently fails on develop itself, so every open amd-smi PR is red. The hook is `pass_filenames: false` and rescans the whole tracked tree, so it fires for any PR touching a single amd-smi `.py`/`.cc`/`.txt` and then reports files that PR never went near. Five files were flagged, in two groups with different causes. Three are amd-smi's own, and simply landed while #10402 was in review, so its branch never saw them and they arrived with the old twenty-line MIT block. They are converted here: tests/amd_smi_test/unit/system/status_string_test.cc (#10177) tests/python/unit/gpu/test_cli_vram_type_lpddr5.py (#10775) tests/python/unit/system/test_expect_status.py The other two, src/ualoe_lib/ualoe_nl.c and ualoe_telem.c, are not ours to edit. src/ualoe_lib is the vendored UALoE library, replaced wholesale by the periodic "sync UALoE lib" drops (#9688), which is why that PR excluded `ualoe_lib/` from the rest of the pre-commit suite. #10402 carried only the `include/ualoe_lib/` half of that exclusion into the checker and left `src/`, so the checker polices code the next sync will overwrite - a header rewritten here reverts, and the hook breaks again. The missing prefix is added instead. The three files #10402 did rewrite under src/ualoe_lib are left alone; they now fall outside the check and will drift back on their own. Header text and check scope only - no functional change.
…0845) ## Why #10402 converted every amd-smi source to the two-line SPDX MIT header and added the `amdsmi-license-headers` pre-commit hook to hold the line. **The hook currently fails on `develop` itself**, so every open amd-smi PR is red — including ones that touch none of the offending files. ``` $ git checkout origin/develop $ python3 projects/amdsmi/tests/check_license_headers.py Missing or malformed AMD SPDX license header: src/ualoe_lib/ualoe_nl.c src/ualoe_lib/ualoe_telem.c tests/amd_smi_test/unit/system/status_string_test.cc tests/python/unit/gpu/test_cli_vram_type_lpddr5.py tests/python/unit/system/test_expect_status.py ``` The blast radius is wide because the hook is `pass_filenames: false` and rescans the whole tracked tree. It fires for any PR touching a single amd-smi `.py`/`.cc`/`.txt` and then reports files that PR never went near. #10083 trips it by editing one line of `src/CMakeLists.txt`. ## What The five files fall into two groups with different causes. **Three are amd-smi's own**, and simply landed while #10402 was in review, so its branch never saw them and they arrived with the old twenty-line MIT block. Converted here: | File | Landed via | |---|---| | `tests/amd_smi_test/unit/system/status_string_test.cc` | #10177 | | `tests/python/unit/gpu/test_cli_vram_type_lpddr5.py` | #10775 | | `tests/python/unit/system/test_expect_status.py` | `88dbbe3b93c` | **The other two are not ours to edit.** `src/ualoe_lib/` is the vendored UALoE library, replaced wholesale by the periodic *"sync UALoE lib"* drops — which is exactly why #9688 added `ualoe_lib/` to the pre-commit `exclude:` block, keeping clang-format and the rest off that code. #10402 carried only the `include/ualoe_lib/` half of that exclusion into the checker and left `src/` behind, so the checker now polices code the next sync will overwrite. Rewriting those headers would be reverted by the next drop and the hook would break again, so the missing prefix is added to `EXCLUDE_PREFIX` instead. The three files #10402 did rewrite under `src/ualoe_lib/` are left alone; they now fall outside the check and will drift back on their own at the next sync. Header text and check scope only — no functional change. ## Verification ``` $ python3 projects/amdsmi/tests/check_license_headers.py # exit 0 $ python3 projects/amdsmi/tests/run_amdsmi_license_header_test.py # 6/6 cases $ pre-commit run --config projects/amdsmi/.pre-commit-config.yaml --files <changed> codespell / trailing-whitespace / end-of-file-fixer / merge-conflicts / large-files / mixed-line-ending / clang-format / ruff format / amd-smi C++ test conventions / amd-smi SPDX license headers ....... all Passed ``` Confirmed the two vendored files are byte-identical to `develop` (`git diff origin/develop -- projects/amdsmi/src/ualoe_lib/` is empty), and that the checker skips them when named explicitly. Fixes the `amdsmi-license-headers` hook regression introduced by #10402.
#10402 converted every amd-smi source to the two-line SPDX MIT header and added the `amdsmi-license-headers` pre-commit hook to hold the line. The hook currently fails on develop itself, so every open amd-smi PR is red. The hook is `pass_filenames: false` and rescans the whole tracked tree, so it fires for any PR touching a single amd-smi `.py`/`.cc`/`.txt` and then reports files that PR never went near. Five files were flagged, in two groups with different causes. Three are amd-smi's own, and simply landed while #10402 was in review, so its branch never saw them and they arrived with the old twenty-line MIT block. They are converted here: tests/amd_smi_test/unit/system/status_string_test.cc (#10177) tests/python/unit/gpu/test_cli_vram_type_lpddr5.py (#10775) tests/python/unit/system/test_expect_status.py The other two, src/ualoe_lib/ualoe_nl.c and ualoe_telem.c, are not ours to edit. src/ualoe_lib is the vendored UALoE library, replaced wholesale by the periodic "sync UALoE lib" drops (#9688), which is why that PR excluded `ualoe_lib/` from the rest of the pre-commit suite. #10402 carried only the `include/ualoe_lib/` half of that exclusion into the checker and left `src/`, so the checker polices code the next sync will overwrite - a header rewritten here reverts, and the hook breaks again. The missing prefix is added instead. The three files #10402 did rewrite under src/ualoe_lib are left alone; they now fall outside the check and will drift back on their own. Header text and check scope only - no functional change.
…0845) ## Why #10402 converted every amd-smi source to the two-line SPDX MIT header and added the `amdsmi-license-headers` pre-commit hook to hold the line. **The hook currently fails on `develop` itself**, so every open amd-smi PR is red — including ones that touch none of the offending files. ``` $ git checkout origin/develop $ python3 projects/amdsmi/tests/check_license_headers.py Missing or malformed AMD SPDX license header: src/ualoe_lib/ualoe_nl.c src/ualoe_lib/ualoe_telem.c tests/amd_smi_test/unit/system/status_string_test.cc tests/python/unit/gpu/test_cli_vram_type_lpddr5.py tests/python/unit/system/test_expect_status.py ``` The blast radius is wide because the hook is `pass_filenames: false` and rescans the whole tracked tree. It fires for any PR touching a single amd-smi `.py`/`.cc`/`.txt` and then reports files that PR never went near. #10083 trips it by editing one line of `src/CMakeLists.txt`. ## What The five files fall into two groups with different causes. **Three are amd-smi's own**, and simply landed while #10402 was in review, so its branch never saw them and they arrived with the old twenty-line MIT block. Converted here: | File | Landed via | |---|---| | `tests/amd_smi_test/unit/system/status_string_test.cc` | #10177 | | `tests/python/unit/gpu/test_cli_vram_type_lpddr5.py` | #10775 | | `tests/python/unit/system/test_expect_status.py` | `88dbbe3b93c` | **The other two are not ours to edit.** `src/ualoe_lib/` is the vendored UALoE library, replaced wholesale by the periodic *"sync UALoE lib"* drops — which is exactly why #9688 added `ualoe_lib/` to the pre-commit `exclude:` block, keeping clang-format and the rest off that code. #10402 carried only the `include/ualoe_lib/` half of that exclusion into the checker and left `src/` behind, so the checker now polices code the next sync will overwrite. Rewriting those headers would be reverted by the next drop and the hook would break again, so the missing prefix is added to `EXCLUDE_PREFIX` instead. The three files #10402 did rewrite under `src/ualoe_lib/` are left alone; they now fall outside the check and will drift back on their own at the next sync. Header text and check scope only — no functional change. ## Verification ``` $ python3 projects/amdsmi/tests/check_license_headers.py # exit 0 $ python3 projects/amdsmi/tests/run_amdsmi_license_header_test.py # 6/6 cases $ pre-commit run --config projects/amdsmi/.pre-commit-config.yaml --files <changed> codespell / trailing-whitespace / end-of-file-fixer / merge-conflicts / large-files / mixed-line-ending / clang-format / ruff format / amd-smi C++ test conventions / amd-smi SPDX license headers ....... all Passed ``` Confirmed the two vendored files are byte-identical to `develop` (`git diff origin/develop -- projects/amdsmi/src/ualoe_lib/` is empty), and that the checker skips them when named explicitly. Fixes the `amdsmi-license-headers` hook regression introduced by #10402.
#10402 converted every amd-smi source to the two-line SPDX MIT header and added the `amdsmi-license-headers` pre-commit hook to hold the line. The hook currently fails on develop itself, so every open amd-smi PR is red. The hook is `pass_filenames: false` and rescans the whole tracked tree, so it fires for any PR touching a single amd-smi `.py`/`.cc`/`.txt` and then reports files that PR never went near. Five files were flagged, in two groups with different causes. Three are amd-smi's own, and simply landed while #10402 was in review, so its branch never saw them and they arrived with the old twenty-line MIT block. They are converted here: tests/amd_smi_test/unit/system/status_string_test.cc (#10177) tests/python/unit/gpu/test_cli_vram_type_lpddr5.py (#10775) tests/python/unit/system/test_expect_status.py The other two, src/ualoe_lib/ualoe_nl.c and ualoe_telem.c, are not ours to edit. src/ualoe_lib is the vendored UALoE library, replaced wholesale by the periodic "sync UALoE lib" drops (#9688), which is why that PR excluded `ualoe_lib/` from the rest of the pre-commit suite. #10402 carried only the `include/ualoe_lib/` half of that exclusion into the checker and left `src/`, so the checker polices code the next sync will overwrite - a header rewritten here reverts, and the hook breaks again. The missing prefix is added instead. The three files #10402 did rewrite under src/ualoe_lib are left alone; they now fall outside the check and will drift back on their own. Header text and check scope only - no functional change.
…0845) ## Why #10402 converted every amd-smi source to the two-line SPDX MIT header and added the `amdsmi-license-headers` pre-commit hook to hold the line. **The hook currently fails on `develop` itself**, so every open amd-smi PR is red — including ones that touch none of the offending files. ``` $ git checkout origin/develop $ python3 projects/amdsmi/tests/check_license_headers.py Missing or malformed AMD SPDX license header: src/ualoe_lib/ualoe_nl.c src/ualoe_lib/ualoe_telem.c tests/amd_smi_test/unit/system/status_string_test.cc tests/python/unit/gpu/test_cli_vram_type_lpddr5.py tests/python/unit/system/test_expect_status.py ``` The blast radius is wide because the hook is `pass_filenames: false` and rescans the whole tracked tree. It fires for any PR touching a single amd-smi `.py`/`.cc`/`.txt` and then reports files that PR never went near. #10083 trips it by editing one line of `src/CMakeLists.txt`. ## What The five files fall into two groups with different causes. **Three are amd-smi's own**, and simply landed while #10402 was in review, so its branch never saw them and they arrived with the old twenty-line MIT block. Converted here: | File | Landed via | |---|---| | `tests/amd_smi_test/unit/system/status_string_test.cc` | #10177 | | `tests/python/unit/gpu/test_cli_vram_type_lpddr5.py` | #10775 | | `tests/python/unit/system/test_expect_status.py` | `88dbbe3b93c` | **The other two are not ours to edit.** `src/ualoe_lib/` is the vendored UALoE library, replaced wholesale by the periodic *"sync UALoE lib"* drops — which is exactly why #9688 added `ualoe_lib/` to the pre-commit `exclude:` block, keeping clang-format and the rest off that code. #10402 carried only the `include/ualoe_lib/` half of that exclusion into the checker and left `src/` behind, so the checker now polices code the next sync will overwrite. Rewriting those headers would be reverted by the next drop and the hook would break again, so the missing prefix is added to `EXCLUDE_PREFIX` instead. The three files #10402 did rewrite under `src/ualoe_lib/` are left alone; they now fall outside the check and will drift back on their own at the next sync. Header text and check scope only — no functional change. ## Verification ``` $ python3 projects/amdsmi/tests/check_license_headers.py # exit 0 $ python3 projects/amdsmi/tests/run_amdsmi_license_header_test.py # 6/6 cases $ pre-commit run --config projects/amdsmi/.pre-commit-config.yaml --files <changed> codespell / trailing-whitespace / end-of-file-fixer / merge-conflicts / large-files / mixed-line-ending / clang-format / ruff format / amd-smi C++ test conventions / amd-smi SPDX license headers ....... all Passed ``` Confirmed the two vendored files are byte-identical to `develop` (`git diff origin/develop -- projects/amdsmi/src/ualoe_lib/` is empty), and that the checker skips them when named explicitly. Fixes the `amdsmi-license-headers` hook regression introduced by #10402.
#10402 converted every amd-smi source to the two-line SPDX MIT header and added the `amdsmi-license-headers` pre-commit hook to hold the line. The hook currently fails on develop itself, so every open amd-smi PR is red. The hook is `pass_filenames: false` and rescans the whole tracked tree, so it fires for any PR touching a single amd-smi `.py`/`.cc`/`.txt` and then reports files that PR never went near. Five files were flagged, in two groups with different causes. Three are amd-smi's own, and simply landed while #10402 was in review, so its branch never saw them and they arrived with the old twenty-line MIT block. They are converted here: tests/amd_smi_test/unit/system/status_string_test.cc (#10177) tests/python/unit/gpu/test_cli_vram_type_lpddr5.py (#10775) tests/python/unit/system/test_expect_status.py The other two, src/ualoe_lib/ualoe_nl.c and ualoe_telem.c, are not ours to edit. src/ualoe_lib is the vendored UALoE library, replaced wholesale by the periodic "sync UALoE lib" drops (#9688), which is why that PR excluded `ualoe_lib/` from the rest of the pre-commit suite. #10402 carried only the `include/ualoe_lib/` half of that exclusion into the checker and left `src/`, so the checker polices code the next sync will overwrite - a header rewritten here reverts, and the hook breaks again. The missing prefix is added instead. The three files #10402 did rewrite under src/ualoe_lib are left alone; they now fall outside the check and will drift back on their own. Header text and check scope only - no functional change.
…0845) ## Why #10402 converted every amd-smi source to the two-line SPDX MIT header and added the `amdsmi-license-headers` pre-commit hook to hold the line. **The hook currently fails on `develop` itself**, so every open amd-smi PR is red — including ones that touch none of the offending files. ``` $ git checkout origin/develop $ python3 projects/amdsmi/tests/check_license_headers.py Missing or malformed AMD SPDX license header: src/ualoe_lib/ualoe_nl.c src/ualoe_lib/ualoe_telem.c tests/amd_smi_test/unit/system/status_string_test.cc tests/python/unit/gpu/test_cli_vram_type_lpddr5.py tests/python/unit/system/test_expect_status.py ``` The blast radius is wide because the hook is `pass_filenames: false` and rescans the whole tracked tree. It fires for any PR touching a single amd-smi `.py`/`.cc`/`.txt` and then reports files that PR never went near. #10083 trips it by editing one line of `src/CMakeLists.txt`. ## What The five files fall into two groups with different causes. **Three are amd-smi's own**, and simply landed while #10402 was in review, so its branch never saw them and they arrived with the old twenty-line MIT block. Converted here: | File | Landed via | |---|---| | `tests/amd_smi_test/unit/system/status_string_test.cc` | #10177 | | `tests/python/unit/gpu/test_cli_vram_type_lpddr5.py` | #10775 | | `tests/python/unit/system/test_expect_status.py` | `88dbbe3b93c` | **The other two are not ours to edit.** `src/ualoe_lib/` is the vendored UALoE library, replaced wholesale by the periodic *"sync UALoE lib"* drops — which is exactly why #9688 added `ualoe_lib/` to the pre-commit `exclude:` block, keeping clang-format and the rest off that code. #10402 carried only the `include/ualoe_lib/` half of that exclusion into the checker and left `src/` behind, so the checker now polices code the next sync will overwrite. Rewriting those headers would be reverted by the next drop and the hook would break again, so the missing prefix is added to `EXCLUDE_PREFIX` instead. The three files #10402 did rewrite under `src/ualoe_lib/` are left alone; they now fall outside the check and will drift back on their own at the next sync. Header text and check scope only — no functional change. ## Verification ``` $ python3 projects/amdsmi/tests/check_license_headers.py # exit 0 $ python3 projects/amdsmi/tests/run_amdsmi_license_header_test.py # 6/6 cases $ pre-commit run --config projects/amdsmi/.pre-commit-config.yaml --files <changed> codespell / trailing-whitespace / end-of-file-fixer / merge-conflicts / large-files / mixed-line-ending / clang-format / ruff format / amd-smi C++ test conventions / amd-smi SPDX license headers ....... all Passed ``` Confirmed the two vendored files are byte-identical to `develop` (`git diff origin/develop -- projects/amdsmi/src/ualoe_lib/` is empty), and that the checker skips them when named explicitly. Fixes the `amdsmi-license-headers` hook regression introduced by #10402.
Sync UALoE library (
ualoe_lib) with upstream (ualoe_access_lib)The update aligns with the latest upstream commit:
Files are updated, relicensed, and clang-formatted to match project and pre-commit requirements
Motivation
The UALoE sources under
src/ualoe_lib/andinclude/ualoe_lib/had drifted from their upstream origin(ualoe_access_lib)and were missing the telemetry support that upstream has since added. This PR re-syncs that(ualoe_access_lib)copy soamd-smibuilds against current upstream content, adds the telemetry files, and restoresamd-smi's licensing/formatting conventions on topTechnical Details
Telemetry sources (new) (
src/ualoe_lib/, include/ualoe_lib/):ualoe_telem.c,ualoe_telem.h, andtelemetry_dataset.hfrom upstreamualoe_telem.cinUALOE_SRC_LISTinsrc/ualoe_lib/CMakeLists.txtso it is compiled into the libraryRemaining sources (
src/ualoe_lib/*.c, include/ualoe_lib/*.h):ualoe_cb,ualoe_cdev,ualoe_lib,ualoe_nl,ifoe_mcdi_hostapp,ualoe_mcdi_defs, andcbl_cfg/uapi.hto upstream contentamd-smiconventions (applied on top of the refresh):clang-format(repo .clang-format) across all filesIssue Tracking
JIRA ID: AILITOOLS-295, ROCM-99999
Test Plan
amdsmitst; run the hardware-freeIfoeFunctionalReadOnly.FabricTelemIdToString*casesTest Result
Submission Checklist