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

451 Коммитов

Автор SHA1 Сообщение Дата
Dalibor Stanisavljevic 278bb4e079 SWDEV-371492 - Added check that device_handle is valid
Change-Id: Ic1b593fd5f781650528c860c372fa9864624255d
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: e22e72d4c3]
2022-12-22 12:57:42 +01:00
Dalibor Stanisavljevic 467c7fec1d SWDEV-371199 - Return NOT_INIT when amdsmi initialization fails
Change-Id: Ifb40aef3a62885b08164e9aa944bf9b5c375ebfd
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: 4c56e9e3d6]
2022-12-19 16:29:29 +01:00
Bill(Shuzhou) Liu 594f222ad5 Make amdsmi function name consistent
Some of the amdsmi function have the verb (set or get) at the
end of the function. Move it to the middle to be consistent with
other APIs.

Change-Id: I8053d16f46af951c25aaaf8febf2896a33633fa1


[ROCm/amdsmi commit: 221d6fdc5c]
2022-12-16 10:20:49 -06:00
Dalibor Stanisavljevic e39d69cd72 SWDEV-371565 - Fixed retrieval FW versions in python and example
Change-Id: I4e512584a50342dcd4f9c93f523112fb4b5099dd
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: a80bbd308c]
2022-12-14 13:06:41 +01:00
Bill(Shuzhou) Liu e25ea993a1 SWDEV-373189: build error with g++ v12.1.0
Fix the g++ error: ‘memset’ was not declared in this scope

Change-Id: I6231f863801f84a5a8c46543c87499058f2ef381


[ROCm/amdsmi commit: 552a7403bc]
2022-12-13 08:33:12 -06:00
Galantsev, Dmitrii 00c054475d SWDEV-372949 - Resolve ASAN failure
Change-Id: I622ba5e8fc4d30d98dae365a67a0b0e99ffae3a5
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: a255393b5c]
2022-12-12 15:49:55 -06:00
Galantsev, Dmitrii 77223cb3db 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>


[ROCm/amdsmi commit: 0c52236abd]
2022-12-12 14:37:57 -06:00
David Ceranic 90f19f35e7 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


[ROCm/amdsmi commit: ab928f3be5]
2022-12-09 16:16:41 +01:00
Dalibor Stanisavljevic da7e846b04 SWDEV-371561 - Fixed vbios version string value
Change-Id: Ide06784200084741e6cde606492bf03a760b9601
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: 238f885e14]
2022-12-09 15:19:12 +01:00
Dalibor Stanisavljevic 4893f52636 SWDEV-371210 - Fixed pcie link speed
Change-Id: I736d8095c05ee0685db0c209ea0fdb5832e14744
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: a2a38a5aa2]
2022-12-08 12:03:50 -05:00
Dalibor Stanisavljevic 2763959846 SWDEV-371191 - Fixed amdsmi_get_bad_page_info
Change-Id: I97134f548164eff588d9caa9b9f31c4361c78804
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: b93baf686d]
2022-12-08 12:03:34 -05:00
Dalibor Stanisavljevic b48024d883 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>


[ROCm/amdsmi commit: b4b761d02f]
2022-12-08 13:34:34 +01:00
Jason Albert 599141cf35 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


[ROCm/amdsmi commit: b4cde9adec]
2022-12-07 10:41:33 -05:00
Jason Albert 0e5519726b 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


[ROCm/amdsmi commit: 3b1584915b]
2022-12-07 10:39:26 -05:00
Bill(Shuzhou) Liu ebfd8e1b23 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


[ROCm/amdsmi commit: 8d347bb6c4]
2022-12-06 12:39:43 -06:00
Dalibor Stanisavljevic 6df9b40579 SWDEV-371210 - Fixed python_package command
Change-Id: Idf9e0cc23278caa0333ed26ad32450931d0d603b
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: fae4e1fc37]
2022-12-06 08:07:18 -05:00
Bill(Shuzhou) Liu 34b3c9775f 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


[ROCm/amdsmi commit: 0a3ca5c555]
2022-12-02 07:58:17 -06:00
Galantsev, Dmitrii 6e85124757 CMAKE: Repackage whole project for ROCm 5.5 release
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
Change-Id: I932b11a111c8e0db04bd8c5e0c3d1a470e5b2386


[ROCm/amdsmi commit: aeb0bf5832]
2022-11-29 17:04:32 -06:00
Dalibor Stanisavljevic 926ab2ff6b SWDEV-361376 - Added check for input enum parameters
Change-Id: Ie2f9b1e7a6ddb2feadde85aa3b4772c73faf0064
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: d62b399db6]
2022-11-22 10:38:45 -05:00
Dalibor Stanisavljevic 1f2c779ea7 SWDEV-367683 - Fixed amdsmi_get_fw_indo and amdsmi_get_device_type
Change-Id: Icf420104f60a2c5c724d993db8bd59adcce3692a
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: d30683af50]
2022-11-22 10:38:33 -05:00
Dalibor Stanisavljevic 34e975b897 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>


[ROCm/amdsmi commit: 76f6cf7a9d]
2022-11-22 10:28:45 -05:00
Dalibor Stanisavljevic 6d5261ac5d SWDEV-361376 - Added socket releated functions
Change-Id: Ib5984e9d85cbba95dfc153c0ed23dae04f5f9a46
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: 62154829b0]
2022-11-22 10:23:04 -05:00
Dalibor Stanisavljevic dd0eab575b SWDEV-361376 - Updated python API
Added pcie, power and memory API

Change-Id: I0b3bd1c110099805c700f53974eceb6acd850930
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: 21d6e0f990]
2022-11-14 12:55:30 +01:00
Dalibor Stanisavljevic 9164042117 SWDEV-361376 - Updated python API
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
Change-Id: I8d81154b27111b849dbb645e024ebf322299f851


[ROCm/amdsmi commit: 50133d44c2]
2022-11-10 16:57:49 +01:00
Dalibor Stanisavljevic 3c4a0e6529 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>


[ROCm/amdsmi commit: cec429dbeb]
2022-11-10 16:57:49 +01:00
Dalibor Stanisavljevic 018437360d 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>


[ROCm/amdsmi commit: f9f792230e]
2022-11-10 16:57:49 +01:00
Dalibor Stanisavljevic e09dc2fd47 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>


[ROCm/amdsmi commit: 62a69fb802]
2022-11-10 16:57:49 +01:00
Dalibor Stanisavljevic a16b55507d 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>


[ROCm/amdsmi commit: 9cad9e5216]
2022-11-10 16:57:49 +01:00
Dalibor Stanisavljevic b155d429c9 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>


[ROCm/amdsmi commit: 23160fa8e0]
2022-11-10 16:57:49 +01:00
Dalibor Stanisavljevic 35196b25bd 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>


[ROCm/amdsmi commit: a6efdd32ed]
2022-11-10 16:57:49 +01:00
Bill(Shuzhou) Liu 2d0fb9744a 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


[ROCm/amdsmi commit: b34b7451e8]
2022-11-07 11:09:09 -06:00
Bill(Shuzhou) Liu 17fa3924d6 Fix the unit tests
Fix a few broken unit tests to handle NOT_YET_IMPLEMENTED errors.

Change-Id: If3afac0dc32f2e3e82d83bffa5906b630bb1894a


[ROCm/amdsmi commit: c8caa80405]
2022-11-04 08:53:09 -05:00
Galantsev, Dmitrii f1125780dd Cleanup tests
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 7957b63dd4]
2022-11-03 13:30:16 -05:00
Galantsev, Dmitrii 4fede3797c Cleanup CMakeLists.txt for packaging
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: c99e4e1501]
2022-11-03 12:44:23 -05:00
Bill(Shuzhou) Liu 1ae77d9ac0 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


[ROCm/amdsmi commit: 9a92ea833f]
2022-10-28 13:03:18 -05:00
Bill(Shuzhou) Liu 33f7fba549 Fix unit test compile error
Update the unit test as header enum type name is changed.

Change-Id: Ie965462da7d46259883650b15644003cf936982a


[ROCm/amdsmi commit: a25c71b730]
2022-10-20 09:54:11 -05:00
Bill(Shuzhou) Liu d944c4e11b Update the document
The README.md is updated for amdsmi

Change-Id: Ic027476d9f6b62e8972793e78db28b12644036ea


[ROCm/amdsmi commit: 93bc47a5c3]
2022-10-20 09:25:02 -05:00
Dejan Andjelkovic 14d9160565 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>


[ROCm/amdsmi commit: 6064f160a3]
2022-10-20 09:24:53 -05:00
Bill(Shuzhou) Liu c68caedcbd Use doxygen to generate amdsmi API document
Change the CMake to generate the API document using doxygen.

Change-Id: I5c2fa661a66ac007f742bfbc15bdfd8d0098285d


[ROCm/amdsmi commit: 4a9bb197b2]
2022-10-20 09:24:41 -05:00
Bill(Shuzhou) Liu b546e272e0 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


[ROCm/amdsmi commit: 2b2d11c446]
2022-10-20 09:24:31 -05:00
Dalibor Stanisavljevic bd4ff14bd0 SWDEV-353742 - Port smilib function to amdsmi
Change-Id: I99df249755a5c665a8dd1777fa82d046e139bd77
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: 3daf9c1063]
2022-10-20 09:24:22 -05:00
Bill(Shuzhou) Liu cf09c187f1 Fix the compile error
The rocm_smi64Config.h is not generated which break the build.

Change-Id: I9ea43b53a20bf00a2338f96a6f49d630c60962d1


[ROCm/amdsmi commit: 7fa3b36d7f]
2022-10-20 09:24:11 -05:00
Bill(Shuzhou) Liu d83e3a8b6e 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


[ROCm/amdsmi commit: 0c91ef919d]
2022-10-20 09:23:51 -05:00
Bill(Shuzhou) Liu 0b624c50d2 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


[ROCm/amdsmi commit: 1ec3a2182e]
2022-10-20 09:23:41 -05:00
Bill(Shuzhou) Liu bfa976cf08 Port rocm-smi function to amd-smi
Port most rocm-smi function to amd-smi and add unit tests.

Change-Id: I6387a4bdaf20ead2389c99bb01d438156ccd0747


[ROCm/amdsmi commit: f1d02aca79]
2022-09-06 12:08:59 -04:00
Bill(Shuzhou) Liu 236e4e2d3e Port more rocm-smi function to amd-smi
The API support function, performance counter, process information,
topology and xgmi info.

Change-Id: I3350ec75fdd2ca1438e79134582ae83c49763056


[ROCm/amdsmi commit: 86017b799c]
2022-08-24 12:49:27 -05:00
Bill(Shuzhou) Liu 39c1c4334e Support events in the amdsmi
Port the events handling from rocm-smi to amd-smi

Change-Id: I0b4cb30a585cb2188a24be0e21c1c156b461bb1d


[ROCm/amdsmi commit: 7b92c694a0]
2022-08-23 16:49:56 -04:00
Bill(Shuzhou) Liu 06a481c563 Add unit test support
Add gtest based unit test framework. Implement fan read/write function.

Change-Id: I83375c24b99d24d01d12bccda863a38f75f5987f


[ROCm/amdsmi commit: 98df483bef]
2022-08-05 09:55:34 -04:00
Alexsandar Nedeljkovic f79d7838f4 Update amdsmi header to include GpuvSMI related APIs and definitions
Signed-off-by: Alexsandar Nedeljkovic <alexsandar.nedeljkovic@amd.com>
Change-Id: Iff46d724f35b52028b67ce272f800fcf820c96ac


[ROCm/amdsmi commit: 61289339d8]
2022-07-22 16:06:20 +02:00
Bill(Shuzhou) Liu f7e5bb73d0 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


[ROCm/amdsmi commit: 5ba371f285]
2022-06-28 14:48:59 -04:00