Graf commitů

172 Commity

Autor SHA1 Zpráva Datum
Maisam Arif 572bf563d1 Added driver_name to amdsmi_cli tool
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I8f3d52e0b23298443b2b16afec418cbbbc5f77e0
2023-10-04 08:54:19 -04:00
Maisam Arif fadf1b6cc9 SWDEV-410230 - Added slot_type to amd-smi static --bus
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I2006a3525a8aa9091bf54501461d364f7237f00f
2023-10-02 10:15:34 -04:00
Maisam Arif b58665e77b Adjust static --board output to be inline with Host
Change-Id: Ia6dcca5be077ef9e04533b632628a62633b63556
Signed-off-by: Maisam Arif <maisarif@amd.com>
2023-10-02 09:30:25 -04:00
Bill(Shuzhou) Liu 9eccf20f0c Get PCIe slot type
Add API to get the PCIe slot type.

Change-Id: If6894af53894c524d61c7586c59768541bbf0ac6
2023-09-27 23:31:09 -04:00
Maisam Arif 3fa96a9e02 Updated Driver Error Logging & Exceptions
Change-Id: Idd14904b33e82e4cb5d9f84c75978fe686a9b603
Signed-off-by: Maisam Arif <maisarif@amd.com>
2023-09-27 19:24:55 -04:00
Maisam Arif 95337c88fc Added sleep state to amd-smi metric --clock
Change-Id: Idb5fbc84a787ef1affdf0449b6dd77ab6e50e91d
Signed-off-by: Maisam Arif <maisarif@amd.com>
2023-09-26 15:21:25 -05:00
Galantsev, Dmitrii 21dcf6d66c SWDEV-423796 - Resolve stack smashing issue
Inconsistency between struct fields caused stack smashing

Change-Id: Ib06d67723e062d4306420854ba7ab45fb252ffe3
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-09-25 11:24:55 -05:00
Galantsev, Dmitrii 31cc2eecfb Merge remote-tracking branch 'rocmsmi/amd-staging' into HEAD
Change-Id: I0661926c10eef2bc32b83d9a63a3a6eb6991e781
2023-09-25 04:35:53 -05:00
Galantsev, Dmitrii ac8bde5978 CMAKE - Fix --break-system-packages
Change-Id: I4a46859124018b6574d2b53e6ef9e72482784f39
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-09-25 02:03:27 -05:00
Maisam Arif 25b055014d Updated tool & lib versions & README.md
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Ic41a36bcfa988ce9c8304157593012752857e919
2023-09-25 02:02:22 -05:00
Maisam Arif 9c314dfd5c Updated metric --xgmi_err to display string instead of object
Change-Id: I4f67384cdf65b5fa3cb04e1012ba79a53ae72cd7
Signed-off-by: Maisam Arif <maisarif@amd.com>
2023-09-25 02:02:22 -05:00
Maisam Arif 9281bfbbfa 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>
2023-09-25 01:49:35 -05:00
Maisam Arif 5c52f82328 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>
2023-09-24 21:17:43 -04:00
Maisam Arif ddc63694bc Moved clock locked under applicable clock
Change-Id: Ie47b20d0d367a198d6978a5dc571811938cfd02f
Signed-off-by: Maisam Arif <maisarif@amd.com>
2023-09-24 03:15:20 -05:00
Maisam Arif 6dcfd4a815 Added vram info to static --vram
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I48f6875d5131440848ef6f5875c6d385fee871e3
2023-09-23 23:52:50 -04:00
Maisam Arif 79ccf1670b Added vendor_name to static --asic
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I3d52a8769e1f721c20efdf78ffb9e6813de59e10
2023-09-23 23:51:24 -04:00
Galantsev, Dmitrii 2589d677b0 actvity -> activity
Change-Id: Ie31d9faca2181cb2d47f7f4764b64ed8cc7f8007
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-09-22 11:45:21 -05:00
Maisam Arif def17accbe Corrected voltage_read call in amdsmi_get_power_info
Change-Id: I4097b3ac5699360d4e91c8b8254431b6b6768c3e
Signed-off-by: Maisam Arif <maisarif@amd.com>
2023-09-21 23:41:38 -05:00
Maisam Arif e4fac177c1 SWDEV-417124 - Implement Power Management
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Ib0d37038e49cec61d5415076a46a5666d95dcea2
2023-09-21 14:23:26 -05:00
Galantsev, Dmitrii a6af1769b9 Update amdsmi_wrapper.py
Change-Id: Ia523ba6ac629c02b6d6ba3db6d57507f2003f817
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-09-20 15:05:09 -04:00
Maisam Arif 42b030def3 Spell check bandwith to bandwidth
Change-Id: Icfb3b2398fe0590dbab6e531c8ec1cdceebe658d
Signed-off-by: Maisam Arif <maisarif@amd.com>
2023-09-14 18:43:49 -04:00
Maisam Arif d2ef113457 SWDEV-412847 - Changed junction to hotspot
Change-Id: I7f6c1a0a77e6a09d2a3e831463cf03e35266bf40
Signed-off-by: Maisam Arif <maisarif@amd.com>
2023-09-14 17:43:26 -05:00
Bill(Shuzhou) Liu b52034fed8 Add API for the memory type
Get the memory type from libdrm and add a new API.

Change-Id: I89327bca2ef860f2e3f4f6ca20def2331eba66c0
2023-09-07 13:05:58 -05:00
Dmitrii Galantsev f96c7663b5 Merge "Update amdsmi_wrapper.py and name fields" into amd-dev 2023-08-30 17:30:38 -04:00
Galantsev, Dmitrii 03cfdeefd5 Update amdsmi_wrapper.py and name fields
When updating the wrapper I ran into an issue with anonymous structs.
Generated wrapper would contain a string split into multiple lines,
which is invalid python.

e.g.
    'struct_struct anonymous
    (struct.... amdsmi.h:355)'

After naming the structs - the issue is gone. BDF union now has to be
addressed with .fields

e.g.
    OLD: bdf.function_number
    NEW: bdf.fields.function_number

Change-Id: Ib3c640c088ad0cc67893d636827356902051f17f
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-08-30 16:30:03 -05:00
Shuzhou Liu fc5b481124 Merge "Support PCIe vendor name" into amd-dev 2023-08-30 09:58:21 -04:00
Galantsev, Dmitrii 1d24dd93a6 Fix uint32* -> int32* conversion error
Change-Id: I23c2a842468896e8d120ac4b8b55ef433dff6d85
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-08-28 18:32:31 -05:00
Bill(Shuzhou) Liu 9021ef96dc Support PCIe vendor name
Add the support for PCIe vendor name.

Change-Id: Ibc1d289a08731e4c5a14f992f3b0d31b51482396
2023-08-28 16:46:43 -05:00
Maisam Arif b14da692eb Added workaround for inconsistent current pcie speed from gpumetrics
Change-Id: If8404d21341cd15eb4d0221ab92cb0b351bbdf3e
Signed-off-by: Maisam Arif <maisarif@amd.com>
2023-08-09 11:35:35 -05:00
Maisam Arif 82ac307f9b Added Gen type to pcie info
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Icaa050a6f53fad608ed0353b2a0cbea33dee1dd2
Signed-off-by: Maisam Arif <maisarif@amd.com>
2023-08-02 23:42:48 -05:00
Maisam Arif ca59a60a9a Updated Versioning
corrected to amd-smi version from rocm-smi version
	Added newline characters in the gpu choices
	Updated cli versioning to 23.2.1.0 to match amd-smi

Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Ia6db3a281e2349e05a09209bdcfdfa5ac48e3a86
2023-08-01 14:28:27 -04:00
Bill(Shuzhou) Liu 55bf9cbe13 Change API to get the driver date
Support the driver date from libdrm.

Change-Id: I88e694732b538220e11fdb4029712bb5a6f44380
2023-07-21 08:28:06 -05:00
Marko Oblak 78faf411f8 SWDEV-391188 - [AMDSMI][LinuxGuest] Added description in amdsmi header file for amdsmi_get_gpu_process_list, changed mentioned API in py_interface
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com>
Change-Id: I8cb7f2c6595da6ab0263e6fa4365bde91d900979
2023-07-03 06:35:12 -04:00
Maisam Arif b6d7570bd4 Changed RPM dependencies to suggestions
Change-Id: I3d2918cc1f86733aaee41f86e1619bd22316398b
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
2023-06-22 11:44:28 -05:00
Marko Oblak 01474ff14e SWDEV-392359 - [AMDSMI] [Linux] [Guest] Documented unsupported APIs
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com>
Change-Id: I0cff925082e6bc637e4b5073df64445380b3a3f5
2023-06-21 13:18:32 +02:00
Maisam Arif 0a1e486214 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>
2023-06-15 00:51:45 -05:00
Maisam Arif 9cebc93cee Cleaned up APIs
Change-Id: I93487e01d7126bdfa77439b571df927a6af3bb70
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
2023-06-07 10:48:37 -04:00
Sam Wu 7104b6fe31 Sphinx Documentation Setup
Added README links to Python library and CLI tool
Get correct version number from header file
Updated base README with sphinx documentation steps

Change-Id: I60eb3d37d77dab4ff7c8334f94b9c1804edb524b
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
2023-06-07 09:47:37 -05:00
Dalibor Stanisavljevic 8dbc1d7d57 Align header changes with other platforms
Change-Id: I366e57310e0504855692626e2b2014bea235ed6b
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2023-06-02 12:28:09 +02:00
Dalibor Stanisavljevic 1185397d90 Updated python api to match header changes
Change-Id: I02f6dde54f50d1d66f8c4a8777f849bf63b50c85
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2023-06-01 09:40:24 -04:00
Maisam Arif 60b2b7fb83 Corrected amdsmi_interface api call & versioning
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I3a80716cb544ab0512073b34702b7fa132767668
2023-05-25 09:53:57 -05:00
Maisam Arif 72638192f7 Updated AMD-SMI README.md with CLI install instructions
Updated amd-smi-lib README with CLI install instructions
	Updated version of the python interface and the CLI tool
		to 0.1.0 due to the ESMI header changes

Change-Id: If175cdcb9ce0352b6e7e7ce4cc0940a80c11501b
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
2023-05-24 10:07:19 -05:00
Maisam Arif da50f4f078 AMD-SMI-CLI - Packaging updates
Added fallback in amdsmi_init.py to access /opt/rocm/share/amd_smi
        if python package is not installed
    Made libamd_smi.so detection more reliable
    Added PyYaml dependency to pyproject.toml
    Added python3-clang dependency in CMakeLists
    Updated python3 version dependency in CMakeLists
    Update Readme
    Added Release Notes

Change-Id: Ie3b85fde7563dd84dce499f229aac1f94bcc2989
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
2023-05-23 10:32:08 -05:00
Maisam Arif fe64f426d8 SWDEV-397381 - Corrected ECC per block reporting
Change-Id: If666e2f1a4b13dd08b6a19f08f3c01297515712c
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
2023-05-23 10:31:06 -05:00
Maisam Arif 01bd64c718 AMD-SMI-CLI - Updated amdsmi_interface calls to new headers
Change-Id: I031f08c912f2cc77bba3a6f4356b5121072fb71e
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
2023-05-22 08:35:22 -05:00
Dalibor Stanisavljevic 1bc1d431d8 SWDEV-384793 - Clean up API
Change-Id: I441b315d32df59a454e06d521e5ca8b2c229451a
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2023-05-19 16:40:26 +02:00
Dalibor Stanisavljevic ca7f965018 SWDEV-384797 - Renamed measure to info
Change-Id: I2397ed189fe0171ed29bd6440f8fa0bb210b95a5
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2023-05-17 05:10:58 -04:00
Suma Hegde 3fa4402833 updated amdsmi_wrapper.py
following command is run to generate this file
cmake -B build && make -C build && make -C build python_wrapper

Change-Id: I9ee03c4030537c9e8d260e776c04da52d93a9570
2023-05-11 11:01:45 -04:00
Suma Hegde edd8f1ae23 Renamed APIs
amdsmi_dev_open_supported_func_iterator -> amdsmi_open_supported_func_iterator
amdsmi_dev_open_supported_variant_iterator -> amdsmi_open_supported_variant_iterator
amdsmi_dev_close_supported_func_iterator -> amdsmi_close_supported_func_iterator

Change-Id: Ie9b2efa5aee7095c3c835b91de1951df6b065510
2023-05-11 11:01:37 -04:00
Suma Hegde 6256bf6f1a Renamed API amdsmi_dev_reset_xgmi_error
amdsmi_dev_reset_xgmi_error -> amdsmi_reset_gpu_xgmi_error

grep -rli 'amdsmi_dev_reset_xgmi_error' * | xargs -i@ sed -i
's/amdsmi_dev_reset_xgmi_error/amdsmi_reset_gpu_xgmi_error/g' @

Change-Id: Ic7e4c4b345fdf6187aed42d53fb7ae8536c2edea
2023-05-11 11:01:25 -04:00