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

448 Коммитов

Автор SHA1 Сообщение Дата
Dalibor Stanisavljevic a80bbd308c SWDEV-371565 - Fixed retrieval FW versions in python and example
Change-Id: I4e512584a50342dcd4f9c93f523112fb4b5099dd
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-12-14 13:06:41 +01:00
Bill(Shuzhou) Liu 552a7403bc SWDEV-373189: build error with g++ v12.1.0
Fix the g++ error: ‘memset’ was not declared in this scope

Change-Id: I6231f863801f84a5a8c46543c87499058f2ef381
2022-12-13 08:33:12 -06:00
Galantsev, Dmitrii a255393b5c SWDEV-372949 - Resolve ASAN failure
Change-Id: I622ba5e8fc4d30d98dae365a67a0b0e99ffae3a5
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2022-12-12 15:49:55 -06:00
Galantsev, Dmitrii 0c52236abd CMAKE: Resolve lib dependencies for tests
amdsmitst was failing and not finding libgtest and libamd_smi.

This change resolves the issue by

1. Installing gtest into tests directory
2. Modifying RUNPATH variable to point to libamd_smi.so

Change-Id: I126d01c88116d37c5f2b55b9ecb2c9f1313f26fe
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2022-12-12 14:37:57 -06:00
David Ceranic ab928f3be5 LWPVATS-4489 - [AMDSMI][LinuxBM] Implement smi-tool for calling rocm APIs using amdsmi wrapper
Signed-off-by: David Ceranic <David.Ceranic@amd.com>
Change-Id: I15900a6686e672291b2c0f9d54fd0b5b7e35e589
2022-12-09 16:16:41 +01:00
Dalibor Stanisavljevic 238f885e14 SWDEV-371561 - Fixed vbios version string value
Change-Id: Ide06784200084741e6cde606492bf03a760b9601
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-12-09 15:19:12 +01:00
Dalibor Stanisavljevic a2a38a5aa2 SWDEV-371210 - Fixed pcie link speed
Change-Id: I736d8095c05ee0685db0c209ea0fdb5832e14744
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-12-08 12:03:50 -05:00
Dalibor Stanisavljevic b93baf686d SWDEV-371191 - Fixed amdsmi_get_bad_page_info
Change-Id: I97134f548164eff588d9caa9b9f31c4361c78804
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-12-08 12:03:34 -05:00
Dalibor Stanisavljevic b4b761d02f SWDEV-370223 - Change the name of the header to amdsmi.h
Change dev to device_handle throughout the file
Change the pcie_info pcie_speed field type to uint32_t
Add AMDSMI prefix before amdsmi_mm_ip enum

Change-Id: I242145389ddc3f2ad05dfd6ca371640f4d118fc4
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-12-08 13:34:34 +01:00
Jason Albert b4cde9adec Doxygen related cleanup
- Made all doxygen formatting consistent with @ use
- Added @file definition to fix a lot of missed references
- Simplified return definitions for easier maintainability
- Fixed bad formatting and missing section closures

Signed-off-by: Jason Albert <jason.albert@amd.com>
Change-Id: I02cc55f7d0ae277f318a4620978af096f56cac6c
2022-12-07 10:41:33 -05:00
Jason Albert 3b1584915b Set status codes to fixed values
Assign fixed values to status codes to prevent enum auto assign
from changing them.

Signed-off-by: Jason Albert <jason.albert@amd.com>
Change-Id: I0ca1de7ba503ce8a75c56026f5a54e212204595b
2022-12-07 10:39:26 -05:00
Bill(Shuzhou) Liu 8d347bb6c4 Return errors when set clock range
Instead of using assert to abort the application, the fix will
return the error code if the input parameters is incorrect.

Change-Id: I00861ddf1198386fb322ea06232a7178fb5ef4bd
2022-12-06 12:39:43 -06:00
Dalibor Stanisavljevic fae4e1fc37 SWDEV-371210 - Fixed python_package command
Change-Id: Idf9e0cc23278caa0333ed26ad32450931d0d603b
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-12-06 08:07:18 -05:00
Bill(Shuzhou) Liu 0a3ca5c555 SWDEV-370010 - SMILIB returns 'Aborted (core dumped)'
When the sysfs file does not exist, it will return NOT_SUPPORTED
instead of assert faiure.

Change-Id: I3a1c9d7cf627901e141e2617496dfafd2e6b3f25
2022-12-02 07:58:17 -06:00
Galantsev, Dmitrii aeb0bf5832 CMAKE: Repackage whole project for ROCm 5.5 release
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
Change-Id: I932b11a111c8e0db04bd8c5e0c3d1a470e5b2386
2022-11-29 17:04:32 -06:00
Dalibor Stanisavljevic d62b399db6 SWDEV-361376 - Added check for input enum parameters
Change-Id: Ie2f9b1e7a6ddb2feadde85aa3b4772c73faf0064
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-11-22 10:38:45 -05:00
Dalibor Stanisavljevic d30683af50 SWDEV-367683 - Fixed amdsmi_get_fw_indo and amdsmi_get_device_type
Change-Id: Icf420104f60a2c5c724d993db8bd59adcce3692a
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-11-22 10:38:33 -05:00
Dalibor Stanisavljevic 76f6cf7a9d SWDEV-366720 - Changed amdsmi_get_device_handle_from_bdf
Changed implementation and input parameters

Change-Id: Ifca3247132eb4033f99d74617a53f54ad076dad0
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-11-22 10:28:45 -05:00
Dalibor Stanisavljevic 62154829b0 SWDEV-361376 - Added socket releated functions
Change-Id: Ib5984e9d85cbba95dfc153c0ed23dae04f5f9a46
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-11-22 10:23:04 -05:00
Dalibor Stanisavljevic 21d6e0f990 SWDEV-361376 - Updated python API
Added pcie, power and memory API

Change-Id: I0b3bd1c110099805c700f53974eceb6acd850930
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-11-14 12:55:30 +01:00
Dalibor Stanisavljevic 50133d44c2 SWDEV-361376 - Updated python API
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
Change-Id: I8d81154b27111b849dbb645e024ebf322299f851
2022-11-10 16:57:49 +01:00
Dalibor Stanisavljevic cec429dbeb SWDEV-361376 - Added additional API calls to the python interface
- Added APIs for "Error Query"
- Added APIs for "System Information Query"

Change-Id: Idd0e8595c37b23025545f54428b824bf41544bb9
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-11-10 16:57:49 +01:00
Dalibor Stanisavljevic f9f792230e SWDEV-361376 - Added additional API calls to the python interface
- Added performance counter API calls
- Added part of unsupported functions in virtual env API calls
- README for both additions

Change-Id: I6fdf1fe83370975011fe4ec11c0b0ca2bab0a1b8
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-11-10 16:57:49 +01:00
Dalibor Stanisavljevic 62a69fb802 SWDEV-361376 - Added API calls to the python interface
- Added Physical State Query API calls
- Added Clock, Power and Performance Query API calls
- README for both additions

Change-Id: Icf412364a13c9e51b9630f19f29a7cdfbe46f7fe
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-11-10 16:57:49 +01:00
Dalibor Stanisavljevic 9cad9e5216 SWDEV-361376 - Add README for python tool
- Add up to date README file for python tool

Change-Id: I7a02f79469e990870398b3741b033ea447998fdd
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-11-10 16:57:49 +01:00
Dalibor Stanisavljevic 23160fa8e0 SWDEV-361376 - Add events to python interface
- Implement context manager event class for easier usage instead of having 4 different
  APIs.
- Add support for with statement for easier cleanup.

Change-Id: I396947a93d3f04efc068e17804eab12eefa97cf0
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-11-10 16:57:49 +01:00
Dalibor Stanisavljevic a6efdd32ed SWDEV-361376 - Added additional API calls to the python interface
- Added APIs for "Supported Function Checks"
- Added first half of the APIs for "Unsupported Functions In Virtual Environment"

Change-Id: Ia83303e6b7ae65aada608bd9ca5f56fd33e4ef34
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-11-10 16:57:49 +01:00
Bill(Shuzhou) Liu b34b7451e8 Init the amdsmi using rocm_smi for libdrm
Init the ams_smi using the rocm-smi, which makes the GPU discovery
consistent with or without libdrm.

Change-Id: Ic714781f8ce791451b0c057621525926edb7f5ee
2022-11-07 11:09:09 -06:00
Bill(Shuzhou) Liu c8caa80405 Fix the unit tests
Fix a few broken unit tests to handle NOT_YET_IMPLEMENTED errors.

Change-Id: If3afac0dc32f2e3e82d83bffa5906b630bb1894a
2022-11-04 08:53:09 -05:00
Galantsev, Dmitrii 7957b63dd4 Cleanup tests
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2022-11-03 13:30:16 -05:00
Galantsev, Dmitrii c99e4e1501 Cleanup CMakeLists.txt for packaging
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2022-11-03 12:44:23 -05:00
Bill(Shuzhou) Liu 9a92ea833f The device name and vbios version is incorrect
Get the device name from rocm-smi which is not displayed properly
in some cards. Set the vibos version using the rocm-smi.

Change-Id: I138f1760cde94007cb93cad02c6d8cccbb4afa28
2022-10-28 13:03:18 -05:00
Bill(Shuzhou) Liu a25c71b730 Fix unit test compile error
Update the unit test as header enum type name is changed.

Change-Id: Ie965462da7d46259883650b15644003cf936982a
2022-10-20 09:54:11 -05:00
Bill(Shuzhou) Liu 93bc47a5c3 Update the document
The README.md is updated for amdsmi

Change-Id: Ic027476d9f6b62e8972793e78db28b12644036ea
2022-10-20 09:25:02 -05:00
Dejan Andjelkovic 6064f160a3 SWDEV-361376 - Add python wrapper
- Add generator for python wrapper
- Add interface, exception and init files
- Add CMake custom targets

Change-Id: I63c1d94fbb587387c22f559a3db79987eb214a2e
Signed-off-by: Dejan Andjelkovic <Dejan.Andjelkovic@amd.com>
2022-10-20 09:24:53 -05:00
Bill(Shuzhou) Liu 4a9bb197b2 Use doxygen to generate amdsmi API document
Change the CMake to generate the API document using doxygen.

Change-Id: I5c2fa661a66ac007f742bfbc15bdfd8d0098285d
2022-10-20 09:24:41 -05:00
Bill(Shuzhou) Liu 2b2d11c446 Change the get_socket_handles and get_device_handles APIs interface
Those two APIs are changed to let the user get the handles count,
allocate memory, and then return handles to the allocated memory.

Change-Id: Ibe28a89ad188c99da6af3af1740b2b25ff22ba06
2022-10-20 09:24:31 -05:00
Dalibor Stanisavljevic 3daf9c1063 SWDEV-353742 - Port smilib function to amdsmi
Change-Id: I99df249755a5c665a8dd1777fa82d046e139bd77
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-10-20 09:24:22 -05:00
Bill(Shuzhou) Liu 7fa3b36d7f Fix the compile error
The rocm_smi64Config.h is not generated which break the build.

Change-Id: I9ea43b53a20bf00a2338f96a6f49d630c60962d1
2022-10-20 09:24:11 -05:00
Bill(Shuzhou) Liu 0c91ef919d Restructure the folder
Move rocm_smi related function to rocm_smi folder. Move amd_smi to
top level include/ and src/ folder. Remove obsolte oam folder.
Change the CMakeLists.txt to update folder locations.

Change-Id: I52e6be739e49f3b0545865f25364787f5985e9c3
2022-10-20 09:23:51 -05:00
Bill(Shuzhou) Liu 1ec3a2182e Support rocm-smi related device information
A few fields are added to board_info and asic_info for rocm-smi
device information.

Implement rocm-smi related fw block in amdsmi_get_fw_info().

Change-Id: I825d3e5c7feaa07a6e05386d4f1a59ebf528dfc0
2022-10-20 09:23:41 -05:00
Bill(Shuzhou) Liu f1d02aca79 Port rocm-smi function to amd-smi
Port most rocm-smi function to amd-smi and add unit tests.

Change-Id: I6387a4bdaf20ead2389c99bb01d438156ccd0747
2022-09-06 12:08:59 -04:00
Bill(Shuzhou) Liu 86017b799c Port more rocm-smi function to amd-smi
The API support function, performance counter, process information,
topology and xgmi info.

Change-Id: I3350ec75fdd2ca1438e79134582ae83c49763056
2022-08-24 12:49:27 -05:00
Bill(Shuzhou) Liu 7b92c694a0 Support events in the amdsmi
Port the events handling from rocm-smi to amd-smi

Change-Id: I0b4cb30a585cb2188a24be0e21c1c156b461bb1d
2022-08-23 16:49:56 -04:00
Bill(Shuzhou) Liu 98df483bef Add unit test support
Add gtest based unit test framework. Implement fan read/write function.

Change-Id: I83375c24b99d24d01d12bccda863a38f75f5987f
2022-08-05 09:55:34 -04:00
Alexsandar Nedeljkovic 61289339d8 Update amdsmi header to include GpuvSMI related APIs and definitions
Signed-off-by: Alexsandar Nedeljkovic <alexsandar.nedeljkovic@amd.com>
Change-Id: Iff46d724f35b52028b67ce272f800fcf820c96ac
2022-07-22 16:06:20 +02:00
Bill(Shuzhou) Liu 5ba371f285 Load libdrm at run time
Remove the compile time dependency on libdrm. Load it at the run
time instead.

Add the headers missed from smi-lib

Change-Id: Ie1ecf293b51425b6a61c502d11a42809dc099f70
2022-06-28 14:48:59 -04:00
Bill(Shuzhou) Liu 91ad08aa65 The init version of amd_smi
The init version includes the amd_smi.h header, an example uses the
amd_smi, folder structure and CMake files.

Add the support to libdrm.

Change-Id: I779e55e4cf9491c61dc226a30d24e96be9bc6016
2022-06-14 09:14:24 -04:00
Elena Sakhnovitch 44ea49eb01 [rocm_smi.py]: shownodesbw fix for non xgmi
Improve error output for non-xgmi nodes bandwidth

signed-off-by: Elena Sakhnovitch
Change-Id: I833970d3200a75c7639d33bf19e0e83afe176c8d
2022-05-24 16:45:32 -04:00
Ori Messinger 786f66671a ROCm SMI CLI: Fix --showvoltagerange bug
This patch fixes a --showvoltagerange bug, which attempts to check
the voltage curve on a device that does not have any voltage
regions in its OverDrive voltage frequency data (odvf).

Signed-off-by: Ori Messinger <Ori.Messinger@amd.com>
Change-Id: I647c30c978ffb13f6819ac3d069ee340710a7f99
2022-05-21 05:02:15 -04:00