Wykres commitów

1558 Commity

Autor SHA1 Wiadomość Data
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
Hao Zhou 39f5a8dd83 Merge amd-staging into amd-master 20230616
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: Iff54607e329acbadb2960bfa24c0b046c9d37962
2023-06-16 11:18:37 +08: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 f82660a853 Merge amd-dev into amd-master 20230614
Change-Id: Id99b5713c1618ad1649c3081115d2f0ce56c8b2b
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-06-14 10:06:37 -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
Hao Zhou 4a1425fff6 Merge amd-staging into amd-master 20230609
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: Ica2eeeb2e63bfdfb41d6e3cac9dac61d41830204
2023-06-09 09:40:14 +08: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
Hao Zhou 36bea41185 Merge amd-staging into amd-master 20230605
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: Iecc1960c400461379d3a6b7ae5a139477a300fcb
2023-06-05 10:07:19 +08: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
Hao Zhou c3395134e5 Merge amd-staging into amd-master 20230601
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: I05594273afa23ac4a10ac0e9eff9788e31b73f3c
2023-06-01 13:26:07 +08: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
Bill(Shuzhou) Liu 62ce965409 Clean up the APIs
Remove and rename APIs after review.

Change-Id: I5464f200eb605b366673f8abca95183c3837843b
2023-05-30 16:08:54 -04:00
Galantsev, Dmitrii b7320bc2fb Merge amd-dev into amd-master 20230529
Change-Id: I2ace47d1151e30358098f5b1704395b2fab43e49
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-05-29 16:42:44 -05:00
Maisam Arif 7477562374 Updated AMD-SMI README install instructions
Change-Id: I9c914e4fb5fbe22e1ff449408beafc250f5b4bf7
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
2023-05-29 16:38:26 -05:00
Maisam Arif 60b2b7fb83 Corrected amdsmi_interface api call & versioning
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I3a80716cb544ab0512073b34702b7fa132767668
2023-05-25 09:53:57 -05:00
Galantsev, Dmitrii 79b62b132f Merge amd-dev into amd-master 20230524
Change-Id: I13197ced9ac95113067fe4ec6a011826a8f3f328
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-05-24 18:32:23 -05:00
Bill(Shuzhou) Liu a6467c4083 Fallback to gpu_metrics if the sysfs is not available
The gpu_metrics may have required PCI link width and speed.

Change-Id: I939d733f5f6a71088545ba042345eb1b6ad20ee5
2023-05-24 14:51:43 -05:00
Maisam Arif 72638192f7 Updated AMD-SMI README.md with CLI install instructions
Updated amd-smi-lib README with CLI install instructions
	Updated version of the python interface and the CLI tool
		to 0.1.0 due to the ESMI header changes

Change-Id: If175cdcb9ce0352b6e7e7ce4cc0940a80c11501b
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
2023-05-24 10:07:19 -05: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 2f18ec7539 SWDEV-396262 - Fixed units for AMDSMI CLI process
Change-Id: Ib85cfb9fe313cfc2eb5cd1d1437426786a99abd9
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
2023-05-23 10:31:50 -05:00
Maisam Arif fe64f426d8 SWDEV-397381 - Corrected ECC per block reporting
Change-Id: If666e2f1a4b13dd08b6a19f08f3c01297515712c
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
2023-05-23 10:31:06 -05:00
Maisam Arif 6b8fe4a377 SWDEV-399063 - Fixed process metrics showing incorrectly for all gpus
Change-Id: I4ae576f34472c3dbbfa0b136f55ce996834323ad
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
2023-05-23 10:25:05 -05:00
Bill(Shuzhou) Liu 160c99d12d SWDEV-400644: Reset the mutex only if errors
To prevent reset the mutex while using it, only reset the mutex
if it cannot acquire it.

Change-Id: I95e0ed1bf543f285ce81b4df9c51e16a88081d38
2023-05-22 11:20:44 -04:00
Maisam Arif 01bd64c718 AMD-SMI-CLI - Updated amdsmi_interface calls to new headers
Change-Id: I031f08c912f2cc77bba3a6f4356b5121072fb71e
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
2023-05-22 08:35:22 -05:00
Dalibor Stanisavljevic 1bc1d431d8 SWDEV-384793 - Clean up API
Change-Id: I441b315d32df59a454e06d521e5ca8b2c229451a
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2023-05-19 16:40:26 +02:00
Charis Poag c3a095a180 [SWDEV-398070] Adding logging to ROCm SMI (by default off)
Updates:
    * [rocm-smi] Provide a thread-safe logging feature
    * [rocm-smi] Adding logrotation into install/upgrade/remove
      scripts
    * [rocm-smi] Updated cmake lists to include rocm_smi_logger
    * [rocm-smi] Updated DEB/RPM install/remove logging file &
      folder with all users having r/w privledges for
      /var/log/rocm_smi_lib/ROCm-SMI-lib.log
    * [rocm-smi] Added ability to do a glob search for multiple files
      (globFileExists), assists doing file searches with * strings
    * [rocm-smi] Added ability to log system details when RSMI_LOGGING
      is turned on (getSystemDetails())
    * [rocm-smi] Added logging to provide which ROCm API is being called
      when RSMI_LOGGING is on
    * [rocm-smi] Added logging to provide SYSFS path and read value,
      when RSMI_LOGGING is on. Provides error reponse on failure.
    * [rocm-smi] Added logging to provide SYSFS path and read value,
      when RSMI_LOGGING is on. Provides error reponse on failure.
    * [rocm-smi] Added environment variable RSMI_LOGGING to control
      when logging is enabled or disabled. By default, by not
      setting this env. variable, logging is turned off. When
      setting RSMI_LOGGING=<any value>, logging is enabled
      which is placed in /var/log/rocm_smi_lib/ROCm-SMI-lib.log file.
      Setting RSMI_LOGGING is allowed in both debug and release builds.
    * [rocm-smi] Removed an initialize procedure which keeps
      debug_inf_loop. Seems this feature is not being used.

Change-Id: I79b48387609c6233c6f05b04fb8bba66b68c2399
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
2023-05-17 21:18:52 -05:00
Dalibor Stanisavljevic ca7f965018 SWDEV-384797 - Renamed measure to info
Change-Id: I2397ed189fe0171ed29bd6440f8fa0bb210b95a5
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2023-05-17 05:10:58 -04:00
Bill(Shuzhou) Liu dc4ba12e00 Return NOT_SUPPORT for set function in VM guest
Fix the unit tests which are fail in VM guest environment.

Change-Id: Id7c58887692bbdecba54f5d2d8463b292e19b4ad
2023-05-11 10:42:55 -05:00
Suma Hegde 3fa4402833 updated amdsmi_wrapper.py
following command is run to generate this file
cmake -B build && make -C build && make -C build python_wrapper

Change-Id: I9ee03c4030537c9e8d260e776c04da52d93a9570
2023-05-11 11:01:45 -04:00
Suma Hegde edd8f1ae23 Renamed APIs
amdsmi_dev_open_supported_func_iterator -> amdsmi_open_supported_func_iterator
amdsmi_dev_open_supported_variant_iterator -> amdsmi_open_supported_variant_iterator
amdsmi_dev_close_supported_func_iterator -> amdsmi_close_supported_func_iterator

Change-Id: Ie9b2efa5aee7095c3c835b91de1951df6b065510
2023-05-11 11:01:37 -04:00
Suma Hegde 6256bf6f1a Renamed API amdsmi_dev_reset_xgmi_error
amdsmi_dev_reset_xgmi_error -> amdsmi_reset_gpu_xgmi_error

grep -rli 'amdsmi_dev_reset_xgmi_error' * | xargs -i@ sed -i
's/amdsmi_dev_reset_xgmi_error/amdsmi_reset_gpu_xgmi_error/g' @

Change-Id: Ic7e4c4b345fdf6187aed42d53fb7ae8536c2edea
2023-05-11 11:01:25 -04:00
Suma Hegde a8acfbf8ff Renamed amd_smi_device.h to amd_smi_processor.h
Change-Id: I9f3cd8b29e4b5e9e552faeb7e977d7a1002abd65
2023-05-11 11:01:14 -04:00
Suma Hegde d9ba131f73 Renamed APIs
amdsmi_dev_get_gpu_ecc_status -> amdsmi_get_gpu_ecc_status
amdsmi_dev_get_gpu_ecc_enabled -> amdsmi_get_gpu_ecc_enabled
amdsmi_dev_get_gpu_ecc_count -> amdsmi_get_gpu_ecc_count

Change-Id: I84e6489f82bae115e1a13c9e4fce8029888ca379
2023-05-11 11:00:59 -04:00
Deepak Mewar e687a72235 Renamed APIs
1) amdsmi_dev_set_overdrive_level to amdsmi_set_gpu_overdrive_level
2) amdsmi_dev_set_overdrive_level_v1 to amdsmi_set_gpu_overdrive_level_v1

grep -rli 'amdsmi_dev_set_overdrive_level' * | xargs -i@ sed -i
's/amdsmi_dev_set_overdrive_level/amdsmi_set_gpu_overdrive_level/g' @

Change-Id: Id6934e5b0962c9262cca041bdfdf02c60f69573b
2023-05-11 11:00:45 -04:00
Deepak Mewar ced22230c4 Renamed API amdsmi_dev_get_od_volt_curve_regions
to amdsmi_get_gpu_od_volt_curve_regions

grep -rli 'amdsmi_dev_get_od_volt_curve_regions' * | xargs -i@ sed -i
's/amdsmi_dev_get_od_volt_curve_regions/amdsmi_get_gpu_od_volt_curve_regions/g' @

Change-Id: I4b390c2d5173ca919c4ab5b1173a4fc40e2a0015
2023-05-11 11:00:33 -04:00
Deepak Mewar 467f3e3bb7 Renamed API amdsmi_dev_set_od_volt_info
to amdsmi_set_gpu_od_volt_info

grep -rli 'amdsmi_dev_set_od_volt_info' * | xargs -i@ sed -i
's/amdsmi_dev_set_od_volt_info/amdsmi_set_gpu_od_volt_info/g' @

Change-Id: I2364f9f555c010e1022e2c946a65b72fcf3d2233
2023-05-11 10:59:51 -04:00
Deepak Mewar a72e1ec91d Renamed API amdsmi_dev_set_od_clk_info
to amdsmi_set_gpu_od_clk_info

grep -rli 'amdsmi_dev_set_od_clk_info' * | xargs -i@ sed -i
's/amdsmi_dev_set_od_clk_info/amdsmi_set_gpu_od_clk_info/g' @

Change-Id: I0f1fd5a80322a544f7d25e09146c9e52b82091f6
2023-05-11 10:59:25 -04:00
Deepak Mewar 2bd94db02c Renamed API amdsmi_dev_get_od_volt_info
to amdsmi_get_gpu_od_volt_info

grep -rli 'amdsmi_dev_get_od_volt_info' * | xargs -i@ sed -i
's/amdsmi_dev_get_od_volt_info/amdsmi_get_gpu_od_volt_info/g' @

Change-Id: Icd8658509b28523b7c04f8d2c53efb82689e294b
2023-05-11 10:59:11 -04:00