Skip to content

[SWDEV-544298] AINIC implementation (#2798) - #3463

Merged
oosman330 merged 2 commits into
developfrom
ainic2
Feb 25, 2026
Merged

[SWDEV-544298] AINIC implementation (#2798)#3463
oosman330 merged 2 commits into
developfrom
ainic2

Conversation

@oosman330

@oosman330 oosman330 commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

Motivation

Show AINIC information from amd-smi command line

Technical Details

JIRA ID

SWDEV-544298

Test Plan

Test Result

Pass on device with and without AINIC

Commands:

amd-smi list --nic 0

amd-smi static --nic 0

image

Submission Checklist

@oosman330 oosman330 self-assigned this Feb 23, 2026
Comment thread projects/amdsmi/build.log Outdated
Comment thread projects/amdsmi/src/CMakeLists.txt
Comment thread projects/amdsmi/src/CMakeLists.txt Outdated
Comment thread projects/amdsmi/src/CMakeLists.txt Outdated
Comment thread projects/amdsmi/src/amd_smi/amd_smi_system.cc Outdated
This change undoes the revert:

bfe5604 Revert '[SWDEV-544298] AINIC implementation [#2798]' (#3418)
1f7eb27 SWDEV-544298_AINIC_implementation - Handle case where machine has no NIC and we are doing 'amd-smi static' (#3250)
00e9b8d [SWDEV-544298] AINIC implementation (#2798)

The reason why it was reverted was that it was that the external CMake project, amdsmi_unified, was doing in-source build.
We cannot change that CMakeLists.txt file to make it do out of source dir builds.

This changes fixes that problem by copying the amdsmi_unified project into the build dir, then building it there, ensuring that even if it builds in its source dir, it is still in the parent project's build dir.
@oosman330
oosman330 merged commit 410afdc into develop Feb 25, 2026
41 checks passed
@oosman330
oosman330 deleted the ainic2 branch February 25, 2026 08:43
@marifamd

marifamd commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

This re-reverted #2798 that was causing failures on the nightly builds: ROCm/TheRock/actions/runs/22168787472

Originally reported in #3500
Now this unblocks rocProf team so they can start AINIC integration

radhaksri pushed a commit that referenced this pull request Feb 26, 2026
This change undoes the revert:

bfe5604 Revert '[SWDEV-544298] AINIC implementation [#2798]' (#3418)
1f7eb27 SWDEV-544298_AINIC_implementation - Handle case where machine has no NIC and we are doing 'amd-smi static' (#3250)
00e9b8d [SWDEV-544298] AINIC implementation (#2798)

The reason why it was reverted was that it was that the external CMake project, amdsmi_unified, was doing in-source build.
We cannot change that CMakeLists.txt file to make it do out of source dir builds.

This changes fixes that problem by copying the amdsmi_unified project into the build dir, then building it there, ensuring that even if it builds in its source dir, it is still in the parent project's build dir.
@stellaraccident

Copy link
Copy Markdown
Contributor

FYI - this causes a build failure with gcc14. Attempting to fix forward as this is a local, non-CI compiler suspected false positive:

● The build error is in projects/amdsmi/src/nic/ai-nic/amdsmi_unified/src/smi_sysfs.cpp in SmiSysfsReader::readAll(). GCC 14 with -Werror flags two lines:

  • Line 54: content.push_back(hex_value);
  • Line 56: content.push_back(std::stoi(token));

Both push an int into a std::vector<std::variant<int, std::string>>. GCC's inliner traces through the variant move constructor and concludes the string length member _M_string_length may be used uninitialized — a known GCC false positive with
std::variant containing std::string (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106621 and related).

The error is:
error: '...std::__cxx11::basic_string::_M_string_length' may be used
uninitialized [-Werror=maybe-uninitialized]

Introduced by 410afdc — the AINIC re-land.

@stellaraccident

Copy link
Copy Markdown
Contributor

FYI - this causes a build failure with gcc14. Attempting to fix forward as this is a local, non-CI compiler suspected false positive:

● The build error is in projects/amdsmi/src/nic/ai-nic/amdsmi_unified/src/smi_sysfs.cpp in SmiSysfsReader::readAll(). GCC 14 with -Werror flags two lines:

  • Line 54: content.push_back(hex_value);
  • Line 56: content.push_back(std::stoi(token));

Both push an int into a std::vector<std::variant<int, std::string>>. GCC's inliner traces through the variant move constructor and concludes the string length member _M_string_length may be used uninitialized — a known GCC false positive with std::variant containing std::string (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106621 and related).

The error is: error: '...std::__cxx11::basic_string::_M_string_length' may be used uninitialized [-Werror=maybe-uninitialized]

Introduced by 410afdc — the AINIC re-land.

Fixed here: #3633

dayatsin-amd pushed a commit that referenced this pull request Apr 7, 2026
This change undoes the revert:

bfe5604 Revert '[SWDEV-544298] AINIC implementation [#2798]' (#3418)
1f7eb27 SWDEV-544298_AINIC_implementation - Handle case where machine has no NIC and we are doing 'amd-smi static' (#3250)
00e9b8d [SWDEV-544298] AINIC implementation (#2798)

The reason why it was reverted was that it was that the external CMake project, amdsmi_unified, was doing in-source build.
We cannot change that CMakeLists.txt file to make it do out of source dir builds.

This changes fixes that problem by copying the amdsmi_unified project into the build dir, then building it there, ensuring that even if it builds in its source dir, it is still in the parent project's build dir.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants