Commit Graph

428 Commits

Author SHA1 Message Date
Galantsev, Dmitrii a94331f293 CMake: Replace .whl with libexec install
Generating .whl has proved to be difficult with AMD CI.
Switch to directly installing python projects instead.

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


[ROCm/amdsmi commit: 87b9faf926]
2023-03-20 21:24:39 -05:00
Maisam Arif 24c96943d4 AMDSMI CLI Initial Packaging
- Added CMake packaging to the amdsmi_cli folder
- Updated Headings in the README.md to follow markdown standard
- Updated Compatibility to be based on the built package name in bin
- Added misc error handling and import corrections
- Updated py-interface amdsmi_exception imports to work by relative path
- Cleaned up py-interface cmake & generator code for finding libamd_smi.so
- Changed line endings in tools/generator.py file to unix

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


[ROCm/amdsmi commit: 235c8db949]
2023-03-20 10:50:21 -05:00
Maisam Arif b8f463cda5 AMDSMI_CLI version 0.0.1
Change-Id: I0b02ddf1cc22753635062475cccadcc235e3a603
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>


[ROCm/amdsmi commit: aa70b77ec5]
2023-03-20 08:51:35 -05:00
Galantsev, Dmitrii 446f1d1c15 Improve python wrapper generation
- Add "BUILD_PACKAGE" option that is OFF by default (CI issues)

- Optionally package wrapper if python3.7 or above is present (hack for CI)
- Optionally build wrapper if clang is present (hack for CI)
- Improve dependency resolution for wrapper
- Use python venv
- Use pyproject.toml instead of setup.py
- Use CMake install path to search for libamd_smi.so
- Move python-specific CMakeLists into py-interface
- Search for libamd_smi.so more aggressively

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


[ROCm/amdsmi commit: 74479187d0]
2023-03-16 09:13:56 -05:00
Dalibor Stanisavljevic feffb7dd00 SWDEV-387561 - Fixed market name
In case there is no device id to map to the corresponding market_name,
the rsmi_dev_brand_get function is used to retrieve the market_name

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


[ROCm/amdsmi commit: 3af2687f17]
2023-03-15 12:54:14 +01:00
Bill(Shuzhou) Liu e18c56efd8 amdsmitst crash when read ECC counter
If the amdsmi is fail to read ECC counter from sysfs file, it
still assumes the data is read into vector, which causes crash.

Add the check to make sure the data is read into the vector.

Change-Id: Ia24331ee6e75408120248b0ed7bc58581a2f23ad


[ROCm/amdsmi commit: ad3b7d9f0d]
2023-03-08 09:13:04 -05:00
Marko Oblak c5054f75f4 SWDEV-379772 - [Navi32] [SMI-LIB] [Linux] [BM] [Guest] Wrong market name
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com>
Change-Id: I12d3e650851a3aa474ccbf62628b60d4c385e68c


[ROCm/amdsmi commit: d1325fcf40]
2023-03-06 17:08:33 +01:00
Marko Oblak f59498bb9d SWDEV-371210 - [AMDSMI][LinuxBM] SMILIB returns wrong pcie speed value
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com>
Change-Id: Ie3ca6997f11d18505df799fef9cd9d53716d53f9


[ROCm/amdsmi commit: 8429df989c]
2023-02-28 11:49:20 +01:00
Dalibor Stanisavljevic 08e3cdccf4 SWDEV-380736 - Adjusted ouput for amdsmi_get_vram_usage
Change-Id: I6a2cd2353a0c3fafc3a3690098a1e279ecd30378
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: 7b176fc2df]
2023-02-24 14:47:07 +01:00
Marko Oblak 839c93fa14 SWDEV-384518 - [AMDSMI] [Navi32] [Linux] [BM] [Guest] Fixed RAS enabled Python interface
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com>
Change-Id: Iacdb57ddc63ea3e7ce5c19506577487ab18c0c89


[ROCm/amdsmi commit: b43b6e71c2]
2023-02-23 15:51:45 +01:00
Marko Oblak f0e658c03e SWDEV-384678 - Resolve issue with amdsmi build failure
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com>
Change-Id: I073113814d2f6740c9eaea1b298d8aff9ea58c72


[ROCm/amdsmi commit: 7eea4e596b]
2023-02-22 11:00:57 +01:00
Marko Oblak 9c6b1f56d5 SWDEV-373291 - Added implementation of versioning solution
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com>
Change-Id: Ifd0be3f81902466339b6c098ce16d5e49740056c


[ROCm/amdsmi commit: 0aadf7eab2]
2023-02-21 17:37:54 +01:00
Marko Oblak c9b2dc036f SWDEV-381227 - [AMDSMI][Linux][BM] SMILIB returns wrong temperature value
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com>
Change-Id: Idc9929d1cfd882bb33abf040378587f68d22b31a


[ROCm/amdsmi commit: db9d8793be]
2023-02-21 17:21:15 +01:00
Galantsev, Dmitrii b0067b5c9a Improve Debian packaging recommendation
See: https://cmake.org/cmake/help/latest/cpack_gen/deb.html#variable:CPACK_DEBIAN_PACKAGE_RECOMMENDS

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


[ROCm/amdsmi commit: 3bed2b7b8f]
2023-02-16 14:40:40 -06:00
Dalibor Stanisavljevic 56dec0a4d2 SWDEV-375213 - Renamed gpu_device to gpudevice for amdsmi_get_power_cap_info
Change-Id: I8518587f35e4ce897317a09505435eee7a8f81f8
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: c469c3d505]
2023-01-26 14:11:26 +01:00
Dalibor Stanisavljevic 1a7d00f665 SWDEV-375213 - Separate smi from rocm part inside functions
Change-Id: I81d2e9d02794ac017a74b3273c6f5a8c85b042a0
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: ff553cdb56]
2023-01-26 07:28:53 -05:00
Dalibor Stanisavljevic c121d6f631 SWDEV-373295 - Updated python interface
Change-Id: I882179d97a4f522deb0e8b9cdbff85d9b23471ab
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: 08bcaee3e2]
2023-01-25 14:21:24 +01:00
Dalibor Stanisavljevic b23d1daf49 SWDEV-375113 - Fixed process info
The format of the fdinfo file has changed

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


[ROCm/amdsmi commit: 411ef54087]
2023-01-23 08:13:55 -05:00
Dalibor Stanisavljevic 90eec28e01 SWDEV-373282 - Fixed compiler warnings
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
Change-Id: Ieacf1057ad23f9a31d47a6d1199c90d8fa0d12db


[ROCm/amdsmi commit: cf7a92f383]
2023-01-23 03:37:29 -05:00
Dalibor Stanisavljevic 431fa8b190 SWDEV-373295 - Added power_limit field in python api
Change-Id: Ie81e78eb9930fb0d8132ee9f119e291afbcad84f
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: a926f42599]
2023-01-23 03:36:00 -05:00
Galantsev, Dmitrii 5a234677fb SWDEV-340919 - Move examples and tests install dir
Previous install locations:
- /opt/rocm/share/example/amd-smi
- /opt/rocm/share/tests/amd-smi

New install locations:
- /opt/rocm/share/amd_smi/example
- /opt/rocm/share/amd_smi/tests

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


[ROCm/amdsmi commit: 6ee793ca03]
2023-01-20 09:49:56 -06:00
Maisam Arif 19c2ecca09 Revert "Added AMD-SMI Linux Baremetal"
This reverts commit 64b1e4e65b.

Reason for revert: Branch is still WIP

Change-Id: I75eec813b3d81049f033fe0a534251bd69eeca0e


[ROCm/amdsmi commit: 6aa91da74c]
2023-01-19 11:45:20 -05:00
Dalibor Stanisavljevic f4828ee580 Revert "Adjusted folder naming and moved amdsmi_cli into amdsmi project folder"
This reverts commit 1246feb70d
because build failed

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


[ROCm/amdsmi commit: ed8f865341]
2023-01-19 15:40:28 +01:00
Dalibor Stanisavljevic 24ceedf639 SWDEV-378294 - Fixed failing tests
Change-Id: Ie0f9dedd6901e05b1a5ca7846624c127d92ed67f
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: bf79fe4323]
2023-01-18 10:28:32 -05:00
Maisam Arif 1246feb70d Adjusted folder naming and moved amdsmi_cli into amdsmi project folder
Change-Id: I4b7c42161fc92450f496483e5b49c7def6810437


[ROCm/amdsmi commit: 3eadf3a216]
2023-01-18 08:47:38 -06:00
Maisam Arif 64b1e4e65b Added AMD-SMI Linux Baremetal
Change-Id: I39ec76f4e4a8ca32eba10f4541585b2284e71539
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>


[ROCm/amdsmi commit: 013400bee7]
2023-01-18 03:32:52 -06:00
Jason Albert a9b7294d85 Remove tag values from enum/union/struct declarations
The tag values largely were not used and were causing doxygen
generation issues.
In the few cases where the tags were being referenced, clean up
those compile issues.

Signed-off-by: Jason Albert <jason.albert@amd.com>
Change-Id: I7b32eac742fb5af560400c13dda2721705d882bc
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: 86de0f441f]
2023-01-16 13:14:45 +01:00
Dalibor Stanisavljevic d97d4b7e60 SWDEV-375113 - Updated python wrapper
Change-Id: I779cd5d7ff3f3ca231d1fd90dcedcc070540e6e3
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: bbcbe896ea]
2023-01-16 12:24:38 +01:00
Dalibor Stanisavljevic d9f2eada69 SWDEV-375098 - Added check if driver sysfs node exists
Change-Id: I2524f96e5447fd3a34aa16efe3dfc271b7df62b9
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: 49aad0f898]
2023-01-16 10:58:27 +01:00
Bill(Shuzhou) Liu afd16e8295 Crash when fails to open sysfs file
When it fails to open sysfs file, it may crash. Modify the condition
to check the file descriptor after open the file.

Change-Id: I2acdc55f8194a2d734db20d16e1660a20ba09574


[ROCm/amdsmi commit: f19da1bb2c]
2023-01-13 08:15:58 -06:00
Dalibor Stanisavljevic ac520be228 SWDEV-376644 - Renamed usage to engine_usage
Change-Id: Icaac74800e30c1769a491ef190359490aba757b7
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: 4caded6dc4]
2023-01-12 15:58:29 +01:00
Dalibor Stanisavljevic 574874b88f SWDEV-374716 - Fixed asic info
Change-Id: I8d806ef09eca4300fcec0ce6a226d13547dfb728
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: 943c42f58f]
2023-01-11 11:03:17 -05:00
Bill(Shuzhou) Liu ca06111d12 Remove duplicate temperature function
The amdsmi_dev_get_temp_metric() will cover both function:
amdsmi_get_temperature_measure() using AMDSMI_TEMP_CURRENT
and
amdsmi_get_temperature_limit() using AMDSMI_TEMP_CRITICAL
Remove those two function.

It also merge the amdsmi_get_power_limit() into
amdsmi_get_power_measure()

Change-Id: I40d4afeb2ec0ac7b64832729f36adfaae120c990


[ROCm/amdsmi commit: ec48312c61]
2023-01-11 08:13:37 -06:00
Dalibor Stanisavljevic 3a7a71058f SWDEV-375181 - Fixed amdsmi_get_fw_info python output
Change-Id: I4bf4bf49cd921d52849e1bb140e464e2756b07c5
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: e217fff82c]
2023-01-11 11:17:49 +01:00
Bill(Shuzhou) Liu f29da5cce9 change sensor_type in amdsmi_dev_get_temp_metric() to enum
The sensor_type in amdsmi_dev_get_temp_metric() will be changed to
amdsmi_temperature_type_t

Change-Id: I72a7f271b0a55a025acc2ca523062a3d51cc036d


[ROCm/amdsmi commit: 79bd9c1d5f]
2023-01-04 13:01:04 -06:00
Galantsev, Dmitrii 2d97dee0c2 SWDEV-374138 - Improve ASAN flags
Tests overwritten the linker flags resulting in failed build with clang.
This change improves ASAN linker flag assignment and fixes test issue.

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


[ROCm/amdsmi commit: 2184d0c3d7]
2023-01-03 16:30:48 -06:00
Dalibor Stanisavljevic 3f6ba87ef1 SWDEV-375271 - Renamed AmdSmiClockType to AmdSmiClkType
Change-Id: I6af34f7c4701584357ae5ec1315fbc425f2a9f82


[ROCm/amdsmi commit: 9d345c5797]
2022-12-28 12:55:15 +01:00
Dalibor Stanisavljevic 5844ac7c28 SWDEV-373280 - Updated python wrapper
Use ctypes to import types instead of via amdsmi_wrapper

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


[ROCm/amdsmi commit: 0f7c440d95]
2022-12-28 10:21:54 +01:00
Dalibor Stanisavljevic de01be137e SWDEV-373280 - Added new generator
Change-Id: I82e3663f8118f17dc6a223a79cadd95634329356
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: 36eb2145d9]
2022-12-27 10:14:09 +01:00
Dalibor Stanisavljevic 413119d2fe SWDEV-370502 - Reserved fields in structs
Change-Id: I23aed12baf6b3173eb149eb3b969e55d7e4360ee
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: cb013d25ff]
2022-12-26 10:51:44 -05:00
Dalibor Stanisavljevic 52addf5dcb SWDEV-371492 - Updated python wrapper
Change-Id: I04f9f825ecdbe06de9ca95cf19e3f5bca972ec95
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: 0bdd45e935]
2022-12-23 14:09:50 +01:00
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