Commit Graph

24 Commits

Author SHA1 Message Date
Narlo, Joseph 84f4d397aa [SWDEV-506030] Fix Errors when generating python wrapper
Update wrapper script is not generating the python wrapper properly.
Fixed how the structure names are parsed.

Signed-off-by: Joseph Narlo <joseph.narlo@amd.com>
2025-01-07 16:12:37 -06:00
Joe Narlo 3052ad4220 SWDEV-495787 [AMDSMI] Different license headers
Change copyrights to MIT and remove date

Signed-off-by: Joe Narlo <Joseph.Narlo@amd.com>
Change-Id: I16f5b412f2b9ddefaaa1771aa714cc18829a1be4
2024-11-22 08:55:28 -05:00
Joe Narlo b5887c2f05 SWDEV-487604 [AMD SMI][Unified Header] integration_test.py is failing with unified header
The script generator.py was not handling all of the anonymous and unnamed structures.
Logic was added to correct the errors seen in the script amdsmi_wrapper.py

Removed adding _ to structure definitions

Change-Id: I51958d23b3da40ec67e883e13dc74feaeaf1d58e
Signed-off-by: Joe Narlo <Joseph.Narlo@amd.com>
2024-10-15 16:22:02 -04:00
gabrpham 8bc4abc88b Corrected partition changes in header and wrapper
Signed-off-by: gabrpham <Gabriel.Pham@amd.com>
Change-Id: Iafd7de8f08924873da841ee6eca62100a17b2b6c
2024-09-20 17:01:55 -05:00
Maisam Arif 3b7f661e71 Moved KFD information to separate structure and API
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: If6eaea589edc704cf408d6391b5f2154134035e7
2024-09-20 03:48:42 -04:00
Maisam Arif 639daa3d90 Fixed amdsmi_get_utilization_count() wrapper generation
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Ifd59fca042c4b3b0fc53e100b6892c6b4f7b3e95
2024-09-17 16:34:42 -04:00
Maisam Arif 105db1afcd Udpated License Dates
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I8ca199c129c06508bc3e23745ab5ac2d20dce928
2024-09-16 16:14:47 -04:00
Michael John d75d127864 Proper escape Windows path \include in generator.py
Change-Id: I9042de7e9cb08c247b7bf21a8de2b8cbceb483da
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2024-09-16 15:45:15 -04:00
Maisam Arif 787d4462fa [SWDEV-482412] Optimized PCIe Bandwidth gpu_metrics calls
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Ib37d232b94a080e9b490dd065628d2567aaf4642
2024-09-11 23:26:30 -05:00
Maisam Arif 8b3d45e301 Udpated amdsmi_quick_start.py with cpus preloaded
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I4a5ca0d30d2fce3b4fa3a6a13599a18b0dd16ce7
2024-09-11 17:38:17 -04:00
Maisam Arif 1efb5e9910 Updated cli init functions to not intersect with lib init functions
Added Quick start script to quickly test python APIs
"python3 -i tools/amdsmi_quick_start.py"
Fixed ESMI lib macros

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I55370a0cb79d631f7f2f2b91568f089b503ebfad
2024-09-04 10:23:36 -04:00
Maisam Arif b39b39ef3c Temporary generator.py patch for amdsmi_bdf_t
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I93157127524b87e2e1445dcdc8588e62530bf68c
2024-05-30 15:35:38 -04:00
Bill(Shuzhou) Liu 86d025daaa Add @platform doxygen alias
The @platform alias will describe which platform (for example,
gpu_baremetal or/and host) an API can be used.

The get_platform.py is a tool to compare APIs in different platforms.

Change-Id: I902bc4fea048269eace6e9f3f4a8e93f3adb7f87
2024-02-07 07:28:38 -05:00
Galantsev, Dmitrii 874d8edb3d Remove absolute link to libamd_smi.so
Also modify README to include:
  export PATH="$PATH:/opt/rocm/bin"

Change-Id: Ib4513d61fd3e6b23cc789491c11d83e6a6de947a
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-11-02 14:31:58 -05:00
Galantsev, Dmitrii 8568af65ff CMAKE - Generate ESMI wrapper
The wrapper is only generated if ENABLE_ESMI_LIB option is set.
./update_wrapper.sh will check the option if cmake was ran first.

Change-Id: I6267cdba8c6ecdff58ced75a2aa59afae964446c
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-10-16 16:49:00 -05:00
Maisam Arif 8630b59b81 Added Error handling to generator
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I77e869624e4f0c7586dc2c018242b8e5737f7d4b
2023-08-01 14:28:58 -04: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 0830e983d8 SWDEV-381302 - Added Error handling for Set & Metric
Bug Fixes for Set and Fan
Updated lib_amdsmi.so directory access
Backwards compatability fixes for gpuv-smi

Change-Id: I3b7977859c750c1c3d6f41eaa761c81d8b9e5184
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
2023-04-18 10:27:50 -05:00
Maisam Arif 235c8db949 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>
2023-03-20 10:50:21 -05:00
Maisam Arif aa70b77ec5 AMDSMI_CLI version 0.0.1
Change-Id: I0b02ddf1cc22753635062475cccadcc235e3a603
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
2023-03-20 08:51:35 -05:00
Galantsev, Dmitrii 74479187d0 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>
2023-03-16 09:13:56 -05:00
Dalibor Stanisavljevic 36eb2145d9 SWDEV-373280 - Added new generator
Change-Id: I82e3663f8118f17dc6a223a79cadd95634329356
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2022-12-27 10:14:09 +01: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
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