نمودار کامیت

166 کامیت‌ها

مولف SHA1 پیام تاریخ
Hao Zhou a3eff9e2fd Merge amd-staging into amd-master 20230830
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: I41c0e3ec76a43af30f25e140f25b521a6097d125
2023-08-30 18:03:51 +08:00
Bill(Shuzhou) Liu 471fbfddc1 Numa affinity shows large number
Change the affinity from unsigned int to integer to represent -1.

Change-Id: I82dc6f476b45fa4ec03a3c686fe8e6e2b7761b56
2023-08-25 09:01:08 -04:00
Oliveira, Daniel 3602447109 rocm_smi_lib/rocm_smi.py: Fix Add 'GPU name' in rocm-smi output
Code changes related to the following:
  * rocm_smi.py

Change-Id: I600e776bf479f972b8d639ce5a658a24916aed3c
Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>
2023-08-24 13:22:24 -05:00
Oliveira, Daniel 654f65118b rocm_smi_lib/rocm_smi.py: Fix rocm-smi --resetfans shows 'permission denied'
Properly handles 'Not supported' fan cases where:
 * sysfs file (pwm#_enable) exists
 * sysfs file (pwm#_enable) does not exist

Change-Id: Ifa3c290e5ee1d27a550e94d86cd25ad8dcef3f59
Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>
2023-08-24 10:54:50 -05:00
Oliveira, Daniel f9fd6b0a96 rocm_smi_lib/rocm_smi.py: Fix rocm-smi --showfan shows 'unable to detect fan'
Properly handles 'Unable to detect' vs 'Not supported' fan cases where:
 * sysfs file (pwm#) exists, and readings report zero (0), "Unable to detect fan speed"
 * sysfs file (pwm#) does not exist, then "Not supported"

Change-Id: If4b0312c872b76647a3e54427ba2a3f3e8e6dab1
Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>
2023-08-23 20:43:08 -05:00
Hao Zhou 3921278c4e Merge amd-staging into amd-master 20230817
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: Idb8b837f8b65e3e820719f39a6f2c0c4ebc5b7f9
2023-08-17 13:27:13 +08:00
Charis Poag 755e14dbad [SWDEV-399953] Smart Temperature detection + partitioning display
* Updates:
    - Fix for devices which do not have edge sensors, but junction
    - Added partitioning (memory and dynamic) displays for
      base rocm-smi CLI calls
    - Added subheading for base rocm-smi call output
    - Added better hwmon and device detection logging

Change-Id: I8219884b2e532d6ed379527cacdc1f2b232a5451
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
2023-08-10 19:53:38 -04:00
Hao Zhou c4bc5550f7 Merge amd-staging into amd-master 20230731
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: I606526255c6120c373fe25723c698ddf3d174b17
2023-07-31 13:51:06 +08:00
Bill(Shuzhou) Liu aeb6c61f54 Change reset power error message to logging
Since the reset will continue if the reset power and current power
is the same, error may confuse the user.

Change-Id: I35b9ef17afd47b5af5bd2b8882a44f63991fe509
2023-07-27 15:18:28 -05:00
Hao Zhou d52e613adf Merge amd-staging into amd-master 20230727
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: I476516b5ce8c7a6c05d48d06acd7736141bee0dd
2023-07-27 12:11:11 +08:00
Bill(Shuzhou) Liu 80d650b95a Handle csv output when the command is not based on the device
Fix the error only one csv line can be printed out when output
is not based on device.

Change-Id: Idacc5d98acc223e932fb3d46c888bfa04778b73c
2023-07-26 15:28:18 -05:00
Maisam Arif c78ec46671 SWDEV-394316 - Handle not applicable vbios
Change-Id: I3390078a63c9a5eff67024b84a3be1369c4b1460
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
2023-07-25 16:33:22 -05:00
Hao Zhou b81fcc2c32 Merge amd-staging into amd-master 20230720
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: Ib2cb8cd0fa41f863e692dd5f92ab78ace776210c
2023-07-20 14:42:57 +08:00
Oliveira, Daniel 573620f586 Add revision to --showhw
Code changes related to the following:
  * Added 'rsmi_dev_revision_get()' related code
  * Test code
  * Functional tests

Change-Id: I8c2097c65384a028c8c8437b717d05d52fe45250
Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>
2023-07-18 16:17:33 -05:00
Bill(Shuzhou) Liu 0aeb6025bd rocm-smi --showevents shows wrong gpuID
Use the gpuid returned from the event data instead.

Change-Id: I7f286cc105f7ea12985223e603504f0ef3d9724e
2023-07-13 08:28:53 -05:00
Hao Zhou 18770368a7 Merge amd-staging into amd-master 20230710
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: I932f7e92939b6244a600c4f1bb92580aec9947ca
2023-07-10 10:19:28 +08: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
Hao Zhou 58a09f7063 Merge amd-staging into amd-master 20230625
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: Id257f743e4a45881696c053b08a245b09b3e34ad
2023-06-25 11:20:46 +08: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
Hao Zhou 741740b04b Merge amd-staging into amd-master 20230615
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: I67e22b2d06c8a9cd21aa3034bc78627d2fd0c586
2023-06-15 10:15:40 +08: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
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
Hao Zhou 255b4d122b Revert "Revert "Merge amd-staging into amd-master 20230602""
This reverts commit 5aa94c48d1.

Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: I38b7d0ca4535503bf0b9ba491de0eb747f3dd966
2023-06-07 11:56:43 +08:00
Hao Zhou 5aa94c48d1 Revert "Merge amd-staging into amd-master 20230602"
Revert submission 869878

Reason for revert: <RPM package on RHEL9.x is broken>
Reverted Changes:
I4886ef2a6:Merge amd-staging into amd-master 20230602
I0f277acf3:Revert "Revert "Merge amd-staging into amd-master ...

Change-Id: Ie370327c8db0404c9cedde42c1376e3cec56fae0
2023-06-02 02:12:07 -04:00
Hao Zhou 8560d96c81 Merge amd-staging into amd-master 20230602
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: I4886ef2a60b08e17bd9165ff0cd46b4297e15972
2023-06-02 10:11:48 +08: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
Hao Zhou ecb1303732 Merge amd-staging into amd-master 20230414
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: I518af7182bb6537c9c03a30d53c44d2143f3064f
2023-04-14 12:17:58 +08:00
Charis Poag 6be92b9e26 [SWDEV-392571] Fix concise info when missing VRAM info
Updates:
    * [rocm-smi] Added larger app width size, which helps
      display missing device info
    * [rocm-smi] Added better context when rsmi_ret_ok
      does not return with RSMI_STATUS_SUCCESS
    * [rocm-smi] Removed all references to an
      undefined function (printLogNoDev())
    * [rocm-smi] Fixed not detecting non-int
      values when setting the voltage curve
    * [rocm-smi] Added better context on missing
      sysfs file when setting clock overdrive
      values
    * [rocm-smi] Fixed getMemInfo() calls not
      referencing tuple values (making it easier
      to read)
    * [rocm-smi] Silenced concise info spitting
      out errors for missing VRAM files, instead
      display which metric is "unsupported" if
      the files are missing
    * [rocm-smi] Updated function descriptions for
      rsmi_ret_ok & getMemInfo
    * [rocm-smi] Updated getMemInfo to provide a
      quiet call, to silence for concise info calls.
      This provides a way to keep the output clean.
    * [rocm-smi-lib] Added when using debug sysfs
      files, to state, which enums are enabled
      for debug

Change-Id: I0e9e0c97ccf71467ced0e1a1f71803327a8be2b7
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
2023-04-13 15:11:35 -04:00
Hao Zhou b21fe43ec1 Merge amd-staging into amd-master 20230407
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: Icf2ea8ab76a521f31bc551b4cf644fc833765263
2023-04-07 11:06:58 +08:00
Bill(Shuzhou) Liu b6789891b0 Validate the clock frequency when set it
Add the check of the clock frequency when set it.

Change-Id: I707291bfb5007bb69100c780af50a4b0f697bb37
2023-04-06 11:54:38 -04:00
Hao Zhou c189126be6 Merge amd-staging into amd-master 20230302
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: I17c723b907c988754d2da5d04092c1d435e29cc1
2023-03-02 14:13:00 +08:00
Bill(Shuzhou) Liu fcb6afa289 mem_use_pct uninitialized error
Initialize mem_use_pct if the memory info is not available.

Change-Id: Id8e285050149c51077356826c8f99719b473060d
2023-02-27 16:47:45 -06:00
Charis Poag 0d3558945b [SWDEV-335697] Add RSMI_STATUS_SETTING_UNAVAILABLE for dynamic partition
Updates:
    * Added RSMI_STATUS_SETTING_UNAVAILABLE for
      rsmi_dev_compute_partition_set - gives users
      better error output when attempting to set
      compute partition to values not listed in
      available_compute_partition SYSFS
    * Updated python --setcomputepartition to
      provide better output when receiving
      RSMI_STATUS_SETTING_UNAVAILABLE
    * Updated all test & example files to check for
      RSMI_STATUS_SETTING_UNAVAILABLE when doing
      rsmi_dev_compute_partition_set

Change-Id: Ida5d54880d9b9b6e4a0468cdb962fdc0c18d6257
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
2023-02-27 11:17:44 -06:00
Bill(Shuzhou) Liu 55bc2e2072 Memory usage division by zero
The showAllConcise with division by zero error.

Change-Id: I469f1b9f268842cd51662be6f9036f555a8949b2
2023-02-24 10:12:36 -06:00
Hao Zhou d93a307f4b Merge amd-staging into amd-master 20230223
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: If82fc6ac361e6ef5a68ae9dfe333dd8685a02fb5
2023-02-23 18:13:38 +08:00
Charis Poag 77c950a4bf [SWDEV-381630] Add reset partition functionality
Updates:
    * Added rsmi_dev_compute_partition_reset & rsmi_dev_nps_mode_reset
    * Added --resetcomputepartition and --resetnpsmode python smi calls
    * Added temp data files rocmsmi_boot_compute_partition_<device num>
      & rocmsmi_boot_nps_mode_partition_<device num>, writes UNKNOWN
      if data cannot be read or device does not support
    * Cleaned up NPS & compute API documentation
    * Added creation and reading of API temp files (used in reset
      functionality)
    * Cleaned up output of rocm_smi_example
    * Updated rocm_smi_example to check if running with sudo permission
      before executing write API calls (cleans up erroneous output)
    * Added template specialization for storing temp data, requires
      specific rsmi_type_t enums (restrics what data can be stored)
    * Added storage of temp data, if temp files do not exist
    * Updated google tests for NPS & compute to include reset API calls

Change-Id: I69895a466b97107617e6dbb355737b84499a76c9
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
2023-02-17 12:55:08 -06:00
Hao Zhou 405dff6b64 Merge amd-staging into amd-master 20230216
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: I1a439acaf0208f9bc68ac19753c1df98ea5387ee
2023-02-16 17:04:21 +08:00
Charis Poag 9ef376cd61 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>
2023-02-14 11:54:24 -06:00
Bill(Shuzhou) Liu ae10e842af rocm-smi --showxgmierr return error instead of error counter values
The rocm-smi pass wrong arguments

Change-Id: I3a3923abdd263d4af87f3ec90670bb16afa2ef9b
2023-02-13 16:36:24 -05:00
Hao Zhou c8aace17df Merge amd-staging into amd-master 20230203
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: I0519fc50fbcb604bc548ce1883c9f57c9a3be250
2023-02-03 11:28:16 +08:00
Ori Messinger 56f9d6bfc0 ROCm SMI CLI: Fix --showproductname bug
This patch fixes a --showproductname bug, which is related to the
device's SKU. If a device with a VBIOS value that cannot be decoded
is used, that device's SKU cannot be parsed out of the VBIOS string.

Now, when the VBIOS value cannot be decoded, an error will be
printed instead of crashing with an 'UnboundLocalError' message.

Signed-off-by: Ori Messinger <Ori.Messinger@amd.com>
Change-Id: I680a182e94107e782235b8a2477ab165988f7703
2023-02-02 14:52:13 -05:00
Hao Zhou 0802602499 Merge amd-staging into amd-master 20230118
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: I3672f4919d7636f2a9521f0364e65c0dda1c2b2b
2023-01-18 09:13:06 +08:00
Charis Poag 4d7f3f2bc7 SWDEV-335697- Add support for dynamic partitioning
Original updates:
    * Added .gitignore to help with future commits
    * Updated/added copyrights on modified or added files
    * Updated rocm_smi.h/.cc
      - Added 3 new SMI API functions:
          rsmi_dev_compute_partition_set &
          rsmi_dev_compute_partition_get
      - Added helpful maps/enums used in
        new get/set compute_partition API calls
    * Updated rocm_smi.py
      - Added --showcomputepartition
      - Added --setcomputepartition
      - Fixed a few mistypes
    * Updated rsmiBindings.py - added helpful class/dict/list
    * Updated rocm_smi_example.cc
      - Added helpful MACRO to detect if api is not supported.
      - Added current_compute_partition set/get rocm lib calls
      - Added helpful macro to discover future RSMI errors
      - Commented out test_set_freq, was having permission issues
        on a Navi21
    * Updated rocm_smi_main.cc
      - Added helpful map to debug API calls, left in for future use
      - Added comment to better understand a non-class function returns
    * Added computepartition_read_write.cc/.h
      - Added get/set compute partition API test calls
      - Confirmed on devices that do not support the API calls, tests pass
    * Updated rocm_smi_test/main.cc
      - Calls new compute partition gtests

Added following updates from review feedback:
   * Updated rocm_smi.h/cc
       - Removed C++ API calls, adding support for both C/C++
         API calls could cause confusion and adds extra work for us
       - rsmi_dev_compute_partition_get -> Fixed an edge case where
         user gives a small buffer length size (smaller than data
         received), but does not receive the partial buffer back.
         google Tests are updated to reflect this find.
   * Updated rocm_smi_example.cc
       - Fixed test_set_freq, issue was that file was not writable.
         We now indicate this warning, so prior errors make sense.
       - General test code cleanup. Removed extra code,
         by creating loops for tests.
   * Updated rocm_smi_main.cc
     - Moved and got rid of an external reference to a map used
       for debugging RSMI enums, now is a const public reference.
   * Updated rocm_smi.py
     - Updated python code to identify NOT_SUPPORTED due to
       (currently) only a few GPU support the feature

Change-Id: I4a567acbb59d6771fb64df08d19175fe3604fd1b
2023-01-13 10:46:40 -05:00
Hao Zhou afa6e806e6 Merge amd-staging into amd-master 20230106
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: Ie0c9c44a7fb39ecdcd56158d501c738ceb64096c
2023-01-06 13:05:17 +08:00
Ori Messinger 5c478e9eb9 ROCm SMI CLI: Fix --showproductname bugs
This patch fixes a couple of --showproductname bugs, both of which
are related to the device's SKU.
Previously if a device with a non-standard VBIOS name was used,
fetching that device's SKU wasn't working correctly.

A standard VBIOS name should follow the following pattern:
AAA-BBBBBB-CCC
Where the middle section "BBBBBB" between the hypens is the SKU.

Now, SKU can be correctly fetched even with a non-standard VBIOS
name, and return 'unkown' if SKU does not exist.

Signed-off-by: Ori Messinger <Ori.Messinger@amd.com>
Change-Id: I5899a859c6131c6048bb31a4305ddacbac3075a9
2023-01-05 11:53:04 -05:00
Hao Zhou cd31d17736 Merge amd-staging into amd-master 20221221
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: I34a54bbf6a3b434f92fb5ca5abf699c61ab4a8a2
2022-12-21 09:03:03 +08:00
Ori Messinger 932feb6e49 ROCm SMI CLI: Add --showtempgraph Feature
The purpose of this patch is to add a new feature to the smi cli.
Use ./rocm-smi --showtempgraph to print a persistant bar graph for
each GPU's temperature.

The bar graphs refresh continuously to show current temps, and the
graphs change in a color gradient depending on the temperature.

Signed-off-by: Ori Messinger <Ori.Messinger@amd.com>
Change-Id: I98902b76c42cc7281420759f5ebe8c78f7785e66
2022-12-15 18:20:32 -05:00
Hao Zhou 34f4b63853 Merge amd-staging into amd-master 20221212
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: I555da02f58185a9eca00954755c2bfd8e418e153
2022-12-12 16:25:01 +08:00
kent.russell@amd.com 248c6f79f4 rocm_smi.py: Fix order of CE and UE reporting
We append CE then UE, but in the table right after, it goes UE then CE.
Fix the order of the table, and add capitals for consistency

Change-Id: I208f37685508ab1e2ff83d3456620bbbf3a16268
2022-12-08 12:28:37 -05:00
Hao Zhou 0f02a3a272 Merge amd-staging into amd-master 20220909
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: Ic8bbdad24b0671f6b77543daa9656f5c3662c2c8
2022-09-09 09:26:33 +08:00