201 Υποβολές

Συγγραφέας SHA1 Μήνυμα Ημερομηνία
Stella Laurenzo 81eed26ec6 [amdsmi] Add include dirs for libdrm. (#2504)
This has started failing on various developer build systems. Looking at it, it is not precisely clear how this ever worked given that nothing appears to be adding the DRM include dirs.

I'd prefer that we remove this delay loading (at least for TheRock builds where it is never needed), but in the meantime, this does fix the issue and is verified on an affected system.

Fixes https://github.com/ROCm/TheRock/issues/2744
2026-01-06 15:18:20 -08:00
Mario Limonciello 08949cb884 Run pre-commit's whitespace related hooks on projects/amdsmi (#2119)
* Run pre-commit's whitespace related hooks on projects/amdsmi

In order for pre-commit to be useful, everything needs to meet a common
baseline.

* Add whitespace back to Changelog for formatting

---------

Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
2025-12-15 13:20:47 -06:00
arvindcheru 0f76bb45c7 Enable Lintian configuration/Files for AMDSMI (#2140)
* Enable Lintian configuration/Files for AMDSMI
2025-12-04 22:01:57 -05:00
Bindhiya Kanangot Balakrishnan 40aa184c2a [SWDEV-538483] Fix C++17 fs linking for GCC<9.0
Added check for GCC versions prior to 9.0 and
link with libstdc++fs when needed. This fixes
undefined symbols on older systems like Deb10
with GCC 8.3.0.

Signed-off-by: Bindhiya Kanangot Balakrishnan <Bindhiya.KanangotBalakrishnan@amd.com>
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: e1b3d5f02e]
2025-11-14 17:59:07 -06:00
Kanangot Balakrishnan, Bindhiya 072daa28d5 [SWDEV-538483] Add NPM API's and CLI (#817)
* Added Python & C API's for new node devices. Currently these are functional for node 0 only.
 - amdsmi_get_node_handle
 - amdsmi_get_npm_info
* Added `amd-smi node` CLI for Node Power Management

---------

Signed-off-by: Bindhiya Kanangot Balakrishnan <Bindhiya.KanangotBalakrishnan@amd.com>
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Co-authored-by: Maisam Arif <Maisam.Arif@amd.com>

[ROCm/amdsmi commit: f8e4771363]
2025-11-13 21:51:31 -06:00
Pryor, Adam 94e6ba68b4 [SWDEV-547088] Dynamic GPU Metrics Implementation (#692)
* Added ability to format gpu_metrics v1_9
* New gpu_metrics format from the driver should allow amd-smi to parse with future compatibility guaranteed

---------

Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>
Signed-off-by: adapryor <Adam.pryor@amd.com>
Co-authored-by: Oliveira, Daniel <daniel.oliveira@amd.com>

[ROCm/amdsmi commit: 5ef0b3c34d]
2025-10-01 15:46:10 -05:00
Maisam Arif 4fcf92ee14 Removed unused version config files
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I3b00a8c302615026422f6d5d602959989ee0418e


[ROCm/amdsmi commit: 843dfaeed2]
2025-09-25 18:19:14 -05:00
Stella Laurenzo 7412d14fed Fix delay loading of drm by soname.
[ROCm/amdsmi commit: 4d5d24d1c6]
2025-09-24 20:44:03 -05:00
Stella Laurenzo 060293c7fc [cmake] Fix dependencies.
* Use CMAKE_DL_LIBS instead of hard-coded `dl`.
* Use Threads::Threads instead of `pthread`.
* Drop `rt` dep.
* Find libdrm via pkgconfig (consistent to how other ROCm projects do it as documented here: https://github.com/ROCm/TheRock/blob/main/docs/development/dependencies.md#libdrm)


[ROCm/amdsmi commit: 4e6731a817]
2025-09-24 20:44:03 -05:00
Arif, Maisam 433893c770 Revert "[SWDEV-536176] libdrm_amdgpu depdency change (#448)"
This reverts commit 4d33e79baa.


[ROCm/amdsmi commit: ed2300516f]
2025-08-27 20:11:17 -05:00
Arif, Maisam 4d33e79baa [SWDEV-536176] libdrm_amdgpu depdency change (#448)
* Cmake fix updates
* Next fix will be addressing libdrm further

---------

Signed-off-by: adapryor <Adam.pryor@amd.com>
Signed-off-by: Justin Williams <juwillia@amd.com>

[ROCm/amdsmi commit: 652761de54]
2025-08-27 09:32:51 -05:00
Galantsev, Dmitrii beaffa2c84 [SWDEV-545751] CMAKE - Enable fPIC (#629)
Change-Id: Iaade10e70b3a39d6bca23ae98f9f501339ffd76d
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>

[ROCm/amdsmi commit: cd33b75540]
2025-08-19 11:39:39 -05:00
josnarlo 4fe4c4df23 Fix getting version information
Change-Id: I2695733307888f5ab41a1265ae4369a2ea011e09


[ROCm/amdsmi commit: 925014ddaf]
2025-08-08 08:12:10 -05:00
Liu, Shuzhou (Bill) 7ec0a1a7dd Query UBB/OAM temperature API (#581)
Add support to Query UBB/OAM temperature.
* Updated Python API with new temperature metrics enum

---------

Co-authored-by: Bill Liu <shuzhliu@amd.com>
Co-authored-by: gabrpham_amdeng <Gabriel.Pham@amd.com>

[ROCm/amdsmi commit: abd3c02a3c]
2025-08-05 20:37:45 -05:00
Galantsev, Dmitrii dbc496b36f CI - Use self-hosted machines for format checking due to IP whitelist
Change-Id: I1f0f4af7ed42d849cf4c9384e3c0c6da57b0504c
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 4044d1da41]
2025-08-04 21:09:25 -05:00
Arif, Maisam e5d03d099a Revert "[SWDEV-505176] Submodule Unified Header in AMDSMI"
This reverts commit 0e895cf235.


[ROCm/amdsmi commit: 240a607904]
2025-07-30 14:08:24 -05:00
Narlo, Joseph 0e895cf235 [SWDEV-505176] Submodule Unified Header in AMDSMI
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>

[ROCm/amdsmi commit: a315b62e37]
2025-07-30 13:37:01 -05:00
Cheruvally, Aravindan d25c73783e [SWDEV-530465] Update share/doc/<pkgnm> License Folder (#516)
Update share/doc/ folder for license/docs to reflect correct package name.
Signed-off-by: Cheruvally, Aravindan <Aravindan.Cheruvally@amd.com>

[ROCm/amdsmi commit: f559075a81]
2025-07-03 02:07:54 -05:00
Jeremy Newton 7b9ef0e406 Don't install asan docs if disabled
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>


[ROCm/amdsmi commit: 529c6ee151]
2025-06-30 12:05:29 -05:00
Maisam Arif 7be2218717 [SWDEV-537491] Updated Copyright to aca-decode files
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I9621e4c54f3b490c6eb4cfc3e9bdfb4d489f0052


[ROCm/amdsmi commit: 5763412f7d]
2025-06-11 20:51:51 -05:00
Galantsev, Dmitrii 6892907072 CMAKE - Remove example build from src/CMakeLists.txt (#469)
* CMAKE - Remove example build from src/CMakeLists.txt
For some reason it was building examples every time even when not
necessary...
* CMAKE - Format
* Fix drm_example broken PRIu32
* CMAKE - Do NOT create lib64 when building examples
* CMAKE - Examples should only install C and CMake files

---------

Change-Id: I6274b72a085a41b5bd5ae698af798f60a8a092a0
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>

[ROCm/amdsmi commit: f9b8066c26]
2025-06-11 07:12:44 -05:00
Maisam Arif 5324134708 Version Bump 26.0.0
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I29ea6fa781dfc338a60b390ff498c46b4a1efe52


[ROCm/amdsmi commit: cc4dfd834f]
2025-05-30 20:48:29 -05:00
Arif, Maisam 7ded6504b8 Version & Doc update (#343)
Change-Id: Ibf8e1809913e30aba4b21ba889b72e5db7205736

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>

[ROCm/amdsmi commit: ace3b0901a]
2025-05-08 12:19:04 -05:00
Galantsev, Dmitrii 51088382c8 [SWDEV-529762] CMAKE - Fix lintian issues (#325)
Change-Id: Ide3563a876cb530d0e80676e78f36f18a233a3ba

Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>

[ROCm/amdsmi commit: bd82e881f5]
2025-05-06 17:59:47 -05:00
Galantsev, Dmitrii c6c01ee675 CMAKE - Format with cmake-format
Change-Id: I5b86b7b83e3d151c3d6e1c216ecb28f1313d538a
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 42c77a5912]
2025-05-06 17:09:53 -05:00
Galantsev, Dmitrii 3c32ef6c39 CMAKE - Clean-up cmake changes introduced in a9b8b6d369b390af0c00bbffab2b4fe1748b8bad
Change-Id: Ida0e9475a926a2495e36b0d9bc2468c48aee0e77
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: fe98b8bd63]
2025-05-05 15:43:12 -05:00
Poag, Charis fb3d7b9fb9 [SWDEV-528647/SWDEV-528450] Reduce API load times and libdrm/libdrm_amdgpu dynamic loading (#333)
Changes:
- Removed libdrm/libdrm_amdgpu dependencies
- Added/updated new internal libdrm/libdrm_amdgpu/xf86drm APIs
  to allow our APIs to reference before dynamic loading
  the libdrm/libdrm_amdgpu libraries:
  1. amdgpu_drm.h to what's seen in mainline
  2. Added xf86drm.h to whats seen in mainline
- Modified internal DRM capabilities:
  1. Require each API to independently connect to libdrm/libdrm_amdgpu
     + validate API handles reponses accordingly
  2. Initialization of AMD SMI no longer has as strong of a tie to
     libdrm
- Updated internal implementations of several APIs which have
connections to libdrm/libdrm_amdgpu or APIs which have conflicts
with open libdrm/libdrm_amdgpu connections:
  1. amdsmi_init()
  2. amdsmi_get_gpu_vram_usage()
  3. amdsmi_get_gpu_asic_info()
  4. amdsmi_get_gpu_vram_info()
  5. amdsmi_get_gpu_vbios_info()
  6. amdsmi_get_gpu_driver_info()
  7. amdsmi_get_gpu_virtualization_mode()
  8. amdsmi_set_gpu_memory_partition()
  9. amdsmi_set_gpu_memory_partition_mode()
- Cleaned up effected tests/APIs

Change-Id: I96e2cf1b06b0cfee1b01a5e991ccc6116c4245a8

[ROCm/amdsmi commit: b5a43b7744]
2025-05-02 21:58:53 -05:00
Mewar, Deepak 94a54d24a5 [SWDEV-499995] amdsmi updated for esmi library changes (#266)
CMakelist updated to latest esmi tag esmi_pkg_ver-4.2, which
has fixes for esmi warnings during amdsmi build,

amdsmi_get_cpu_current_xgmi_bw updated as per change in
corresponding esmi library API

Signed-off-by: Deepak Mewar <deepak.mewar@amd.com>

[ROCm/amdsmi commit: 49aa2af045]
2025-04-14 19:21:51 -05:00
Galantsev, Dmitrii b1ec78b54b Add amdsmi_get_gpu_busy_percent
This is required for GPU busy percent in RDC

Change-Id: Idf2ab72993ecc8227958e6eb47f36fc68c93759f
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 955ceac78a]
2025-04-14 10:40:13 -05:00
Galantsev, Dmitrii 055f603ab9 Revert "CMAKE - Force INSTALL_LIBDIR to be lib"
This reverts commit 7bbe33c94d.


[ROCm/amdsmi commit: 2e429ed890]
2025-04-09 01:38:42 -05:00
Galantsev, Dmitrii 7bbe33c94d CMAKE - Force INSTALL_LIBDIR to be lib
On some systems it defaults to lib64, on others to lib.

Change-Id: I973b488253d106ded518ee590a0edb370927f9a4
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 62c10bfe3c]
2025-04-08 16:02:43 +00:00
Galantsev, Dmitrii ea1fcea378 CMAKE - Fix examples and clean up unused variables
Change-Id: Ie072476a525b49bb7c9c0fb9e49393a482a7d0b0
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 396afadd43]
2025-04-04 18:19:20 -05:00
Galantsev, Dmitrii e798e5336f Bump Version 25.4.0
Change-Id: Ief60ff2270e7e73d4e14b5181fa6fb18e32bcc1e
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: b0129c390c]
2025-03-28 21:50:38 -05:00
Galantsev, Dmitrii 633d2a8890 Make amdsmi_get_power_info backwards compatible
Change-Id: Ie5b4c35265827e78934caa94c142d31efce597e4
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 4a3c70136f]
2025-03-19 23:23:48 -05:00
Galantsev, Dmitrii 60704c3e36 [SWDEV-509342] Fix uninstall script on older RPM based systems
Change-Id: Ic85cd27e4460fbcdefab6fdd7e813a579c539525
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 14e81725f6]
2025-03-12 01:05:30 +00:00
Williams, Justin b9bfe3e1c0 [SWDEV-509342] Fixed CMake Pre Uninstall (#158)
Signed-off-by: Williams, Justin <Justin.Williams@amd.com>

[ROCm/amdsmi commit: c702e2833e]
2025-03-06 22:14:36 -06:00
Williams, Justin ac6c71732f [SWDEV-514609] Added setuptools & wheel dependencies (#143)
[SWDEV-514609] Added setuptools & wheel dependencies

Change-Id: Iada4e85b37181a0fd67f625b49fda090f1447d13

Signed-off-by: Williams, Justin <Justin.Williams@amd.com>

[ROCm/amdsmi commit: 82f6794573]
2025-03-06 16:59:02 -06:00
Williams, Justin f06d56838c [SWDEV-489695] Fixed lib tests install logic (#103)
Signed-off-by: Justin Williams <Justin.Williams@amd.com>

[ROCm/amdsmi commit: c01e0bd47a]
2025-02-11 15:59:09 -06:00
Galantsev, Dmitrii ef43e847ec CMAKE - Fix ld.lld undefined reference: drmGetVersion (#100)
After some update to amdclang a tag '--no-allow-shlib-undefine' began
being enforced. This caused compile failure when building with:
    CC=amdclang CXX=amdclang++ cmake -B build

DRM_AMDGPU_LIB is never used.
DRM_LIBRARIES is the one set by pkg_check_modules(DRM...)

Change-Id: I031aa1325b7a09a027aba8ca5cc7cc44fe86d3be

Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>

[ROCm/amdsmi commit: c3864bf617]
2025-02-06 16:23:54 -06:00
Arif, Maisam fb389b4943 Bump Version 25.2.0
Change-Id: I9a38e58c0c9ef9348312e4faf299518073a1c3c2

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>

[ROCm/amdsmi commit: fb3a9c2290]
2025-01-31 15:50:34 -05:00
Maisam Arif c983498157 Bump Version to 25.1.0.0
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I40efe2c9114357a6c34b5ee44fb523293d6b17e7


[ROCm/amdsmi commit: 70b14166f7]
2025-01-30 04:12:57 -06:00
Williams, Justin e488e8dc33 [DCSM-524] ESMI version fix
Adjusted ESMI version logic

Signed-off-by: Justin Williams <Justin.Williams@amd.com>
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Co-authored-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Ie6c480d7175b7bffcce183e9104419e87481aa89

[ROCm/amdsmi commit: 5f56d97d57]
2025-01-30 02:38:20 -06:00
Williams, Justin 79ffdfb12f [DCSM-524] ESMI build fix (#72)
Fix amd_hsmp failure to copy new version

Signed-off-by: Justin Williams <Justin.Williams@amd.com>
Co-authored-by: Arif, Maisam <Maisam.Arif@amd.com>

[ROCm/amdsmi commit: 21841f44a5]
2025-01-29 13:39:19 -06:00
Huang, Tim 5e82aac4f8 Add rust bindings for amdsmi c interface (#14)
It consists of two main steps:

1. Generating Bindings with `bindgen`:
- The `build.rs` script uses `bindgen` to generate Rust FFI (Foreign
Function Interface) bindings for the AMD SMI C library. This step
automatically exports all enums, structs, unions, and unsafe functions
from the C library into Rust. This provides a comprehensive low-level
interface to the AMD SMI library.

2. Implementing Safe Rust Wrappers:
- The generated bindings are then wrapped in safe Rust functions. These
safe wrappers handle error checking, resource management, and provide a
more idiomatic Rust interface. This ensures that users of the library
can interact with the AMD SMI functions without dealing with unsafe code
directly.

Change-Id: I7d5e49e59826164fc911ced04ef7ca5706b7cc05

Signed-off-by: Tim Huang <tim.huang@amd.com>

[ROCm/amdsmi commit: d32f2a109a]
2025-01-07 17:19:46 -06:00
Maisam Arif 04b864bd98 Bump Version to 24.7.2.0
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>


[ROCm/amdsmi commit: 6dcbff866b]
2024-12-19 17:04:55 -06:00
Justin Williams 83718095a4 Removed Wheel & Setuptools dependency
[ROCm/amdsmi commit: eb5f64a5e2]
2024-12-18 15:35:28 -06:00
Maisam Arif df85708b46 [SWDEV-489060] Added python3-setuptools & python3-wheel for base images
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I222395e656469f67405bc94a86ab7f8fd1ed34a2


[ROCm/amdsmi commit: aed7749a2c]
2024-12-11 16:40:51 -06:00
Justin Williams 8976ba5628 [SWDEV-502001] Added amd_hsmp.h locally
Signed-off-by: Justin Williams <Justin.Williams@amd.com>
Change-Id: I28e48913743f86fb5fc9082307ec326830d55960


[ROCm/amdsmi commit: 2c24cab86c]
2024-12-05 17:02:48 -05:00
Justin Williams 8c9cb42a58 [SWDEV-469278] Removed PyYAML Dependency
Signed-off-by: Justin Williams <Justin.Williams@amd.com>
Change-Id: Idec32cfb0de84cc255b506d7f972e2750992745e


[ROCm/amdsmi commit: 2370aa1b40]
2024-12-03 15:40:44 -05:00
Maisam Arif 835b438186 [SWDEV-502001] Fix link for amd_hsmp.h
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I402ee539cdd4c896acd7ccc83f3090c3a5eeba12


[ROCm/amdsmi commit: 664ade7354]
2024-12-02 16:30:06 -06:00