20 Commit

Autore SHA1 Messaggio Data
systems-assistant[bot] 857e5ef3ce chore: unset executable permission (#213)
Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Co-authored-by: systems-assistant[bot] <systems-assistant[bot]@users.noreply.github.com>
Co-authored-by: Maisam Arif <Maisam.Arif@amd.com>
2025-09-16 11:06:54 -05:00
Peter Park 5a3556ca85 update copyright years to 2025
revert shared_mutex.h


[ROCm/rocm_smi_lib commit: a156bfa4ae]
2025-06-03 17:16:54 -05:00
Harkirat Gill 8596afd618 Add cstdint header for gcc-15 compatibility
Common C++ headers (like <memory>) in GCC 15.0.0 (combined with libstdc++) don't transitively include uint64_t anymore.

Minimal reproducer: https://godbolt.org/z/dqGbnG8bY

Porting: https://github.com/ROCm/rocm_smi_lib/pull/198
Closes: https://github.com/ROCm/rocm_smi_lib/issues/191

Change-Id: I2786e968c107a78104c43c4c474b7f65eaf88c0a


[ROCm/rocm_smi_lib commit: c61ab4fa28]
2024-09-23 15:05:07 -04:00
Galantsev, Dmitrii 9da052436a Cleanup rocm_smi.cc
Change-Id: Ia676c237222b0dd5d9e8a054a93776f3b11e2225
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/rocm_smi_lib commit: 4aef767596]
2023-09-07 15:50:40 -04:00
Charis Poag 99bc3fb502 [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>


[ROCm/rocm_smi_lib commit: c3a095a180]
2023-05-17 21:18:52 -05:00
Charis Poag 3ab5bb3230 SWDEV-342812- Add NPS support
Updates:
    * Added rsmi_dev_nps_mode_set and rsmi_dev_nps_mode_get
    * Added ability to set multiple SYSFS files in debug build
    * Added ability to see user's env variables set for debug build
    * Added tests for rsmi_dev_nps_mode_set and rsmi_dev_nps_mode_get
    * Added ability to restart AMD GPU driver, used in nps_mode_set
    * Updated ROCm_SMI_Manual.pdf to include new APIs
    * Added progress bar for long running python_smi_tools, used
      in setting nps_mode if runs longer than .1 seconds

Change-Id: I6d61bedd28d7cba6aff432ad2d127ba741b7d15a
Signed-off-by: Charis Poag <Charis.Poag@amd.com>


[ROCm/rocm_smi_lib commit: 9ef376cd61]
2023-02-14 11:54:24 -06:00
Divya Shikre 853a6e517c Add DEBUG_LOG macro
Add DEBUG_LOG that will optionally print error
message when RSMI_DEBUG_BITFIELD is set to 2.

Signed-off-by: Divya Shikre <DivyaUday.Shikre@amd.com>
Change-Id: I6017e92d8a9e5f9861ae29ece0488d4bc198f996


[ROCm/rocm_smi_lib commit: 99be3451d7]
2022-05-11 11:03:24 -04:00
Chris Freehill e202097fb0 Don't use hwmon# as indicator of gpu
Previously, during the rsmi_init discovery process, the existence
of an hwmon# directory was used to distinguish between gpus nodes
and non-gpu nodes. This isn't reliable in some scenarios. Instead,
the existence of the vbios_version file is used as an
indicator that the node is indeed a gpu.

Change-Id: Icfbe5c42ed0970077b05f25c3d209308a31bec85


[ROCm/rocm_smi_lib commit: ff9546aa62]
2021-01-29 13:05:10 -05:00
Chris Freehill 185ebc2f07 Introduce RSMI_DEBUG_INFINITE_LOOP
The environment variable RSMI_DEBUG_INFINITE_LOOP is introduced
to facilitate debugging RSMI in user applications. When this
env. variable is non-zero, an infinite loop will be entered in
rsmi_init(). At this point, a debugger can be attached and RSMI
can be debugger. This only applies to debug builds.

Change-Id: I23f6dd730fc965764295070de053314a1cc5b6aa


[ROCm/rocm_smi_lib commit: 68095b50e7]
2021-01-06 10:30:24 -05:00
Chris Freehill b662e7ce51 Correct usage of bitwise &
Also, fix warning related to catch() and cpplint error.

Change-Id: I4292170538d0f700fccb605814c5058543abe74a


[ROCm/rocm_smi_lib commit: c2439d28e8]
2020-07-26 20:08:24 -05:00
Chris Freehill 001aa0b825 Fix docs + cmake_utils path issues
This corrects issues that arose after OAM reorganization.
It should address SWDEV-243294.

Also, fix some compile warnings that show up on RHEL.

Change-Id: Id14d444905da35cd7346bcfbcd82b6d0572708c4


[ROCm/rocm_smi_lib commit: c2ef9a6879]
2020-07-08 09:47:25 -05:00
Chris Freehill 98b976ef3e Refactor rsmi to support oam
Change-Id: Idc524e01ba06eb5c8d1682becaf5bf8ced5bffcf


[ROCm/rocm_smi_lib commit: 6594f8f58b]
2020-06-22 18:51:46 -05:00
Chris Freehill 17871ecb14 More general solution to api support hwmon mapping
This solution takes into account that some hwmons use
label files to map sensor types. The previous solution
did not take this into account.

Change-Id: I1d6204573cefa8197b2cfe0ffb412b545df3d80a


[ROCm/rocm_smi_lib commit: 324c0ca0e5]
2020-03-16 11:37:47 -05:00
Chris Freehill e4d918aa70 Fix segmentation fault that sometimes occurs on release builds
Fixes SWDEV-216441

Change-Id: I3ea01a4edd14000a103de751757dfaadc7d358bb


[ROCm/rocm_smi_lib commit: 0bf81ed2f9]
2020-02-24 17:17:26 -06:00
Chris Freehill 8ea817f79e Add functions that tell what capabilities are supported
The new functions added in this commit allow a caller to tell up
front what functions, function variants and monitors are
supported.

Also,
* fixed a few documentation/formatting issues
* fixed a process_info test issue

Change-Id: I2184ab1a4a6898f847e791f273e2185d556e78e9


[ROCm/rocm_smi_lib commit: 551b15182b]
2019-09-23 13:30:47 -05:00
Chris Freehill 93055a1698 Added new clock types
Also added missing error code strings and improved test output
messages


[ROCm/rocm_smi_lib commit: c77f3c0ebd]
2019-03-28 17:01:35 -05:00
Chris Freehill 011b4fc51a Documentation and volt-curve read updates
[ROCm/rocm_smi_lib commit: 68b5e2ee0d]
2019-02-22 15:05:44 -06:00
Chris Freehill 80eeb7960f Add support for reading frequency-volt curva data
[ROCm/rocm_smi_lib commit: 639a4e3503]
2019-01-07 08:44:23 -06:00
Chris Freehill cf2b565985 Add support for new performance levels
Also added tests for new performance levels and clean up some
formatting/style issues.


[ROCm/rocm_smi_lib commit: 767fa53d8c]
2018-10-25 14:13:55 -05:00
Chris Freehill 47a8ea99d1 Comment corrections, debug output and assert added
[ROCm/rocm_smi_lib commit: b2f1ee1764]
2018-10-22 17:26:38 -05:00