42 Commity

Autor SHA1 Wiadomość Data
Sumanth Gavini 4b81912baa [SWDEV-568642] amd-smi: Add amd-smi --rocm-smi for rocm-smi compatibility mode (#2363)
Implement new --rocm-smi flag that displays GPU information in ROCm-SMI
compatible format

Signed-off-by: Sumanth Gavini <sumanth.gavini@amd.com>
2026-01-26 14:37:46 -06: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
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 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
yalmusaf_amdeng dd518c61d2 --cper-file case sensitivity fix
[ROCm/amdsmi commit: d6f8c0437e]
2025-09-19 16:28:00 -05:00
AL Musaffar, Yazen 851354429f [SWDEV-545894] Folder name defaulting to lower case fix (#611)
* Folder name defaulting to lower case

* Update amdsmi_cli/amdsmi_cli.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Pham, Gabriel <Gabriel.Pham@amd.com>

* Fixed Based On Comments

* Remove unused variable 'skip_next'

Signed-off-by: AL Musaffar, Yazen <Yazen.ALMusaffar@amd.com>

---------

Signed-off-by: Pham, Gabriel <Gabriel.Pham@amd.com>
Signed-off-by: AL Musaffar, Yazen <Yazen.ALMusaffar@amd.com>
Co-authored-by: yalmusaf_amdeng <yalmusaf@amd.com>
Co-authored-by: Pham, Gabriel <Gabriel.Pham@amd.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

[ROCm/amdsmi commit: 4a8ee27225]
2025-09-07 20:38:29 -05:00
Poag, Charis 07dfa789d0 [SWDEV-542223] Update Violation Status Changes to Design + Minor cleanup (#558)
Changes:
  - Update violation status logic and metric naming for XCP/XCC metrics (thrm/thm consistency)
  - Added XCP identifier in monitor to allow partition metrics to be shown with applicable APIs
    (Violation Status is the first example of this in monitor)
  - Improve CLI monitor output:
    support multiple GPU lines per GPU, add new columns, and better formatting
  - Refactor helpers and logger for flexible unit formatting and table rendering
  - Add examples for amdsmi_get_gpu_pm_metrics_info()/amdsmi_get_gpu_reg_table_info()
    new metrics APIs in C++ example
  - Sync Python/C++ interface and structures for new metrics fields and naming
  - Remove deprecated/unused RSMI activity APIs, documentation not needed since
    the APIs no longer exist in ROCm SMI either.
  - Cleanup metric violations + fix handle watch arguments
  - Provide better handling/doc for average_flattened_ints()
  - Group xcp metrics with brackets in human readable + adjust output size

Signed-off-by: Poag, Charis <Charis.Poag@amd.com>

[ROCm/amdsmi commit: e2e4fc65c1]
2025-08-06 16:03:06 -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
Kanangot Balakrishnan, Bindhiya 67f21bb032 [SWDEV-537852] Update compute-partition set error messages (#505)
[SWDEV-537852] Update compute-partition set error messages

Setting compute partition needs sudo privileges. Added
AmdSmiPermissionDeniedException to display CLI elevated
permission errors.

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: 27a1705d96]
2025-08-01 08:22:22 -05:00
Maisam Arif 6531fdd0fb Reduced calls to drm devinfo for getting virtualization_mode
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I22a6a9ca15131b37a775e8d4f595fb13c0b043c7


[ROCm/amdsmi commit: 10f9aae0b3]
2025-07-11 12:26:42 -05:00
Poag, Charis 92f926b43b [SWDEV-533305] Remove partition info from amd-smi static (-p/--partition still available) + CLI API call cleanup (#529)
Updates:
- Separate extra APIs calls from amd-smi CLI to target specific CLI commands that need them.
- Remove extra current_compute_partition SYSFS calls from amd-smi static.
- Remove the partition information from the default `amd-smi static` CLI command.
- Users must now use the `-p` argument to view partition information with `amd-smi static`.
- The help text for the `partition` argument has been updated to reflect this change.
- The partition information can still be accessed using the `amd-smi partition -c -m` or `sudo amd-smi partition -a` commands.

---------

Signed-off-by: Charis Poag <Charis.Poag@amd.com>

[ROCm/amdsmi commit: 88473b7fd0]
2025-07-07 11:21:46 -05:00
Pham, Gabriel c283cccf79 [SWDEV-511822] Created default command for amdsmi (#348)
* Added degree symbol and fixed power usage
* Added degree symbol and fixed power usage
* fixed default command

---------

Signed-off-by: gabrpham_amdeng <Gabriel.Pham@amd.com>

[ROCm/amdsmi commit: bc158d2b51]
2025-05-29 17:14:58 -05:00
Maisam Arif c0cc1b3360 [SWDEV-529603] Fix subcommand aliasing
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I1c15faffa5fda1b8f5c2f5d6e4c7ae746ff8ee7c


[ROCm/amdsmi commit: 4099fee17f]
2025-04-28 10:44:01 -05:00
Arif, Maisam c5cf1ba92f Improved import structure (#275)
* Improved import structure

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

---------

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

[ROCm/amdsmi commit: b2f1df85a3]
2025-04-22 23:52:06 -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 7ea98e06dd [SWDEV-511234] Added amdsmi_get_gpu_cper_entries & CLI implementation
Added amdsmi_get_gpu_cper_entries() in the python and C APIs

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>
Co-authored-by: Saeed, Oosman <Oosman.Saeed@amd.com>
Co-authored-by: AL Musaffar, Yazen <Yazen.ALMusaffar@amd.com>

[ROCm/amdsmi commit: d81871ef16]
2025-04-12 01:54:57 -05:00
Kanangot Balakrishnan, Bindhiya b442530b74 [SWDEV-513958] Add help flag to valid commands (#204)
Added '-h' flag to valid first input command list

Signed-off-by: Bindhiya Kanangot Balakrishnan <Bindhiya.KanangotBalakrishnan@amd.com>

[ROCm/amdsmi commit: 9b64dcb61a]
2025-03-26 17:43:28 -05:00
Kanangot Balakrishnan, Bindhiya ec9be97b9f [SWDEV-513958] Fix error message due to argparse behavior (#108)
When argparse parses multiple invalid arguments, the error
message displays only the last argument and this leads to
confusion. To avoid the scenario, added valid command check
before argparse and in case of invalid first command, added
new exception.

Signed-off-by: Bindhiya Kanangot Balakrishnan <Bindhiya.KanangotBalakrishnan@amd.com>

[ROCm/amdsmi commit: 3681f900ee]
2025-03-26 13:11:17 -05:00
Arif, Maisam a56e0e67d7 [SWDEV-518976] Fix amd-smi metric clock checks (#154)
[SWDEV-518976] Fixed amd-smi version default args

Change-Id: Id88da4d8f31aa0b0cf55b3cf796c16981931d857

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

[ROCm/amdsmi commit: a340a54ee6]
2025-03-06 11:25:59 -06:00
Arif, Maisam da7e32834b Updated Import Error Logging
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Ief4a5f100f54668c5bce001ea051136738fbc468

[ROCm/amdsmi commit: 703415cb1f]
2025-01-28 15:56:49 -06:00
Bindhiya Kanangot Balakrishnan bfd480c6ba [SWDEV-498507] Tool amd-smi could be more case insensitive
Modified amdsmi_cli to accept case insensitive arguments if
the argument does not start with a single dash(-).

Signed-off-by: Bindhiya Kanangot Balakrishnan <Bindhiya.KanangotBalakrishnan@amd.com>
Change-Id: I1b6320db0afaad0900d5a2049206002c3899fa71


[ROCm/amdsmi commit: fc7e1ddb4a]
2024-12-02 18:09:45 -05: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
gabrpham 5ca4c2e976 Added amd-smi partition as preliminary command.
new command includes following arguments:
  - current - display the current partition information for the selected
    gpu(s)
  - memory - display memory partition information for the selected
    gpu(s)
  - accelerator - display accelerator partition information for the
    selected gpu(s)
additional functionality will be added as more partition APIs are added.

Signed-off-by: gabrpham <Gabriel.Pham@amd.com>
Change-Id: Ica86160139002ef5213d6d4b0e390670aeef01c8


[ROCm/amdsmi commit: 4e2fc2d604]
2024-09-27 17:05:04 -05: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
Ranjith Ramakrishnan 8ce27d8bc7 SWDEV-469004 - Append additonal path to system path
amd-smi is installed in /opt/rocm-ver/bin, but not as a soft link in wheel package
For amd-smi to work from bin directory, it need the extra path to find the dependent python scripts in /opt/rocm-ver/libexec/amd_smi

Change-Id: I4ff63a8f55949aaac51d85eae849ecc890f4c694


[ROCm/amdsmi commit: 7591eec971]
2024-08-08 02:15:04 -04:00
Maisam Arif 0865293d27 [SWDEV-472641] Set file opening and writing encoding to utf-8
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Ic5cdca41b588341f7894de72dfe3d949378f9a61


[ROCm/amdsmi commit: c83bcb7ac9]
2024-07-12 09:46:44 -04:00
Maisam Arif 60a86065c0 SWDEV-436792 - Add XGMI Table
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Ia7a43b2b6d01fd32ece00cc26c28ba3088f3aa9e


[ROCm/amdsmi commit: 4ca326d824]
2024-02-22 23:10:57 -06:00
Maisam Arif 6f778a4c62 SWDEV-413122 - Initial Monitor subcommand
Change-Id: Iaeaef77efeaa4289b19f1f676dcae6245f0e0c9e


[ROCm/amdsmi commit: f91fc97fed]
2023-12-13 23:43:43 -06:00
Maisam Arif ef2c6cb157 Enabled amd-smi auto completion using argcomplete
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I0ea48b1b3a10e738d1fe91db85bc61ad51b85de2


[ROCm/amdsmi commit: d6abcfa92d]
2023-10-24 12:39:12 -04:00
Maisam Arif 4fceaa7c5c Updated Driver Error Logging & Exceptions
Change-Id: Idd14904b33e82e4cb5d9f84c75978fe686a9b603
Signed-off-by: Maisam Arif <maisarif@amd.com>


[ROCm/amdsmi commit: 3fa96a9e02]
2023-09-27 19:24:55 -04:00
Maisam Arif 821994b869 Fixed log handling and exceptions
Updated exceptions
	Added driver load exception
	Fixed logging override by removing previous log handlers
	Updated debug output to use gpu_id vs C-pointer
	Removed AmdSmiRetcode class in favor of using the wrapper
directly
	Added traceback limits for clean errors (Not in debug)

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


[ROCm/amdsmi commit: 9281bfbbfa]
2023-09-25 01:49:35 -05:00
Maisam Arif 260fd7faae Removed compatibility modes
Removed gpuv-smi and rocm-smi compatibility options
	Updated py-interface README

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


[ROCm/amdsmi commit: 5c52f82328]
2023-09-24 21:17:43 -04:00
Maisam Arif 23499c2e44 Changed discovery to list
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Ib712a182e839343472f4c6fd87a34d045b63f619


[ROCm/amdsmi commit: fab2184e71]
2023-09-19 12:00:49 -05:00
Maisam Arif b3c1dd5a2a Added slowdown temperature metrics
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Ibeb7968c4fb352ff215a617908e0c0abc33a38a4


[ROCm/amdsmi commit: 93c54f52cd]
2023-09-18 18:11:55 -05:00
Maisam Arif 5ecabf2276 CMAKE: Changed dependency to suggestion for centos
Updated pyproject.toml to depend on clang via pip
	Changed python38 dependency to a suggestion for rpm builds
Change-Id: Idf3bd94aafaf715f600dead0a3a9cb95cff29368
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>


[ROCm/amdsmi commit: 0a1e486214]
2023-06-15 00:51:45 -05:00
Maisam Arif 09940e45df AMD-SMI-CLI - Updated amdsmi_interface calls to new headers
Change-Id: I031f08c912f2cc77bba3a6f4356b5121072fb71e
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>


[ROCm/amdsmi commit: 01bd64c718]
2023-05-22 08:35:22 -05:00
Maisam Arif 0c84413614 SWDEV-392033 - Topology gpu index fix
Fixed Topology csv output
	Added README.md for amd-smi

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


[ROCm/amdsmi commit: 515adfb61f]
2023-04-25 09:16:17 -05:00
Maisam Arif 1de2329c18 SWDEV-380688 - Added CSV Format
Change-Id: I609bc9837132fd674bf54480a3220c911b2909d2
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>


[ROCm/amdsmi commit: 8ad410f6af]
2023-04-20 00:06:20 -05:00
Dalibor Stanisavljevic d13f16e2c9 SWDEV-381302 - Added error handling
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
Change-Id: Ia69c8aebdaa23e212c0ce2522201092bab54e732


[ROCm/amdsmi commit: 06f12c4700]
2023-04-18 14:00:11 +02:00
Galantsev, Dmitrii a94331f293 CMake: Replace .whl with libexec install
Generating .whl has proved to be difficult with AMD CI.
Switch to directly installing python projects instead.

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


[ROCm/amdsmi commit: 87b9faf926]
2023-03-20 21:24:39 -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