44 Коммитов

Автор SHA1 Сообщение Дата
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
Maisam Arif 1f7fc8d8a7 Fixed wrapper to respect symlink pathing (#1984)
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
2025-11-24 13:14:46 -06:00
Galantsev, Dmitrii 181659ea1f Add numbers to .so because wheels dont allow symlinks (#820)
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>

[ROCm/amdsmi commit: 8bdf951d32]
2025-11-06 03:57:31 -06:00
Galantsev, Dmitrii 55f999f3ce Find libamd_smi.so and librocm-core.so relative to wrapper.py
Allow amdsmi to find libamd_smi.so and librocm-core.so relative to
amdsmi_wrapper.py location.

The amdsmi_wrapper.py file is located in
_rocm_sdk_core/share/amd_smi/amdsmi and the libraries are in
_rocm_sdk_core/lib/libamd_smi.so.26.
_rocm_sdk_core/lib/librocm-core.so.1.


[ROCm/amdsmi commit: ad20d57162]
2025-10-30 12:35:06 -05:00
Pryor, Adam 5127c923b9 [SWDEV-559082] Add asic info cache (#756)
Signed-off-by: adapryor <Adam.pryor@amd.com>

[ROCm/amdsmi commit: cba4c871d3]
2025-10-08 21:48:08 -05:00
Oosman Saeed 2214445327 [SWDEV-553168] Add support for decoding out of band boot time CPER files.
Change-Id: Ic4278698f9c5b5ae56bd56fd43150c0653c1ef05


[ROCm/amdsmi commit: c6698c9100]
2025-10-07 22:23:33 -05:00
Galantsev, Dmitrii d0b5e20440 Create run-clang-tidy.sh
Change-Id: I4faa950a59434ba4706da581af51dd8a7e071dcb
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 0cd05bf307]
2025-09-05 17:44:17 -05:00
Pryor, Adam 32a1ef90cd Documentation updates for AMDSMI_GPU_METRICS_CACHE_MS (#564)
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>

[ROCm/amdsmi commit: 2dc2e12a97]
2025-08-05 19:58:37 -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
Narlo, Joseph 540ecd41bd [SWDEV-541675] Remove Unnecessary API from amdsmi.h (#530)
Signed-off-by: josnarlo <Joseph.Narlo@amd.com>

[ROCm/amdsmi commit: 2cf6272b53]
2025-07-07 11:14:27 -05:00
Arif, Maisam 2658f0fe20 Fixed type hinting & Added copy rights (#462)
* Added copyrights
* Fixed type hinting for processor_handle in python_interface
* Fixed Incorrect type hinting to actual return types

---------

Signed-off-by: Arif, Maisam <Maisam.Arif@amd.com>
Change-Id: Ie2a09acf628ed0c43eacc8ec78c159d125acbcdb

[ROCm/amdsmi commit: 23b9da656c]
2025-06-11 17:19:02 -05:00
Arif, Maisam 465f2e6a41 [SWDEV-488303] Updated CU occupancy for per-process retrieval (#243)
Change-Id: I2990597c6dd4b2e8cf3e11ce60f72049ebdd9a8c
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>

[ROCm/amdsmi commit: 0fdaebdbaa]
2025-05-29 20:35:27 -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 bc0567f017 CI - Add cmake-format to workflows
Change-Id: Iba0ab896a42abecf389e6b92811343e1fd51c302
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 17b01e2456]
2025-05-06 17:09:53 -05:00
Arif, Maisam a5c2ac9f87 CLI Help text and parser formatting updates (#218)
* Small Fixes
* CLI Help text and parser formatting updates
* Changed metavar for set partition

---------
Change-Id: Ia8809665f6fac670452cd4db4e5e8f9c7270faba
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Signed-off-by: Pham, Gabriel <Gabriel.Pham@amd.com>
Co-authored-by: Pham, Gabriel <Gabriel.Pham@amd.com>

[ROCm/amdsmi commit: 53dbb7bf58]
2025-04-22 23:32:42 -05:00
Arif, Maisam cb3c979dfe Removed unnecessary rocm-smi files (#217)
* Removed unnecessary rocm-smi files
* Moved the update wrapper script into the tools folder

---------

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

[ROCm/amdsmi commit: 50d7d5287f]
2025-04-04 18:26:43 -05:00
Maisam Arif dab3e0657b Updated imports on amdsmi_quick_start
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Ideb0f2addf61fb6bdb728e549a8b0f133682d7d6


[ROCm/amdsmi commit: 0da6613b99]
2025-04-04 18:25:17 -05:00
Arif, Maisam 56fa8ec779 Update quick start tool (#219)
Added CLI libs to amdsmi_quick_start.py

Change-Id: I72428d083dbff6224e57a97b954f602c72d323e8

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

[ROCm/amdsmi commit: d7416c98d7]
2025-03-29 12:06:02 -05:00
Galantsev, Dmitrii c2c02a5f60 [SWDEV-513769] Search standard locations for libamd_smi.so
Change-Id: I2c364b7dfa6ffa91e5b1c837c2d3d14ef58ee66b
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 30a6cb02f2]
2025-02-19 01:34:03 +00:00
Narlo, Joseph 2578ed922b [SWDEV-506030] Fix Errors when generating python wrapper
Update wrapper script is not generating the python wrapper properly.
Fixed how the structure names are parsed.

Signed-off-by: Joseph Narlo <joseph.narlo@amd.com>

[ROCm/amdsmi commit: 84f4d397aa]
2025-01-07 16:12:37 -06:00
Joe Narlo bad2cc9c23 SWDEV-495787 [AMDSMI] Different license headers
Change copyrights to MIT and remove date

Signed-off-by: Joe Narlo <Joseph.Narlo@amd.com>
Change-Id: I16f5b412f2b9ddefaaa1771aa714cc18829a1be4


[ROCm/amdsmi commit: 3052ad4220]
2024-11-22 08:55:28 -05:00
Joe Narlo 06ef0819a3 SWDEV-487604 [AMD SMI][Unified Header] integration_test.py is failing with unified header
The script generator.py was not handling all of the anonymous and unnamed structures.
Logic was added to correct the errors seen in the script amdsmi_wrapper.py

Removed adding _ to structure definitions

Change-Id: I51958d23b3da40ec67e883e13dc74feaeaf1d58e
Signed-off-by: Joe Narlo <Joseph.Narlo@amd.com>


[ROCm/amdsmi commit: b5887c2f05]
2024-10-15 16:22:02 -04:00
gabrpham 2aa8e8c755 Corrected partition changes in header and wrapper
Signed-off-by: gabrpham <Gabriel.Pham@amd.com>
Change-Id: Iafd7de8f08924873da841ee6eca62100a17b2b6c


[ROCm/amdsmi commit: 8bc4abc88b]
2024-09-20 17:01:55 -05:00
Maisam Arif 82096d7f74 Moved KFD information to separate structure and API
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: If6eaea589edc704cf408d6391b5f2154134035e7


[ROCm/amdsmi commit: 3b7f661e71]
2024-09-20 03:48:42 -04:00
Maisam Arif 53130a9c3c Fixed amdsmi_get_utilization_count() wrapper generation
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Ifd59fca042c4b3b0fc53e100b6892c6b4f7b3e95


[ROCm/amdsmi commit: 639daa3d90]
2024-09-17 16:34:42 -04:00
Maisam Arif c2b9cdfd2e Udpated License Dates
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I8ca199c129c06508bc3e23745ab5ac2d20dce928


[ROCm/amdsmi commit: 105db1afcd]
2024-09-16 16:14:47 -04:00
Michael John 0f77bf659b Proper escape Windows path \include in generator.py
Change-Id: I9042de7e9cb08c247b7bf21a8de2b8cbceb483da
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: d75d127864]
2024-09-16 15:45:15 -04:00
Maisam Arif cabbdf44cb [SWDEV-482412] Optimized PCIe Bandwidth gpu_metrics calls
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Ib37d232b94a080e9b490dd065628d2567aaf4642


[ROCm/amdsmi commit: 787d4462fa]
2024-09-11 23:26:30 -05:00
Maisam Arif ae9d7a098c Udpated amdsmi_quick_start.py with cpus preloaded
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I4a5ca0d30d2fce3b4fa3a6a13599a18b0dd16ce7


[ROCm/amdsmi commit: 8b3d45e301]
2024-09-11 17:38:17 -04:00
Maisam Arif adc9b69f39 Updated cli init functions to not intersect with lib init functions
Added Quick start script to quickly test python APIs
"python3 -i tools/amdsmi_quick_start.py"
Fixed ESMI lib macros

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


[ROCm/amdsmi commit: 1efb5e9910]
2024-09-04 10:23:36 -04:00
Maisam Arif d2719fa4f6 Temporary generator.py patch for amdsmi_bdf_t
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I93157127524b87e2e1445dcdc8588e62530bf68c


[ROCm/amdsmi commit: b39b39ef3c]
2024-05-30 15:35:38 -04:00
Bill(Shuzhou) Liu 7bcdf63c18 Add @platform doxygen alias
The @platform alias will describe which platform (for example,
gpu_baremetal or/and host) an API can be used.

The get_platform.py is a tool to compare APIs in different platforms.

Change-Id: I902bc4fea048269eace6e9f3f4a8e93f3adb7f87


[ROCm/amdsmi commit: 86d025daaa]
2024-02-07 07:28:38 -05:00
Galantsev, Dmitrii 009da920b7 Remove absolute link to libamd_smi.so
Also modify README to include:
  export PATH="$PATH:/opt/rocm/bin"

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


[ROCm/amdsmi commit: 874d8edb3d]
2023-11-02 14:31:58 -05:00
Galantsev, Dmitrii 9ef6a3b974 CMAKE - Generate ESMI wrapper
The wrapper is only generated if ENABLE_ESMI_LIB option is set.
./update_wrapper.sh will check the option if cmake was ran first.

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


[ROCm/amdsmi commit: 8568af65ff]
2023-10-16 16:49:00 -05:00
Maisam Arif fa9d79984b Added Error handling to generator
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I77e869624e4f0c7586dc2c018242b8e5737f7d4b


[ROCm/amdsmi commit: 8630b59b81]
2023-08-01 14:28:58 -04:00
Maisam Arif c94f66bbb6 AMD-SMI-CLI - Packaging updates
Added fallback in amdsmi_init.py to access /opt/rocm/share/amd_smi
        if python package is not installed
    Made libamd_smi.so detection more reliable
    Added PyYaml dependency to pyproject.toml
    Added python3-clang dependency in CMakeLists
    Updated python3 version dependency in CMakeLists
    Update Readme
    Added Release Notes

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


[ROCm/amdsmi commit: da50f4f078]
2023-05-23 10:32:08 -05:00
Maisam Arif d048ee8e14 SWDEV-381302 - Added Error handling for Set & Metric
Bug Fixes for Set and Fan
Updated lib_amdsmi.so directory access
Backwards compatability fixes for gpuv-smi

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


[ROCm/amdsmi commit: 0830e983d8]
2023-04-18 10:27:50 -05:00
Maisam Arif 24c96943d4 AMDSMI CLI Initial Packaging
- Added CMake packaging to the amdsmi_cli folder
- Updated Headings in the README.md to follow markdown standard
- Updated Compatibility to be based on the built package name in bin
- Added misc error handling and import corrections
- Updated py-interface amdsmi_exception imports to work by relative path
- Cleaned up py-interface cmake & generator code for finding libamd_smi.so
- Changed line endings in tools/generator.py file to unix

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


[ROCm/amdsmi commit: 235c8db949]
2023-03-20 10:50:21 -05:00
Maisam Arif b8f463cda5 AMDSMI_CLI version 0.0.1
Change-Id: I0b02ddf1cc22753635062475cccadcc235e3a603
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>


[ROCm/amdsmi commit: aa70b77ec5]
2023-03-20 08:51:35 -05:00
Galantsev, Dmitrii 446f1d1c15 Improve python wrapper generation
- Add "BUILD_PACKAGE" option that is OFF by default (CI issues)

- Optionally package wrapper if python3.7 or above is present (hack for CI)
- Optionally build wrapper if clang is present (hack for CI)
- Improve dependency resolution for wrapper
- Use python venv
- Use pyproject.toml instead of setup.py
- Use CMake install path to search for libamd_smi.so
- Move python-specific CMakeLists into py-interface
- Search for libamd_smi.so more aggressively

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


[ROCm/amdsmi commit: 74479187d0]
2023-03-16 09:13:56 -05:00
Dalibor Stanisavljevic de01be137e SWDEV-373280 - Added new generator
Change-Id: I82e3663f8118f17dc6a223a79cadd95634329356
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: 36eb2145d9]
2022-12-27 10:14:09 +01:00
Dalibor Stanisavljevic 6df9b40579 SWDEV-371210 - Fixed python_package command
Change-Id: Idf9e0cc23278caa0333ed26ad32450931d0d603b
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: fae4e1fc37]
2022-12-06 08:07:18 -05:00
Dejan Andjelkovic 14d9160565 SWDEV-361376 - Add python wrapper
- Add generator for python wrapper
- Add interface, exception and init files
- Add CMake custom targets

Change-Id: I63c1d94fbb587387c22f559a3db79987eb214a2e
Signed-off-by: Dejan Andjelkovic <Dejan.Andjelkovic@amd.com>


[ROCm/amdsmi commit: 6064f160a3]
2022-10-20 09:24:53 -05:00