$ 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>
[ROCm/amdsmi commit: 5c778cadf1]
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
[ROCm/amdsmi commit: d263b53797]
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>
[ROCm/amdsmi commit: a3b0bc5390]
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>
[ROCm/amdsmi commit: a33e4c9e14]
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]
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]
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]
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]
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]
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]
- 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]
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]
v2: drop depend on libc
v3: whitespace
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Change-Id: I2eff7aa9d4f0ca8635796f82b106ac0d36176346
[ROCm/amdsmi commit: f4506cfd65]
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]
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]
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]