提交图

1244 次代码提交

作者 SHA1 备注 提交日期
Tim Huang 202ddc01aa [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>


[ROCm/amdsmi commit: 260edaa752]
2024-09-06 09:42:34 -04:00
Maisam Arif 104bf22265 Clean up unused files & Update License info
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I5b58e8fe3d9eeac207b07ce0fe4134dd717dbd90


[ROCm/amdsmi commit: 97c487372f]
2024-09-05 09:52:48 -04:00
Galantsev, Dmitrii 43a2e42521 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>


[ROCm/amdsmi commit: fa4e488111]
2024-09-04 15:33:28 -05:00
Maisam Arif c343efc353 [SWDEV-450553] Added Subsystem Device ID to amd-smi static --asic
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I428b4993cca027a6eb1bb9c617fe715118a59407


[ROCm/amdsmi commit: bc4ca45862]
2024-09-04 12:51:02 -05:00
gabrpham 614c89889c [SWDEV-450553] Added gpu memory overdrive to metric function
Signed-off-by: gabrpham <Gabriel.Pham@amd.com>
Change-Id: If7bd6865d641a5a83c594a4d3c57938b1b6dc18e


[ROCm/amdsmi commit: 7d8e54d0e1]
2024-09-04 12:54:14 -04:00
Maisam Arif 53964b5b4a Fix C Library call in amdsmi_get_gpu_reg_table_info
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Ib732ade8c0e48fdc7d09d920bca8b4fe4e773cac


[ROCm/amdsmi commit: e5569ee925]
2024-09-04 11:42:45 -05:00
Maisam Arif 37f3f625a0 Update market name device ids
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I10ce84c8466ff30e2486ed3664a9fe1b57d9c9e4


[ROCm/amdsmi commit: ae2c713d67]
2024-09-04 10:33:43 -05: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
Xiaodong Wang b276ae6c2b Fix ASAN issue in DiscoverAmdgpuDevices
I ran a test that exercised this code in dev mode and ASAN found a memory access issue due to the iterator returned by lower_bound being dereferenced unconditionally.  I believe the right fix is to check if the iterator is within the map and if not go to the else branch

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


[ROCm/amdsmi commit: 2066872297]
2024-09-04 10:14:10 -04:00
Maisam Arif 8fe8943a0e Added Example commands for amd-smi CLI
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I4a0211f7dd54de9b225e4546509134bb45c97956


[ROCm/amdsmi commit: d40e4d18a0]
2024-09-04 09:39:21 -04:00
gabrpham 62d3348c9e 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


[ROCm/amdsmi commit: 95ca2b83a1]
2024-09-04 09:38:08 -04:00
muthusamy 0560419474 [SWDEV-481002] Fix in Update Market Names
Signed-off-by: muthusamy <muthusamy.ramalingam@amd.com>
Change-Id: I16ea6bdd70f7ed847ef56ddf99dfe66d42c7942a


[ROCm/amdsmi commit: 3c954e78fc]
2024-09-03 11:42:24 +00:00
Maisam Arif 801778d976 [SWDEV-481002] Update Market Names
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I23d129712fd7d7a0d9de73511c71a2eeeb3ec183


[ROCm/amdsmi commit: b5424c1c7e]
2024-08-30 13:31:25 -04:00
Charis Poag 31a2921b62 [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>


[ROCm/amdsmi commit: d9d6637cb7]
2024-08-29 10:09:29 -04:00
Oliveira, Daniel 55b88706e1 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>


[ROCm/amdsmi commit: b05849dad0]
2024-08-28 10:15:07 -04:00
Oliveira, Daniel e2e63055a6 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>


[ROCm/amdsmi commit: 893f13ab98]
2024-08-27 18:22:50 -04:00
Oliveira, Daniel ec14fe6ac7 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>


[ROCm/amdsmi commit: af3670d758]
2024-08-27 16:58:34 -05:00
Maisam Arif 2e92791192 Removed extra print statement
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I0043567f4cc17d69860b0c77f42fa77fd41e354d


[ROCm/amdsmi commit: 7ac0a49470]
2024-08-23 19:22:05 -05:00
Charis Poag bc357f1500 [SWDEV-478807] Add leading 0s to amdsmi_get_fw_info()
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
Change-Id: Ie535dcb8cb44138c115e29a4bc41db3cc488097f


[ROCm/amdsmi commit: c46eab4e9e]
2024-08-23 19:37:32 -04:00
Charis Poag ee66b03dc8 [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>


[ROCm/amdsmi commit: d7c583d422]
2024-08-23 18:03:13 -05:00
Charis Poag 4b308c8d48 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>


[ROCm/amdsmi commit: a2dc934b05]
2024-08-22 21:57:36 -05:00
Tom St Denis c59f7b7705 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


[ROCm/amdsmi commit: f4506cfd65]
2024-08-21 08:38:14 -04:00
Bill(Shuzhou) Liu ef78459f75 Set soft min or max clock
Add the API to support set soft min or max clock.

Change-Id: Ia34381a721ef3c3d894d5a89d25afa757be46a79


[ROCm/amdsmi commit: 97e70d44cf]
2024-08-20 13:22:32 -04:00
Maisam Arif 77e3035cf5 [SWDEV-479989] - Fixed if statement for filtering ecc blocks
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I4d0c7579257c98be8a4ba8e5a31b5d9db4305844


[ROCm/amdsmi commit: 78373cb5f7]
2024-08-20 03:16:49 -05:00
Maisam Arif 5013af7398 Revert "Do not automatically download kernel header amd_hsmp.h"
This reverts commit 18bb65a5cd.

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


[ROCm/amdsmi commit: c934291940]
2024-08-19 17:20:20 -05:00
Tom Rix 18bb65a5cd Do not automatically download kernel header amd_hsmp.h
First look locally following these heuristics
Either as a user specified option -DBUILD_KERNEL_ASM_DIR=<PATH>
or from the running kernel's src
and then from hints at where it could be.

When these fail, download from the upstream kernel

Change-Id: If8d62a4f84a929f550e4a83cda93e4d671e92d02
Signed-off-by: Tom Rix <Tom.Rix@amd.com>


[ROCm/amdsmi commit: f3cb51c08e]
2024-08-13 15:42:20 -05:00
Maisam Arif 83dfd814c3 [SWDEV-478576] Adjusted Disclaimer
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I0dbdcd1c8ff200336e7ee0e8ca88a5eba1b41057


[ROCm/amdsmi commit: b49c5596b5]
2024-08-09 18:50:55 -04:00
Maisam Arif 0a28df87c8 Fixed Guest VM registering as Passthrough VM
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I0edc36e1a114166647dc10ebc646665b62c5d88e


[ROCm/amdsmi commit: 037f8689fe]
2024-08-09 18:44:44 -04:00
Maisam Arif 1eaf218f2f 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


[ROCm/amdsmi commit: 210680b570]
2024-08-09 18:44:44 -04:00
Maisam Arif b0c05aa04d [SWDEV-478576] Added Disclaimer for CLI Tool
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I3d432ac3f8c9663365921591d183a5d1f35c4707


[ROCm/amdsmi commit: cec3e4c2a0]
2024-08-09 14:14:50 -04:00
Maisam Arif a3a8a0cfa8 Bump Version to 24.6.3.0
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I902da5e5e9e7441002420afaaef01ca9c6c9666f


[ROCm/amdsmi commit: 40112f5b17]
2024-08-08 01:30:51 -05: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
Ranjith Ramakrishnan 0cd04cdefb SWDEV-476075 - Prevent the modification of interpreter directives
CPACK is converting /usr/bin/env python3 to /usr/libexec/platform-python in RHEL8.
Undefining __brp_mangle_shebangs will prevent the same

Change-Id: I5120274b90aeaf783b62414ac2aeba9e84029205


[ROCm/amdsmi commit: 92a4093256]
2024-08-08 02:04:37 -04:00
Maisam Arif 7130dc9f04 Fixed handling in GPU/CPU/CORE select functions
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I83d78a8d6cdcbd54e5c79330be577b3a06a00985


[ROCm/amdsmi commit: 574712386f]
2024-08-05 18:27:30 -04:00
gabrpham 6975697b56 Fixed cli issue with empty cpu/core parameter
Change-Id: Id0fee74357a56baaec59ca5359eb00a65cfd6185
Signed-off-by: gabrpham <Gabriel.Pham@amd.com>


[ROCm/amdsmi commit: 0143041262]
2024-08-05 16:37:36 -05:00
gabrpham 0df83ddf94 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


[ROCm/amdsmi commit: fe1dc23ade]
2024-08-02 16:42:08 -04:00
Galantsev, Dmitrii c44abfcd08 Cleanup convert_SI_unit and misc linter warnings
Change-Id: I000ba548b79a7023aabad653125842064fa2e7cb
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 3784f37a3a]
2024-08-02 10:29:06 -04:00
gabrpham 5b44997728 [SWDEV-439701] Additional GPU error handling
Change-Id: Ieb35e9712f2a78acef8961d865dba1d824969ef3
Signed-off-by: gabrpham <Gabriel.Pham@amd.com>


[ROCm/amdsmi commit: de8145387d]
2024-07-30 16:19:10 -05:00
Galantsev, Dmitrii 4799537b20 Docs - Switch to amd-staging branch
Change-Id: I1a26542b3a7831c1f5efea6d6b4084f77b0a7cdb
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: f3426ced06]
2024-07-23 17:10:34 -05:00
Galantsev, Dmitrii 7ec65d7e57 Azure - Switch to amd-staging branch
Change-Id: I5cc2316427631fc17990506c4234163302febd3d
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: ceac87ef5a]
2024-07-23 17:04:37 -05:00
Galantsev, Dmitrii 815e607285 Fix missing c_str() introduced in c63ea0e
Change-Id: Ife778276aaebd109a413efb3db703de36b730613
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 47c8cd10cf]
2024-07-19 19:12:17 -04:00
Charis Poag e536831413 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>


[ROCm/amdsmi commit: ac40e963d3]
2024-07-19 16:33:41 -05:00
Maisam Arif c63ea0e5e0 [SWDEV-474450] Removed DEVICE_MUTEX from gpu_reset
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I706fb47288738bfbde94b56fee66bbf807b3c0cb


[ROCm/amdsmi commit: 8bc8307c60]
2024-07-19 11:47:52 -04:00
Maisam Arif 49e4e8f234 Updated Changelog with Mutex Fix
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I0aee284ce7600efc66b0ad5392c11bb6a502a929


[ROCm/amdsmi commit: 3a9c93bfa6]
2024-07-19 11:18:09 -04:00
Galantsev, Dmitrii 12143a4ec8 [SWDEV-471523] - Replace lspci and lscpu with sysfs reads
Change-Id: Ia5a12c04d3064787a0f36a961e68533b79e17ed0
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: baaa1cc4b6]
2024-07-19 00:29:36 -05:00
Galantsev, Dmitrii 8f04a0f91e Merge branch 'dgalants/fix_mutex' into amd-dev
This change imports changes done to shared_mutex in rocm_smi_lib repo

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


[ROCm/amdsmi commit: 0f6224cbe6]
2024-07-18 21:14:34 -05:00
Bill(Shuzhou) Liu 39f37c5d33 Remove thread safe only mutex warning message
In multiple GPUs environment, too many warning messages generated,
and then need to be removed.

Change-Id: I275de2397eb0e6b189e2e17e94335cb1e8f97815


[ROCm/amdsmi commit: 78ee3f5e5a]
2024-07-18 20:43:57 -05:00
Bill(Shuzhou) Liu a1aec9c971 Support thread only mutex
The environment variable RSMI_MUTEX_THREAD_ONLY=1 to enable thread only mutex.
The RSMI_INIT_FLAG_THRAD_ONLY_MUTEX can also be pass to rsmi_init()
to enable thread only mutex.

Change-Id: I2d9844039b774e386f03bb9bb130d8c342504ea6


[ROCm/amdsmi commit: dbba33d3f5]
2024-07-18 20:43:38 -05:00
Bill(Shuzhou) Liu eb04dbc1c9 Unlock the mutex when process is dead
After the dead process is detected, pthread_mutex_consistent() will
be called. After that, the pthread_mutex_unlock() should also be
called to unlock it: "It is the responsibility of the application to
recover the state so it can be reused."

Change-Id: I45d3e2e68c3b06779f3acb1e908dbec0c6a39297


[ROCm/amdsmi commit: 06b9232a56]
2024-07-18 20:43:21 -05:00
Bill(Shuzhou) Liu 3fc94657d9 Remove const to avoid compile error
Fix the compile error

Change-Id: I422b606b2b969b418c2e77b47a3afad0cfc732a1


[ROCm/amdsmi commit: 33dab0c232]
2024-07-18 18:15:43 -04:00