Commit grafiek

712 Commits

Auteur SHA1 Bericht Datum
Charis Poag 53e36d3813 Merge branch 'amd-dev' back into rocm-smi merge
Change-Id: Id19cb9ac9cb1ad9ed98fc766c08a00a998ec2373
2023-07-20 20:04:11 -05:00
Charis Poag afa174c655 Merge 'rocm-smi/amd-staging' into 'amd-smi/amd-dev'
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
Change-Id: Id35c9807c45a965c968fb430e3ce4f3c7069c210
2023-07-19 18:46:28 -05:00
Maisam Arif 1bbfb0af56 Merge "[AMDSMI] [Linux] [BM] [Guest] Improve Python readme" into amd-dev 2023-07-19 16:07:29 -04:00
Marko Oblak 8f7e795b02 [AMDSMI] [Linux] [BM] [Guest] Improve Python readme
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com>
Change-Id: Ic8c1ea2789407621d2155763a33cc7059cfe6729
2023-07-19 13:46:00 +02:00
Sirb, Corina ebe0cecd9e Update Copyright Date
Signed-off-by: Sirb, Corina <corina.sirb@amd.com>
Change-Id: I4b5dc49a5d756012e533ba7196b246836cf980f6
2023-07-18 15:05:14 -04:00
Bill(Shuzhou) Liu 4307330cb0 Fix unit test errors
Add unit test error handling for set freq and volt.

Change-Id: I5877f8300b942caac8f38e6efc03264bfc432def
2023-07-12 09:39:39 -04:00
Vukasin Nedeljkovic 59b2b7bea4 SWDEV-407430 [AMDSMI][Tool][Linux][BM] PCIE unit update
Signed-off-by: Vukasin Nedeljkovic <Vukasin.Nedeljkovic@amd.com>
Change-Id: I7615cd1fcf504719e1032076bb836964fc44f4e0
2023-07-12 08:36:29 +02:00
Vukasin Nedeljkovic 3f0441a74c SWDEV-407428 [AMDSMI][Tool][Linux][BM] static update to HEX
Signed-off-by: Vukasin Nedeljkovic <Vukasin.Nedeljkovic@amd.com>
Change-Id: I4db506a2467b460c9c635e4e2790dd1e8fd0a196
2023-07-11 13:05:41 +02:00
Galantsev, Dmitrii e6c42c6626 Simplify gitignore
Remove generic gitignore to simplify tracking of generated files

Change-Id: Idf1f9719b2cfd16b31332a3ed87be5943c2c1ce7
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-07-07 11:48:09 -04:00
Jeremy Newton 2d2c73a5e6 Fix python loading of librocm_smi64
The librocm_smi64.so is used for development, while
librocm_smi64.so.MAJOR is used for runtime, thus the python front end
should not be loading the .so binary, but rather the .so.MAJOR binary.

As well, it's good not to hardcode "lib" as some distros will change
this.

rsmiBindings.py is now generated with CMake

Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
Change-Id: I7cb745f8936fdf10d3ebd6c1e606031f713184ca
2023-07-06 09:52:56 -04:00
Bill(Shuzhou) Liu 7b107258ff Handle key not exists errors for voltage sensor
Check the key exists or not before access sensor map.

Change-Id: I0ac5d63ae981ec2f984b1d464e93508560a4d030
2023-07-05 09:25:27 -04: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
Jeremy Newton 828f46b445 Only install asan license if enabled
Change-Id: I79c6fce84c23ed12e65db8e234a29dbfedd11f68
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
2023-06-30 23:34:43 -04:00
Jeremy Newton 4f481dd7f3 Actually fix version string
There seems to be a scope issue with the existing variables, but just
putting in the pkg version string seems sufficient.

Change-Id: I4ccef872ff848a70cb2abc07bf605c5f29a608e8
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
2023-06-30 23:34:14 -04:00
Tom Rix 19c3e2aff9 Improve handling of ContructBDFID errors
Building on this package on Fedora reports this warning
In file included from rpmbuild/BUILD/rocm_smi_lib-rocm-5.5.1/src/rocm_smi_main.cc:62:
In member function 'amd::smi::Device::set_bdfid(unsigned long)',
    inlined from 'amd::smi::RocmSMI::Initialize(unsigned long)' at rpmbuild/BUILD/rocm_smi_lib-rocm-5.5.1/src/rocm_smi_main.cc:330:27:
rpmbuild/BUILD/rocm_smi_lib-rocm-5.5.1/include/rocm_smi/rocm_smi_device.h:199:42: warning: 'bdfid' may be used uninitialized [-Wmaybe-uninitialized]
  199 |     void set_bdfid(uint64_t val) {bdfid_ = val;}
      |                                   ~~~~~~~^~~~~
rpmbuild/BUILD/rocm_smi_lib-rocm-5.5.1/src/rocm_smi_main.cc: In member function 'amd::smi::RocmSMI::Initialize(unsigned long)':
rpmbuild/BUILD/rocm_smi_lib-rocm-5.5.1/src/rocm_smi_main.cc:324:12: note: 'bdfid' was declared here
  324 |   uint64_t bdfid;
      |            ^~~~~

Only set the bdfid when it is know to be valid.

Signed-off-by: Tom Rix <trix@redhat.com>
Change-Id: I839b4d2d2d4e3b25469cf5972245b9630da00c87
2023-06-30 00:16:44 -04:00
Jeremy Newton 74dc98114f Update default version to match tags
When building from github, these tags don't exist, so the defaults
should try to match the internal tags

Change-Id: Id570341f27e21916b1a7f3605ee2b5b9716cad9b
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
2023-06-30 00:16:22 -04:00
Bill(Shuzhou) Liu 3b1e2f0817 amdsmi_init() fail when miss voltage sysfs
Fix the error handling when voltage sysfs is missing.

Change-Id: I457289eb4fd45bb05af83a67289b056f7e2ad966
2023-06-29 17:19:41 -04:00
Maisam Arif 36671450f0 Corrected temp_vram_limit variable reference
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Ic54cc62a8ac1ea9c63b2270810d95e6589059160
2023-06-29 16:34:41 -04:00
Jeremy Newton 1a86dd75bb Fix version file generation
This looks like a typo, as the following variables are not defined:
- AMD_SMI_LIBS_TARGET_VERSION_MAJOR
- AMD_SMI_LIBS_TARGET_VERSION_MINOR
- AMD_SMI_LIBS_TARGET_VERSION_PATCH

Change-Id: I43449e7bd2a2de643d33e79fad063a7859679c8d
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
2023-06-29 14:42:30 -04:00
Bill(Shuzhou) Liu 9e2fcd0e40 Fix fan write unit test failure
Even if fan speed can be read, sometimes the set is not supported.

Change-Id: I8584e6fe170c34144800af78d76f04234def11c8
2023-06-29 07:58:23 -05:00
Bill(Shuzhou) Liu 145868ad72 Return NOT_SUPPORTED if fail to write to sysfs
Check the error and return NOT_SUPPORTED when write to sysfs.

Change-Id: Idaa91816197413643552e230a483b79500d44e08
2023-06-28 09:05:51 -05:00
Jeremy Newton d00d885394 Fix python script install permissions
The keyword "PROGRAMS" should be used in place of "FILES" in order to
make sure executable scripts have the correct permissions.

Change-Id: I6c287dc1291774ad6d97a04d621957dea0a1b697
Signed-off-by: Jeremy Newton <Jeremy.Newton@amd.com>
2023-06-27 14:57:59 -04:00
Bill(Shuzhou) Liu 910bf677a9 Crash if no hwmon sysfs
Return NOT_SUPPORTED if no hwmon sysfs.

Change-Id: I01356a21f004ab552ca6ef7ffb49934bfdfd5e31
2023-06-26 08:00:32 -05:00
Deepak Mewar 210af88a20 cmake option for hsmp
For enabling hsmp, run 'cmake .. -DENABLE_ESMI_LIB=ON'
else run 'cmake ..' for default compilation

Change-Id: I8effba13854bc12eeff4b50feb4f63643cae28e6
2023-06-26 05:55:18 -04:00
Suma Hegde a51a5d76e0 add esmi src and inc paths to CMakeLists.txt
Amd-smi functions will be calling esmi functions.
Hence we need to include esmi source and include files

Change-Id: Icea0553ab76da64b89aebbf2423f26e0dd4fee65
2023-06-26 02:35:50 -04:00
Suma Hegde 3c7f106afc add esmi repo as git sub module
esmi library repo from gerrit path is added as submodule
to amd-smi repo.
To get esmi submodule synced along with amd-smi repo, cloning can be done with
"git clone --recurse-submodules" or
after cloning amd-smi repo,
"git submodule update --init" will sync the esmi library.

Change-Id: Ia0f382995f29018b469083b27918effc96a51b56
2023-06-26 02:35:27 -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
Galantsev, Dmitrii 82078565e9 SWDEV-406542 - Add gtest to install targets
Change-Id: I116505aaa33109fce66ab8daf9921e2de11a27d4
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-06-20 11:14:56 -05:00
Bill(Shuzhou) Liu 8f26e881fb SWDEV-405668 - BDF difference between amdsmi and rocmsmi
The render node discovery is changed to match rocm-smi index.

Change-Id: I707d0844b377304f4e8fc15035902c707805c2dc
2023-06-16 17:06:00 -04:00
Galantsev, Dmitrii 9519d5b8cf SWDEV-391041 - Disable TestPowerReadWrite
Change-Id: I56b5bea3e5206a6f0d5ecdb482103881f80f0b8b
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-06-16 15:18:27 -04:00
Galantsev, Dmitrii e7585cc045 Assign tests to aqua_vanjaram
Change-Id: Iee78b1e810356327261006087b081e39dab0b9e8
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-06-16 15:18:27 -04:00
Bill(Shuzhou) Liu d9b6af7a09 Expand showpids to provide more details
Provide details of GPU usage by an application.

Change-Id: I0f36df7d358754c2c8a60432b736d98f667ee99c
2023-06-16 08:52:18 -04: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
Galantsev, Dmitrii 0478d53e23 SWDEV-340919 - Package rsmitst
Similar to I879b21428e6642f19fda67092b365d8b78b7ba7b.

Main CMake improvements:

* Add rsmitst with -DBUILD_TESTS=ON
* Package tests into rocm-smi-lib-tests.deb and .rpm
* Note - this breaks build_rsmitst.sh

Misc improvements:

* Add .editorconfig to normalize code formatting
* Export compile_commands.json
* Remove gtest source and pull from github instead

Change-Id: Ib87ed4a5acd9f78badae6d028e5ff3d4f56dafc2
Depends-On: I8b26795471ad1432c805e45d8b58d7bb34abfcfc
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-06-13 22:52:10 -05:00
Galantsev, Dmitrii ac94bf5ed5 Temporarily ignore TestFrequencies
See SWDEV-391039 and SWDEV-391040 for details

Change-Id: I662ba43363d949465454ea4af4d4586b3d47a811
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-06-12 19:26:21 -05:00
Galantsev, Dmitrii 713f85721b --showtempgraph - Show N/A when no temp found
If temp in hwmon was missing - rocm-smi crashed.
e.g. /sys/class/drm/card1/device/hwmon/hwmon5/temp1_input

This change displays "N/A" for temp instead of crashing.

Change-Id: I02f84a466bd3acfbd9b65e7e4ca0f18e76606c3b
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-06-12 19:16:39 -05:00
Nikola Veljkovic b3d3b4c38d SWDEV-404225 Add support for Navi32 deviceIDs
Change-Id: Ibfe7c8f4cf04243c3e4e5754c1eaa3253d4d5be4
Signed-off-by: Nikola Veljkovic <Nikola.Veljkovic@amd.com>
2023-06-09 10:42:00 -04:00
Maisam Arif 00e170c2f5 SWDEV-404157 - Fixed printLog delimiter parsing
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I3d8e22d185790f4325aeacc18e4bfcfe8777d356
2023-06-08 20:02:51 -05:00
Galantsev, Dmitrii 483c3fe483 CMAKE: Remove EPEL dependencies from RPM build
This commit reverts changes to CMake made in
Ie3b85fde7563dd84dce499f229aac1f94bcc2989

Those broke compilation on rhel-9 and SLES

Change-Id: I4961de4b61e82734266e99e548a9367f318ce00d
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-06-07 10:39:43 -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
Galantsev, Dmitrii f78f9a4082 Fix test temp blacklist, ignore TestVoltCurvRead
Change-Id: I86fa14fdc06e1b170a0bc0c0727fc08e4f4e2074
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-06-06 17:02:14 -04:00
Charis Poag e2dec17284 [SWDEV-402336 + SWDEV-398070] Fix RPM install part2
Updates:
    [rocm-smi] RPM installation comment included a macro,
    now removed

Change-Id: Ifa7a8d2d1a713940c39e20df9d02635e0e623dd8
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
2023-06-05 13:50:57 -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
Galantsev, Dmitrii e8391c9d7c Clean-up python errors and warnings
Used pyright to show errors and warnings and resolved most

Change-Id: I0fdf7dcdf08db5c35dec80f6645e0a395fbe4197
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-06-01 17:37:57 -04:00
Charis Poag b0f2a9d2ef [SWDEV-402336 + SWDEV-398070] Fix RPM install - override macros
Updates:
    * [rocm-smi] RPM installation now overrides macro usage

Change-Id: I2a5ba14670becc178f672182eabe71965a526178
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
2023-06-01 11:58:42 -04: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
Galantsev, Dmitrii 2048f8978f Fix memset compile warning
Change-Id: If31210f3c6038e56f43ae8631ed1657d1509488e
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-05-31 21:54:32 -04:00
Sam Wu c5e06b4040 add configurations for sphinx documentation
Change-Id: I5672348aab0f20d0bfc4dd1efcfecdf4324342d6
2023-05-30 16:08:54 -06:00