Граф коммитов

320 Коммитов

Автор SHA1 Сообщение Дата
Maisam Arif b233db729b Corrected throttle status value check
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I2d75108c64c3ca3e290be1dd5b8c1435c5576f91
2024-09-30 13:40:32 -05:00
Maisam Arif a266d602c5 Bump Version to 24.7.0.0
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Ife9277f6abf64ed862e11e12a6472c6e6ea4d68f
2024-09-27 18:55:19 -05:00
gabrpham 4e2fc2d604 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
2024-09-27 17:05:04 -05:00
Maisam Arif 2c8e2060cb Adjusted throttle unit logic in amdsmi_commands.py
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Icce949ff93f45c9751f43df0a80614fd377318fa
2024-09-27 13:26:58 -05:00
Charis Poag 3a4abbd8c0 [SWDEV-422195/SWDEV-440985] GPU metrics 1.6
Changes:
    - Added new GPU metrics:
      1) Violation status' (ex. PVIOL/TVIOL) accumulators
      2) XCP (Graphics Compute Partitions) statistics
      3) pcie other end recovery counter
    - CLI/API/tests changes were made accordingly

Change-Id: I589b9b1f570f25dda12d95bb501feca85da8b3bb
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
2024-09-27 12:04:21 -05:00
Harkirat Gill 3660724a08 Updated error message when driver modules not loaded
Small change to add sudo modprobe amdgpu/amd_hsmp suggestion if modules are not loaded. Requested per Maisam, will close https://github.com/ROCm/amdsmi/issues/45

Change-Id: Ia7ffcc99df18296c5c682f2082ff8dd8f007d557
2024-09-23 23:56:05 -04:00
Maisam Arif 09c9574454 [SWDEV-469278] - Lowered PyYAML dependency
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Icfee09b84cf1071ec82b65fc2877be69e0283489
2024-09-20 18:03:00 -04:00
Dmitrii Galantsev 6beec5f3ec Revert "[SWDEV-469278] Lowered PyYAML post install script dependency"
Revert submission 1125402

Reason for revert: Packaging a tar archive of 3rd party sources
Reverted Changes:
I8908451c0:[SWDEV-482058] Updated Packaging for offline insta...
I764c8bf01:[SWDEV-469278] Lowered PyYAML post install script ...

Change-Id: I3886b5370e352fc33a249c4657d7ed0c1ee75baf
2024-09-20 16:42:29 -04:00
Dmitrii Galantsev 9924574cbe Revert "[SWDEV-482058] Updated Packaging for offline installs"
Revert submission 1125402

Reason for revert: Packaging a tar archive of 3rd party sources
Reverted Changes:
I8908451c0:[SWDEV-482058] Updated Packaging for offline insta...
I764c8bf01:[SWDEV-469278] Lowered PyYAML post install script ...

Change-Id: Ib32fa5b9351b1cfc2a8d453e744c0d00209359eb
2024-09-20 16:42:29 -04:00
Maisam Arif 6a76f8a705 Bump Version to 24.6.5.0
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I93d6d397bd8d647f472017c28101dabe9ff8199b
2024-09-20 02:53:45 -05:00
gabrpham c9a489d437 Moved partition_id from static --asic-info to static --partition.
partition_id also removed from the `amdsmi_asic_info_t` struct and
supporting API has been added for querying partition information.

Signed-off-by: gabrpham <Gabriel.Pham@amd.com>
Change-Id: Id5a6291a77d11bb97a1c7a200fc465898e86e081
2024-09-20 03:48:42 -04:00
Maisam Arif 3b7f661e71 Moved KFD information to separate structure and API
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: If6eaea589edc704cf408d6391b5f2154134035e7
2024-09-20 03:48:42 -04:00
Maisam Arif 2cfae06560 [SWDEV-482058] Updated Packaging for offline installs
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I8908451c013fc944645b5b5df3104a2ff73e72bd
2024-09-20 00:55:48 -04:00
Justin Williams f2f02aa317 [SWDEV-469278] Lowered PyYAML post install script dependency
Signed-off-by: Justin Williams <Justin.Williams@amd.com>
Change-Id: I764c8bf01e6cb6acb0b3fc1db396707099e5ed12
2024-09-20 00:55:48 -04:00
Charis Poag 5c778cadf1 Fix amd-smi CLI calls returning TypeError
$ amd-smi version
TypeError: unsupported operand type(s) for |: 'type' and 'type'

---------------
Python3 --versions lower than 3.10
do not support str | None

Using typing Optional and Union, we can create equivalent logic for
str | none
and
str | list | none

Change-Id: I1f4a7ab67333914b33639dc62652881e1127411e
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
2024-09-18 16:59:12 -05:00
Harkirat Gill d263b53797 Fix for GitHub Issue #24: Update Event Stop Behavior
amd-smi event is failing to exit as it waits for all threads to complete before exiting. Each thread has to listen for a maximum of 10 seconds prior to exiting in the current implementation.

Lowered individual listen time for _event_thread allowing for a quicker exit while still capturing all events (Looped until escape sequence detected).

Added logging for escape character, not sure if needed but helps confirm that key press was registered.

Change-Id: I916608754798f966980a558342c7c62693252d7f
2024-09-18 14:54:40 -04:00
gabrpham b7f779182d [SWDEV-448738] Added rocmsmi extremum command as 'set -L'
Change-Id: I997c630bd20cc61673813a2301eb5e3002619a32
Signed-off-by: gabrpham <Gabriel.Pham@amd.com>

Change-Id: Ifa884303f9a0fa058af093a23f5be449bba54f29
2024-09-18 14:51:01 -04:00
gabrpham 0d4b332fe4 Removed _validate_positive function and replaced with _positive_int or _not_negative_int as appropriate
Signed-off-by: gabrpham <Gabriel.Pham@amd.com>
Change-Id: I01effcdf9bae31fd8bc926c5d4bdf58274838618
2024-09-17 18:37:16 -04:00
Eisuke Kawashima 5fdcaf1248 fix(python): fix comparison to True/False
from PEP8 (https://peps.python.org/pep-0008/#programming-recommendations):

> Comparisons to singletons like None should always be done with is or
> is not, never the equality operators.

Change-Id: I710d64c380eaf420f0ad29e65623ee677b094051
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2024-09-16 17:34:39 -04:00
Maisam Arif 105db1afcd Udpated License Dates
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I8ca199c129c06508bc3e23745ab5ac2d20dce928
2024-09-16 16:14:47 -04:00
Michael John d9ccc44146 Use correct regex to avoid SyntaxWarning: invalid escape sequence '\.'
Change-Id: I1c6179be294bf21c0897a3abf7e8ab1d270ae238
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2024-09-16 15:45:15 -04:00
Maisam Arif 787d4462fa [SWDEV-482412] Optimized PCIe Bandwidth gpu_metrics calls
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Ib37d232b94a080e9b490dd065628d2567aaf4642
2024-09-11 23:26:30 -05:00
Maisam Arif 397d8d9339 Bump Version to 24.6.4.0
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I75b6039c221ecea1e36a451d93bb52b5406bd106
2024-09-11 17:36:07 -04:00
Tim Huang 260edaa752 [SWDEV-463402] - Support retrieving connection type and P2P capabilities between two GPUs
1. Add a API interface amdsmi_topo_get_p2p_status to retrieve
connection type and P2P capabilities between 2 GPUs.

2. Add getting p2p status test in hw_topology_read
to print P2P capability information.

3. Add below tables for cli topology sub commands:
  - CACHE COHERANCY TABLE
  - ATOMICS TABLE
  - DMA TABLE
  - BI-DIRECTIONAL TABLE

Change-Id: I199173030d4170115cea27c472958a4826e4e1bf
Signed-off-by: Tim Huang <tim.huang@amd.com>
2024-09-06 09:42:34 -04:00
Maisam Arif bc4ca45862 [SWDEV-450553] Added Subsystem Device ID to amd-smi static --asic
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I428b4993cca027a6eb1bb9c617fe715118a59407
2024-09-04 12:51:02 -05:00
gabrpham 7d8e54d0e1 [SWDEV-450553] Added gpu memory overdrive to metric function
Signed-off-by: gabrpham <Gabriel.Pham@amd.com>
Change-Id: If7bd6865d641a5a83c594a4d3c57938b1b6dc18e
2024-09-04 12:54:14 -04:00
Maisam Arif 1efb5e9910 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
2024-09-04 10:23:36 -04:00
Maisam Arif d40e4d18a0 Added Example commands for amd-smi CLI
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I4a0211f7dd54de9b225e4546509134bb45c97956
2024-09-04 09:39:21 -04:00
gabrpham 95ca2b83a1 Changed power parameter in amdsmi_get_energy_count() to energy_accumulator
Issue linked here: https://github.com/ROCm/amdsmi/issues/38

Signed-off-by: gabrpham <Gabriel.Pham@amd.com>
Change-Id: I622236eb3f0144aefeb6c82d2713b4822bfeeb11
2024-09-04 09:38:08 -04:00
Oliveira, Daniel 893f13ab98 SWDEV-463399: amdsmi_get_gpu_vram_info() adds bit-width
Driver info `amdgpu_gpu_info.vram_bit_width` is exposed through amdsmi_get_gpu_vram_info().

Code changes related to the following:
  * API
  * CLI
  * Unit tests
  * Examples

Change-Id: I8abd8db7a603078b2b1c008b2685cecf35caf3d2
Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>
2024-08-27 18:22:50 -04:00
Maisam Arif 78373cb5f7 [SWDEV-479989] - Fixed if statement for filtering ecc blocks
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I4d0c7579257c98be8a4ba8e5a31b5d9db4305844
2024-08-20 03:16:49 -05:00
Maisam Arif b49c5596b5 [SWDEV-478576] Adjusted Disclaimer
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I0dbdcd1c8ff200336e7ee0e8ca88a5eba1b41057
2024-08-09 18:50:55 -04:00
Maisam Arif 037f8689fe Fixed Guest VM registering as Passthrough VM
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I0edc36e1a114166647dc10ebc646665b62c5d88e
2024-08-09 18:44:44 -04:00
Maisam Arif 210680b570 Removed metric --ecc & --ecc-blocks commands from VM
ecc is not supported on VM
	Added static --ras because ras features are still detectable

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Ied4132b863989dfd67897e00904f04d140fd2773
2024-08-09 18:44:44 -04:00
Maisam Arif cec3e4c2a0 [SWDEV-478576] Added Disclaimer for CLI Tool
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I3d432ac3f8c9663365921591d183a5d1f35c4707
2024-08-09 14:14:50 -04:00
Maisam Arif 40112f5b17 Bump Version to 24.6.3.0
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I902da5e5e9e7441002420afaaef01ca9c6c9666f
2024-08-08 01:30:51 -05:00
Ranjith Ramakrishnan 7591eec971 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
2024-08-08 02:15:04 -04:00
Maisam Arif 574712386f Fixed handling in GPU/CPU/CORE select functions
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I83d78a8d6cdcbd54e5c79330be577b3a06a00985
2024-08-05 18:27:30 -04:00
gabrpham 0143041262 Fixed cli issue with empty cpu/core parameter
Change-Id: Id0fee74357a56baaec59ca5359eb00a65cfd6185
Signed-off-by: gabrpham <Gabriel.Pham@amd.com>
2024-08-05 16:37:36 -05:00
gabrpham fe1dc23ade Fixed 'amd-smi process -G'
Issue linked here: https://github.com/ROCm/amdsmi/issues/23

Signed-off-by: gabrpham <Gabriel.Pham@amd.com>
Change-Id: I73c2dede8634b21a5dfe0245a202e883fa856de2
2024-08-02 16:42:08 -04:00
Galantsev, Dmitrii 3784f37a3a Cleanup convert_SI_unit and misc linter warnings
Change-Id: I000ba548b79a7023aabad653125842064fa2e7cb
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2024-08-02 10:29:06 -04:00
gabrpham de8145387d [SWDEV-439701] Additional GPU error handling
Change-Id: Ieb35e9712f2a78acef8961d865dba1d824969ef3
Signed-off-by: gabrpham <Gabriel.Pham@amd.com>
2024-07-30 16:19:10 -05:00
Charis Poag ac40e963d3 Fix TypeError: 'type' object is not subscriptable
Python 3.8 requires typing import to specify.
Python 3.10, no longer requires typing import.

Change-Id: I5d9844c91932bc3af53acc6dd56eb258f4d18d9b
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
2024-07-19 16:33:41 -05:00
Galantsev, Dmitrii baaa1cc4b6 [SWDEV-471523] - Replace lspci and lscpu with sysfs reads
Change-Id: Ia5a12c04d3064787a0f36a961e68533b79e17ed0
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2024-07-19 00:29:36 -05:00
Maisam Arif b5f9e6a91d Corrected passthrough platform logic
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Ibbc4f5dd6300efd16f26efe17bc68eb8c22ed8be
2024-07-18 17:54:02 -04:00
Maisam Arif 5b7be3bf99 [SWDEV-474474] - Changed Monitor PCIE_REPLAY count to use gpu_metrics
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I4351a23e8412875bb4b23b30747ac6d0bf3d3c56
2024-07-18 17:53:49 -04:00
Maisam Arif 0fc779b14f [SWDEV-439701] Add missing parameter CLI error cases
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I8a6623ccdd7b16be320ea0f6f48b7b6cb3511983
2024-07-18 14:24:00 -04:00
Maisam Arif c83bcb7ac9 [SWDEV-472641] Set file opening and writing encoding to utf-8
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Ic5cdca41b588341f7894de72dfe3d949378f9a61
2024-07-12 09:46:44 -04:00
Maisam Arif 548938389d Bump Version to 24.6.2.0
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Ic389b6783514e88c43958ff5d3413a4c4a8a884f
2024-07-10 19:15:17 -05:00
Maisam Arif 6e5c4b422a Added dmon alias for 'amd-smi monitor'
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I4a787034bd7ab1a0d08d8cfdd038add5c35cdea4
2024-07-02 11:05:59 -04:00