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

335 Коммитов

Автор SHA1 Сообщение Дата
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
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
Lang Yu 7a557b1c50 SWDEV-463405: Add amdsmi_get_link_topology_nearest support
amdsmi_get_link_topology_nearest() is used to retrieve
the set of GPUs that are nearest to a given device
at a specific interconnectivity level.

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

Header Unification Change: "/amdsmi/+/1122408"

Change-Id: Id0317797c652c267742513936d321677793ec634
Signed-off-by: Lang Yu <lang.yu@amd.com>
2024-09-26 16:43:27 -05: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
gabrpham 8bc4abc88b Corrected partition changes in header and wrapper
Signed-off-by: gabrpham <Gabriel.Pham@amd.com>
Change-Id: Iafd7de8f08924873da841ee6eca62100a17b2b6c
2024-09-20 17:01:55 -05: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
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
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
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
Maisam Arif 639daa3d90 Fixed amdsmi_get_utilization_count() wrapper generation
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Ifd59fca042c4b3b0fc53e100b6892c6b4f7b3e95
2024-09-17 16:34:42 -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
Broderick Gardner a3b0bc5390 Fix amdsmi_get_clk_freq list size
Python list slice is exclusive for the end index, so this -1 is cutting off an element.

Change-Id: I309a0a41447405b1aac465472871e169f2c405e8
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2024-09-16 15:45:44 -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
Charis Poag a33e4c9e14 [SWDEV-483526] Fix MI3x partitions not showing all logical nodes
Changes:
- Updates to amdsmi_asic_info_t structure to include:
  target_graphics_version, kfd_id, node_id, partition_id
- Updates to amd-smi static --asic to display new
  samdsmi_asic_info_t fields
- Updates to gpu enumeration during amdsmi_init()
  to discover all logical GPUs when in a non-SPX mode
  (ex. DPX, TPX, QPX, or CPX)
 - Updates to amdsmi_get_gpu_bdf_id(..) to include
   partition_id details when in BDF or optional bits.
     - bits [63:32] = domain
     - bits [31:28] or bits [2:0] = partition id
     - bits [27:16] = reserved
     - bits [15:8]  = Bus
     - bits [7:3] = Device
     - bits [2:0] = Function (partition id maybe in bits [2:0]) <-- Fallback for non SPX modes

- C++/Python tests updated to reflect these outputs

Change-Id: I4be0ea35bb98f3109ae2ca9e82f6b21baa38de29
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
2024-09-11 16:35:17 -05: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 97c487372f Clean up unused files & Update License info
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I5b58e8fe3d9eeac207b07ce0fe4134dd717dbd90
2024-09-05 09:52:48 -04:00
Galantsev, Dmitrii fa4e488111 Remove python-clang dependency
python3-clang was only used to generate the python wrapper
We now use it only within the docker image for the generator

Change-Id: Id574f109b959d72f0734b0df4c26b3bbab3238fd
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2024-09-04 15:33:28 -05: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 e5569ee925 Fix C Library call in amdsmi_get_gpu_reg_table_info
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Ib732ade8c0e48fdc7d09d920bca8b4fe4e773cac
2024-09-04 11:42:45 -05: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
Charis Poag d9d6637cb7 [SWDEV-451960] [WIP] Add Pytest
Updates:
- Added pytest to shared/pytest folder
- User can execute tests:

[pytest]
python3 -m pytest -p no:cacheprovider /opt/rocm/share/amd_smi/tests/pytest/unit_tests.py -s -v
python3 -m pytest -p no:cacheprovider /opt/rocm/share/amd_smi/tests/pytest/integration_test.py -s -v

[unittest]
/opt/rocm/share/amd_smi/tests/pytest/unit_tests.py -v
/opt/rocm/share/amd_smi/tests/pytest/integration_test.py -v

- Automatically installs pytest

Change-Id: Ia3281a9608aeeb803b91f8b83f87ff84b01037f4
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
2024-08-29 10:09:29 -04:00
Oliveira, Daniel b05849dad0 SWDEV-463401: amdsmi_get_gpu_asic_info() adds num_of_compute_units
number of compute units `amdgpu_gpu_info.num_of_compute_units` is exposed through amdsmi_get_gpu_asic_info().

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

Change-Id: Ibeb612d079ed87437a0e56124b8504098fc2dcfd
Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>
2024-08-28 10:15:07 -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
Oliveira, Daniel af3670d758 SWDEV-463372: amdsmi_get_utilization_count() adds decoder_activity
GPU Metrics info `gpu_metrics.vcn_activity` is exposed through amdsmi_get_utilization_count().

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

Change-Id: I831b2a81bdc0e090a6698dcb689d10f91ed87dd9
Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>
2024-08-27 16:58:34 -05:00
Maisam Arif 7ac0a49470 Removed extra print statement
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I0043567f4cc17d69860b0c77f42fa77fd41e354d
2024-08-23 19:22:05 -05:00
Charis Poag d7c583d422 [SWDEV-478807] Fix incorrect firmware versions and names
- Fix updates API to have correct enum names (PM->SMU)
 - Python API/CLI now reports correct versions and names for
    SMC/TA_XGMI/TA_RAS

Change-Id: Icbe115b3070b9f252ef15b09b781b9b3f5861e50
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
2024-08-23 18:03:13 -05:00
Charis Poag a2dc934b05 Fix amdsmi_reg_type_t not defined
Latest updates need to use a wrapper defined value. Breaks basic CLI
functionality.

$ /opt/rocm/bin/amd-smi list
Traceback (most recent call last):
  File "/opt/rocm/bin/amd-smi", line 44, in <module>
    from amdsmi_commands import AMDSMICommands
  File "/opt/rocm/libexec/amdsmi_cli/amdsmi_commands.py", line 30, in <module>
    from amdsmi_helpers import AMDSMIHelpers
  File "/opt/rocm/libexec/amdsmi_cli/amdsmi_helpers.py", line 35, in <module>
    from amdsmi_init import *
  File "/opt/rocm/libexec/amdsmi_cli/amdsmi_init.py", line 35, in <module>
    from amdsmi import amdsmi_interface
  File "/usr/local/lib/python3.8/dist-packages/amdsmi/__init__.py", line 26, in <module>
    from .amdsmi_interface import amdsmi_init
  File "/usr/local/lib/python3.8/dist-packages/amdsmi/amdsmi_interface.py", line 1725, in <module>
    reg_type: amdsmi_reg_type_t,
NameError: name 'amdsmi_reg_type_t' is not defined

Change-Id: I628c811c137f57f3177a718c9bce859bc553bf7d
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
2024-08-22 21:57:36 -05:00
Tom St Denis f4506cfd65 Add amdsmi_get_gpu_pm_metrics_info and amdsmi_get_gpu_reg_table_info to py-interface (v3)
v2: drop depend on libc
v3: whitespace

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Change-Id: I2eff7aa9d4f0ca8635796f82b106ac0d36176346
2024-08-21 08:38:14 -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
Maisam Arif 8f15c22606 Fix amd-smi event from reading NONE event type
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I7acf91eb682b3f0873ca34a98191eafd3925a344
2024-07-18 17:54:08 -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 413c9ef6fe SWDEV-466302 - Changed blank processes to N/A & Updated Docs
Change-Id: I2d68430dda8036879f58b0f1dea5d2825b441179
2024-06-24 00:38:17 -04:00
muthusamy 057d688b55 amd-smi [CPU]: Added Support to get number of threads per core
Change-Id: I7e6500f3f53068a3483b64a54d78ac9e1d9cd183
2024-06-21 17:22:55 -04:00
Maisam Arif 92f014059e SWDEV-435197 - Add process table to CLI monitor subcommand
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Ibe06f4a4be619ae9cba909c2474b0e482eeb87d5
2024-06-19 23:36:55 -05:00
Maisam Arif a3497702cb Bump Version to 24.6.1.0 and Update Changelog
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I88b8ad1341d7f1a2e14517db82979bb6b28575e8
2024-06-18 23:54:26 -05:00
Bill(Shuzhou) Liu e3c63628e5 Change the clean shader API to clean local data
To be align with the unified API.

Change-Id: I2819339fba6f528204cebd3e9605109e82cbc5b4
2024-06-17 16:23:33 -05:00
Dalibor Stanisavljevic 80043adb81 Changed type to uint32_t oam_id due to header unification
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
Change-Id: I351415f4a766ad6aa0c2e81adf8b416d066048ea
2024-06-13 05:12:55 -04:00
Maisam Arif f9bfb746fb Update Python API README example code
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I5dbb2e3cdab31b41e6f502d3257fe899eed1ee97
2024-06-07 16:20:00 -04:00
Maisam Arif 37c044696d Removed Throttle Status from CLI Tool
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I8eb8f30f821589003201d6d8bb96592ec5f8a483
2024-06-07 15:19:48 -05:00
Bill(Shuzhou) Liu 4cf59c4edb Change the name of clear sram to run cleaner shader
The function is to clean the local data in LDS/GPRs. The clear sram
is misleading.

Change-Id: I0385e6d6348602fe0f347d17e48ed8983f7ceb87
2024-06-05 12:07:39 -05:00
Maisam Arif e5d1ba4621 Use different sysfs for soc_pstate and xmgi_plpd
The sysfs is changed to use the pm_policy folder with multiple
dpm_policy files.

Change-Id: I40fac8de2d0cb127950d238b8196f6d2416778d0
2024-05-31 01:38:41 -04:00
Maisam Arif b39b39ef3c Temporary generator.py patch for amdsmi_bdf_t
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I93157127524b87e2e1445dcdc8588e62530bf68c
2024-05-30 15:35:38 -04:00
Dalibor Stanisavljevic 458dc8f180 SWDEV-457337 - Header aligment
Missing AMDSMI_STATUS prefix

Change-Id: I15d050a146c92f6897d48317d8fec51d046535d1
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2024-05-30 15:35:38 -04:00
Maisam Arif 3aa62b082a Fixed None event being read in AmdSmiEventReader
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I2141421a133c867a5c91d7d18b73141513f1868b
2024-05-30 03:28:00 -04:00
Maisam Arif 3cf50dff0b Header unificaiton fixes
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I84bb9a8121927980e4306a9db47ae04d7d03d85f
2024-05-23 14:32:57 -05:00
Dalibor Stanisavljevic 7b2463abe0 SWDEV-457337 - Fix header alignment
Change-Id: I9f25f6c4f0d00c76b66d13162f30be11368f5b59
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2024-05-23 04:41:57 -04:00
Maisam Arif 7d999aa34c SWDEV-458102 - Updates to pp_od_clk_voltage parsing
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I650dae1a99856dcde914fe66917cf9111f3ce0e2
2024-05-15 03:18:24 -05:00
Maisam Arif 8f8d88416f Added #defines from amdsmi.h to python interface
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Ic1a17d20f9f1f76e55813db8e2fe287279cb231e
2024-05-15 00:54:25 -05:00