提交線圖

725 次程式碼提交

作者 SHA1 備註 日期
Deepak Mewar 0187de61e2 esmi library header changes
1. New processor types AMD_CPU_CORE, AMD_APU added to ENUM
2. esmi errorcodes, wrappers for structures and library APIs
3. Macro introduced to enable/disable the esmi library code

Change-Id: Ia64b29303c231d3f17ac6b40fcd09b09b4380903
2023-07-27 16:21:24 -05:00
Marko Oblak e0b84c5d1f SWDEV-413516 - [AMDSMI][Linux][BM] Changed mapping pcie speed from pcie type
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com>
Change-Id: I5bcee99ec596bb831465d5a4e98a78681c24b20f
2023-07-27 16:21:24 -05:00
Marko Oblak f9ce3925a4 SWDEV-412839 - PCIe speed - change in mapping
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com>
Change-Id: If75530a8b2e1647d2cb31733decfba3837dac7bf
2023-07-27 16:21:24 -05:00
Charis Poag c139bd8dc0 Merge branch 'amd-dev' into change-896675-1
Change-Id: I950d40ff0789f62595561196aea48203b00d165b
2023-07-25 10:02:37 -05:00
Shuzhou Liu 8d4370c08c Merge "Make vbios optional in amd-smi" into amd-dev 2023-07-25 09:59:49 -04:00
Shuzhou Liu eb5d1b786f Merge "Make vbios version optional when discover GPU" into amd-dev 2023-07-25 09:59:33 -04:00
Charis Poag 98c607c8fd Merge branch 'amd-dev' into change-895251-1
Change-Id: I778bda482973b292d6de1b3f266619cbc852c2f5
2023-07-24 17:23:31 -05:00
Maisam Arif 261de2ceab Make vbios optional in amd-smi
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I61d54ea8a01112818df9f431f319533f1bc36f27
2023-07-24 16:11:19 -05:00
Maisam Arif 2ae95ba1da Merge "Changed output font and text size" into amd-dev 2023-07-24 16:51:45 -04:00
Bill(Shuzhou) Liu 41d0f4ad5c Make vbios version optional when discover GPU
Not all GPU has the vbios, make vbios_version optional.

Change-Id: Idc00a0c17baccadea8f26b955237c513bb9a14df
2023-07-24 12:28:34 -05:00
Sirb, Corina 0fa1d1e068 Changed output font and text size
Change-Id: I4f544781dc6be581585737c129b5e986cc05b09f
2023-07-21 10:57:08 -04:00
Bill(Shuzhou) Liu 55bf9cbe13 Change API to get the driver date
Support the driver date from libdrm.

Change-Id: I88e694732b538220e11fdb4029712bb5a6f44380
2023-07-21 08:28:06 -05:00
Charis Poag 53e36d3813 Merge branch 'amd-dev' back into rocm-smi merge
Change-Id: Id19cb9ac9cb1ad9ed98fc766c08a00a998ec2373
2023-07-20 20:04:11 -05:00
Marko Oblak 9077411fcb SWDEV-410048 - Remove --caps from tool
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com>
Change-Id: I3b71c8210401cbbe28905371febe084a4fdaf4ba
2023-07-20 15:56:53 +02: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