Skip to content

[SWDEV-544298] AINIC implementation - #2798

Merged
rahulc-gh merged 1 commit into
developfrom
SWDEV-544298_AINIC_implementation
Feb 12, 2026
Merged

[SWDEV-544298] AINIC implementation#2798
rahulc-gh merged 1 commit into
developfrom
SWDEV-544298_AINIC_implementation

Conversation

@marifamd

@marifamd marifamd commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

Motivation

Show AINIC information from amd-smi command line

Technical Details

Print out basic information about NIC, and detailed information

JIRA ID

SWDEV-544298

Test Plan

Added 2 additional tests

Test Result

Pass on device with AINIC

Submission Checklist

Commands:

amd-smi list --nic 0

amd-smi static --nic 0

image

TODO after this merge:

ESMI_LIB macro - does not compile if macro is OFF
headers for ROC-prof - replace with single header
refactor duplicated code that was commented upon in this PR

@marifamd
marifamd requested a review from a team as a code owner January 22, 2026 15:46
@oosman330 oosman330 self-assigned this Jan 22, 2026
@ajanicijamd
ajanicijamd force-pushed the SWDEV-544298_AINIC_implementation branch from b3853f2 to 6b4db08 Compare January 22, 2026 17:54
@oosman330
oosman330 requested a review from oliveiradan January 23, 2026 08:30
@ajanicijamd
ajanicijamd force-pushed the SWDEV-544298_AINIC_implementation branch from 6b4db08 to ac4181f Compare January 23, 2026 21:23
Comment thread projects/amdsmi/amdsmi_cli/amdsmi_helpers.py Outdated
Comment thread projects/amdsmi/amdsmi_cli/amdsmi_helpers.py Outdated
Comment thread projects/amdsmi/amdsmi_cli/amdsmi_parser.py Outdated
Comment thread projects/amdsmi/amdsmi_cli/amdsmi_parser.py Outdated
Comment thread projects/amdsmi/include/amd_smi/amdsmi.h Outdated
Comment thread projects/amdsmi/py-interface/amdsmi_interface.py
Comment thread projects/amdsmi/src/amd_smi/amd_smi.cc Outdated
Comment thread projects/amdsmi/src/amd_smi/amd_smi.cc Outdated
Comment thread projects/amdsmi/src/amd_smi/amd_smi.cc
Comment thread projects/amdsmi/src/amd_smi/amd_smi.cc Outdated
Comment thread projects/amdsmi/src/amd_smi/amd_smi.cc Outdated
Comment thread projects/amdsmi/src/amd_smi/amd_smi.cc Outdated
Comment thread projects/amdsmi/src/amd_smi/amd_smi.cc Outdated
Comment thread projects/amdsmi/src/amd_smi/amd_smi_system.cc Outdated
Comment thread projects/amdsmi/src/amd_smi/amd_smi_system.cc Outdated
Comment thread projects/amdsmi/src/amd_smi/amd_smi_system.cc Outdated
Comment thread projects/amdsmi/src/amd_smi/amd_smi_system.cc Outdated
Comment thread projects/amdsmi/tests/amd_smi_test/functional/ainic.cc Outdated
Comment thread projects/amdsmi/tests/amd_smi_test/functional/ainic.cc Outdated

@oliveiradan oliveiradan 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.

Besides my individual comments, we still have build warnings to look at, as stated in the previous PR:
https://github.com/AMD-ROCm-Internal/rocm-systems/pull/441

@ajanicijamd
ajanicijamd force-pushed the SWDEV-544298_AINIC_implementation branch 2 times, most recently from 8ea1846 to 86d6278 Compare January 26, 2026 18:05
@oosman330
oosman330 requested a review from oliveiradan January 26, 2026 18:07
@ajanicijamd
ajanicijamd force-pushed the SWDEV-544298_AINIC_implementation branch 2 times, most recently from 7bcfb73 to ea94907 Compare February 9, 2026 17:05
@ajanicijamd
ajanicijamd force-pushed the SWDEV-544298_AINIC_implementation branch from 784fe1f to da5c768 Compare February 11, 2026 19:15
@rahulc-gh

Copy link
Copy Markdown
Collaborator

overriding therock windows ci failure known hiptests issue. legacy rocm ci is passing on amdsmi test

@rahulc-gh
rahulc-gh merged commit 00e9b8d into develop Feb 12, 2026
9 of 30 checks passed
@rahulc-gh
rahulc-gh deleted the SWDEV-544298_AINIC_implementation branch February 12, 2026 05:54
Comment on lines +31 to +41
set(NIC_SOURCE_DIR ${PROJECT_ROOT}/src)
set(NIC_BUILD_DIR ${PROJECT_ROOT}/build)
set(NIC_INTERFACE_DIR ${PROJECT_ROOT}/interface)

set(NIC_DEFAULT_CXX_FLAGS "-Wall -Wextra -Werror -Wno-missing-field-initializers -Wmissing-declarations -Werror=conversion -Wshift-negative-value -fPIC")
set(NIC_DEFAULT_CXX_FLAGS "${NIC_DEFAULT_CXX_FLAGS} -Wl,-z,relro,-z,noexecstack,-z,noexecheap -Wl,--strip-debug -Wl,--strip-all")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${NIC_DEFAULT_CXX_FLAGS}")

file(GLOB CPP_SRCS "${NIC_SOURCE_DIR}/*.cpp")
add_library(amdsminic STATIC ${CPP_SRCS})
set_target_properties(amdsminic PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${NIC_BUILD_DIR})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This set(NIC_BUILD_DIR ${PROJECT_ROOT}/build) is not right - the build should not write into the source directory like this. See ROCm/TheRock#3500 (comment)

Quoting @stellaraccident :

Indeed. That is a major error. Revert or fix immediately.

RCCL grew one like this recently too.

@ScottTodd ScottTodd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why was this massive PR merged with such a short PR description? Given the release build issue reported in ROCm/TheRock#3500, let's revert.

Comment thread projects/amdsmi/build.log

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why was this build log committed?

Comment thread projects/amdsmi/.success

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is this .success file?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

drive-by: this file is huge... should it be split into multiple files? How are you reviewing changes to it?

@JeniferC99

JeniferC99 commented Feb 20, 2026

Copy link
Copy Markdown
Collaborator

Why was this massive PR merged with such a short PR description? Given the release build issue reported in ROCm/TheRock#3500, let's revert.

Having issue reverting with github UI, will try to revert locally.
Revert: #3418

JeniferC99 pushed a commit that referenced this pull request Feb 20, 2026
@dmitrii-galantsev

Copy link
Copy Markdown
Contributor

original PR: ROCm/amdsmi#71

JeniferC99 added a commit that referenced this pull request Feb 20, 2026
* Revert "[SWDEV-544298] AINIC implementation (#2798)"

This reverts commit 00e9b8d.

* Revert "[ROCM-2942] Fix AMDSMI_STATUS_NO_DATA on NIC devices & tests not completing (#3289)"

This reverts commit 3c85365.

---------

Co-authored-by: Jenkins <jenkins-compute@amd.com>
Co-authored-by: Maisam Arif <Maisam.Arif@amd.com>
ajanicijamd pushed a commit that referenced this pull request Feb 23, 2026
Co-authored-by: Oosman Saeed <oossaeed@amd.com>
ajanicijamd pushed a commit that referenced this pull request Feb 23, 2026
[ROCM-2942] Fix AMDSMI_STATUS_NO_DATA on NIC devices & tests not completing (#3289)

Installation successful on attempt 1
Verifying installation:
amdsmi.amdsmi_exception.AmdSmiLibraryException: Error code:
	40 | AMDSMI_STATUS_NO_DATA - No data was found for given input
Error: Process completed with exit code 1.

Signed-off-by: Charis Poag <charis.poag@amd.com>
amd-josnarlo pushed a commit that referenced this pull request Feb 23, 2026
* Revert "[SWDEV-544298] AINIC implementation (#2798)"

This reverts commit 00e9b8d.

* Revert "[ROCM-2942] Fix AMDSMI_STATUS_NO_DATA on NIC devices & tests not completing (#3289)"

This reverts commit 3c85365.

---------

Co-authored-by: Jenkins <jenkins-compute@amd.com>
Co-authored-by: Maisam Arif <Maisam.Arif@amd.com>
ajanicijamd pushed a commit that referenced this pull request Feb 24, 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.
oosman330 added a commit that referenced this pull request Feb 25, 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.
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.
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.

8 participants