614 Коммитов

Автор SHA1 Сообщение Дата
Galantsev, Dmitrii 73357843fe Fix rocm_smi.cc
Change-Id: Ib074dd542d8d37a6a618e10bd3bd389ad0cef108
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 3f0071599d]
2023-10-11 11:46:49 -05:00
Maisam Arif 51f4bf1794 Corrected total ecc counts
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I48b85d6476b829604044daab420883f94551abe2


[ROCm/amdsmi commit: b46ae13011]
2023-10-10 13:23:45 -05:00
Bill(Shuzhou) Liu dc0d637136 Add support to XGMI physical id
Get XGMI physical id from sysfs.

Change-Id: Ifd9e431bc2fbfd759d888a71b99046a5eb07b6ed


[ROCm/amdsmi commit: 6ca95c1a2d]
2023-10-10 09:29:05 -04:00
Charis Poag d54164d733 Add rsmi_dev_power_get
* Updates:
  - [API] Added rsmi_dev_power_get(uint32_t dv_ind,
                                   uint64_t *power,
                                   RSMI_POWER_TYPE
                                   *type)
          provides generic get to average or
          current power & provides backwards
          compatibility
  - Added a utility function to get MonitorTypes
    (monitor_type_string(type)) &
    RSMI_POWER_TYPE (power_type_string(type))
    strings
  - [Tests] Added rsmi_dev_power_get tests and
    provided better verification of return values for
    all power APIs
  - [Tests] Updated power outputs to show correct
    units
  - [example] Now uses avg, current, and generic
    power functions with type output response

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


[ROCm/amdsmi commit: 31a1fcce7d]
2023-10-10 00:34:19 -05:00
Deepak Mewar fe29a848bc added metric table wrapper APIS & test code
Change-Id: I24207b3c32d7294337140a1f5108b81f3bf33580


[ROCm/amdsmi commit: 192fb538be]
2023-10-10 00:03:11 -04:00
Oliveira, Daniel 52f3e90525 rocm_smi_lib: Fix Modernize and refactor gpu_metrics
Adds support for 'gpu_metrics_v1_4' and new counters

Code changes related to the following:
  * rsmi gpu_metrics APIs
  * rsmi gpu_metrics Logs
  * The new gpu_metrics are now part of the Device

Build changes related to the following: None

Change-Id: Ie748e977cd0a01c6a2fb82260014c0699605dbb3
Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>


[ROCm/amdsmi commit: 4e4ebde640]
2023-10-09 21:43:22 -05:00
Maisam Arif 8a9387cdec Added memory information to Guest
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I3e6b4bba3746c9498d34e6d2840461489eb3bc61
Signed-off-by: Maisam Arif <maisarif@amd.com>


[ROCm/amdsmi commit: 02b4b67ca0]
2023-10-09 17:41:08 -05:00
Charis Poag 5d15251762 Rename NPS -> memory partition + compute partition node fix
* Updates:
        - rocm_smi_lib + CLI:
          Rename all "NPS mode" -> "memory partition"
          related files/functions/API/CLI to align with correct
          technical naming
        - rocm_smi_main: fixed identifying primary card's unique id
          utilize rsmi_dev_unique_id_get to map which
          KFD nodes belong to it
        - rsmi_dev_*_partition*: now have better logging output
        - compute partition tests:
          Added 20 sec delay for workaround until GPU
          busy is confirmed as the issue
        - CPPLint fixes/formatting
        - [Example] Moved all endl to "\n" for efficiency
        - [Example] Added Edge & Junction temperature examples
        - [Example] Added rsmi_minmax_bandwidth_get() example - WIP

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


[ROCm/amdsmi commit: b251bb0c9f]
2023-10-06 11:51:09 -04:00
Bill(Shuzhou) Liu c1a7a09f30 APIs for the cache level and size
Read the cache level and size from topoogy sysfs file.

Change-Id: Id3c558c95bcb79139a19e4adbaa7ff333d06098f


[ROCm/amdsmi commit: 1a233f93fb]
2023-10-05 11:10:54 -05:00
Bill(Shuzhou) Liu 528161560d Read PCIe slot type from sysfs
Read the PCIe slot type from sysfs instead of libdrm.

Change-Id: I9392b9e18a209ac7332f6902bcafb3b6062c86c1


[ROCm/amdsmi commit: 656f12e0f3]
2023-10-05 09:58:36 -04:00
Maisam Arif 401d3f229c Added driver_name to amdsmi_cli tool
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I8f3d52e0b23298443b2b16afec418cbbbc5f77e0


[ROCm/amdsmi commit: 572bf563d1]
2023-10-04 08:54:19 -04:00
Maisam Arif 76d025cff0 SWDEV-410230 - Added slot_type to amd-smi static --bus
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I2006a3525a8aa9091bf54501461d364f7237f00f


[ROCm/amdsmi commit: fadf1b6cc9]
2023-10-02 10:15:34 -04:00
Maisam Arif a489c16044 Adjust static --board output to be inline with Host
Change-Id: Ia6dcca5be077ef9e04533b632628a62633b63556
Signed-off-by: Maisam Arif <maisarif@amd.com>


[ROCm/amdsmi commit: b58665e77b]
2023-10-02 09:30:25 -04:00
Bill(Shuzhou) Liu 90c9c8de4e Get PCIe slot type
Add API to get the PCIe slot type.

Change-Id: If6894af53894c524d61c7586c59768541bbf0ac6


[ROCm/amdsmi commit: 9eccf20f0c]
2023-09-27 23:31:09 -04:00
Maisam Arif fb0440d493 Added sleep state to amd-smi metric --clock
Change-Id: Idb5fbc84a787ef1affdf0449b6dd77ab6e50e91d
Signed-off-by: Maisam Arif <maisarif@amd.com>


[ROCm/amdsmi commit: 95337c88fc]
2023-09-26 15:21:25 -05:00
Galantsev, Dmitrii 555ff6a653 Fix out-of-bounds array access for --showvc
get_od_clk_volt_info assumed the size of the file instead of checking
the length. This caused out-of-bounds array element access.

Change-Id: Ibda8f0c3a6d1623d48964641ae5ef610d2072e94
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 8eb9f892d3]
2023-09-26 13:59:37 -05:00
Charis Poag 6e81bbcf16 Add Current (Instant) Socket Power
* Updates:
    - rocm_smi_logger:
      General cleanup &
      Aligned to cpplint rules for usage
    - rocm_smi_monitor:
      Fixed MonitorTypes
      from not displaying properly in logs
      & Added socket power label + current
      socket power MonitorTypes
    - rocm_smi API:
      Added rsmi_dev_current_socket_power_get API
    - rocm_smi CLI:
      General cleanup,
      Concise info now displays device data
      in variable width (see printLogSpacer's
      new field),
      printLogSpacer now as an adjustable
      variable that overrides appWidth,
      Added Socket Power to base rocm-smi +
      --showpower CLI calls,
      --showpower & base rocm-smi CLI defaults
      to printing socket power (if not available,
      displays average power)
    - Cleaned up temp label references
    - power_read gtests:
      Added current socket power to testing

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


[ROCm/amdsmi commit: f078375350]
2023-09-25 01:38:54 -04:00
Galantsev, Dmitrii e9addd72cc SWDEV-422836 - Add sleep frequency support
Change-Id: I0bde403b010bf036ce44ed0600cc7eb03742c6b6
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 3d40c4bb2c]
2023-09-25 01:38:27 -04:00
Ori Messinger 0d1ac5edac ROCm SMI LIB: Add Missing Firmware Blocks
The purpose of this patch is to add the following missing firmware
blocks to the SMI LIB:
-RSMI_FW_BLOCK_MES
-RSMI_FW_BLOCK_MES_KIQ

Signed-off-by: Ori Messinger <Ori.Messinger@amd.com>
Change-Id: I5d4d37d883878dd02ef8533d4eb8891d54d70630


[ROCm/amdsmi commit: d44a6ef523]
2023-09-25 01:37:38 -04:00
Bill(Shuzhou) Liu 137fd1b628 Handle the memory frequency with only one line
Change the code to handle the memory frequency if it is only one line.

Change-Id: I09e6ee78a2b9c12c861243dc89296e4e7862da49


[ROCm/amdsmi commit: 85df5676d4]
2023-09-25 01:30:56 -04:00
Maisam Arif b6630e0200 Change uuid_info file read to uuid generation
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I77f2c6b44efd6faae3c2466989e1caeaad16669d


[ROCm/amdsmi commit: 8a9f862dbf]
2023-09-24 21:17:34 -04:00
Maisam Arif 79734a6b34 Added vram info to static --vram
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I48f6875d5131440848ef6f5875c6d385fee871e3


[ROCm/amdsmi commit: 6dcfd4a815]
2023-09-23 23:52:50 -04:00
Bill(Shuzhou) Liu e6c88b74d3 Standard format driver date
Normalize the driver date format.

Change-Id: I2f9623e99d28217b3cc1a9b6f91cbe77ed66fac9


[ROCm/amdsmi commit: 9fc677a261]
2023-09-23 23:46:43 -04:00
Galantsev, Dmitrii 43591c22cf Merge remote-tracking branch 'rocmsmi/amd-staging' into HEAD
Change-Id: I65ed7f3a0d1b6e58bc8377932d7c39db21d1b422


[ROCm/amdsmi commit: 5c41319c83]
2023-09-21 23:43:20 -05:00
Maisam Arif 8647ecfa80 Corrected voltage_read call in amdsmi_get_power_info
Change-Id: I4097b3ac5699360d4e91c8b8254431b6b6768c3e
Signed-off-by: Maisam Arif <maisarif@amd.com>


[ROCm/amdsmi commit: def17accbe]
2023-09-21 23:41:38 -05:00
Maisam Arif 0d4014c01e SWDEV-417124 - Implement Power Management
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Ib0d37038e49cec61d5415076a46a5666d95dcea2


[ROCm/amdsmi commit: e4fac177c1]
2023-09-21 14:23:26 -05:00
Oliveira, Daniel 4fd608200c rocm_smi_lib: Fix [linux BM] [AMDSMI] Memory Bandwidth
Implements APIs for 'gpu_metrics_v1_3' utilization averages

Code changes related to the following:
  * rsmi_dev_activity_metric_get()
  * rsmi_dev_activity_avg_mm_get()
  * CLI shows "Avg.Memory Bandwidth" under "--showmemuse"

Change-Id: I8e4600f350a7c18499abf022534db2b875f09d5f
Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>


[ROCm/amdsmi commit: e0483f2ee2]
2023-09-21 11:00:29 -04:00
Maisam Arif c0db1b1cb9 Merge "Return the driver loading status" into amd-dev
[ROCm/amdsmi commit: d756f5ee72]
2023-09-19 13:01:28 -04:00
Maisam Arif 0072e107bf Adjusted power limits
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I8586c4a6c9d0a6a05003013c702f88cc42d05114


[ROCm/amdsmi commit: df9e05a4b1]
2023-09-18 18:11:39 -05:00
Bill(Shuzhou) Liu ba4506639b Return the driver loading status
When init the library, it could return status whether the driver is
loaded or not.

Change-Id: Id26b8058e32881ebe2514067a639a2a871d1f252


[ROCm/amdsmi commit: f86f62b3f7]
2023-09-18 08:38:16 -05:00
Maisam Arif 35d20bcb80 Spell check bandwith to bandwidth
Change-Id: Icfb3b2398fe0590dbab6e531c8ec1cdceebe658d
Signed-off-by: Maisam Arif <maisarif@amd.com>


[ROCm/amdsmi commit: 42b030def3]
2023-09-14 18:43:49 -04:00
Galantsev, Dmitrii b2a9a2f2a6 Add errors for existing but empty dev files
Change-Id: Iad9febc50f9b8e6085f8b605249ee884d2f134d6
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: a4b470fe71]
2023-09-14 17:30:03 -04:00
Oliveira, Daniel c9f9221ebe rocm_smi_lib: Fix rocm-smi --resetfans results in Permission Denied
For operations related to:
  --resetfans
  --setfan

We report 'Not supported' for these cases instead of 'Permission denied'

Code changes related to the following:
  * rocm_smi_properties
  * rocm_smi related APIs

Change-Id: I144646efc3804fabd45cc5a46351803950b4feb7
Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>


[ROCm/amdsmi commit: 12f395e592]
2023-09-14 16:54:29 -04:00
Shuzhou Liu 0825443a75 Merge "Add API for the memory type" into amd-dev
[ROCm/amdsmi commit: ab615f6b2a]
2023-09-12 09:34:03 -04:00
Galantsev, Dmitrii aa6b00cb4d SWDEV-409184 - Fix erroneous 'not supported' when HWMON is absent
Change-Id: Ic5ff406977d962fadc709a03853dac61b5460a26
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 41ade41d84]
2023-09-11 19:34:30 -05:00
Naveen Krishna Chatradhi 37075cd685 Merge "Updated esmi error checking for graceful return" into amd-dev
[ROCm/amdsmi commit: 9a8770246a]
2023-09-11 05:36:58 -04:00
Charis Poag 3fbe3beadd Add GPU partition nodes
* Updates:
    - Fixed infinit loop on systems
      which did not have VRAM files
    - Fixed concise info from throwing exception
      with no amdgpu driver loaded
    - Fix for ability to see all nodes when
      after switching partitions (mirrors
      original card display/settings)
    - Added to logs build type, lib path,
      and set env. variables

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


[ROCm/amdsmi commit: ed6777a8e7]
2023-09-07 22:17:54 -05:00
Galantsev, Dmitrii 9e7b3ea3f6 Cleanup rocm_smi.cc
Change-Id: Ia676c237222b0dd5d9e8a054a93776f3b11e2225
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 4aef767596]
2023-09-07 15:50:40 -04:00
Bill(Shuzhou) Liu 8a4aead84b Add API for the memory type
Get the memory type from libdrm and add a new API.

Change-Id: I89327bca2ef860f2e3f4f6ca20def2331eba66c0


[ROCm/amdsmi commit: b52034fed8]
2023-09-07 13:05:58 -05:00
Deepak Mewar 9d8c10b3e5 Updated esmi error checking for graceful return
Change-Id: I1bcd498e3482dc7acd92b1a762f892b3dd978ff2


[ROCm/amdsmi commit: 14cf5f2762]
2023-09-04 08:27:12 -04:00
Galantsev, Dmitrii 7edc93a1b4 Fix temperature reads
Change-Id: Iad5e5201911f620495985591e21fc5aaae028faf
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 489991a322]
2023-08-31 18:50:58 -05:00
Dmitrii Galantsev 2aab123f47 Merge "Update amdsmi_wrapper.py and name fields" into amd-dev
[ROCm/amdsmi commit: f96c7663b5]
2023-08-30 17:30:38 -04:00
Galantsev, Dmitrii 5ac201fe42 Update amdsmi_wrapper.py and name fields
When updating the wrapper I ran into an issue with anonymous structs.
Generated wrapper would contain a string split into multiple lines,
which is invalid python.

e.g.
    'struct_struct anonymous
    (struct.... amdsmi.h:355)'

After naming the structs - the issue is gone. BDF union now has to be
addressed with .fields

e.g.
    OLD: bdf.function_number
    NEW: bdf.fields.function_number

Change-Id: Ib3c640c088ad0cc67893d636827356902051f17f
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 03cfdeefd5]
2023-08-30 16:30:03 -05:00
Oliveira, Daniel 42fb5488d2 rocm_smi_lib: Fix rocm-smi --showfan shows 'unable to detect fan'
Code changes related to the following:
  * Reverts earlier fix for the same issue
  * Check for existence of files before reading

Change-Id: I175b20c3343c414b12b79dc3fc404f53fbaabf3a
Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>


[ROCm/amdsmi commit: 328ce0150b]
2023-08-30 14:45:05 -05:00
Shuzhou Liu 68ea764b85 Merge "Support PCIe vendor name" into amd-dev
[ROCm/amdsmi commit: fc5b481124]
2023-08-30 09:58:21 -04:00
Deepak Mewar 46501e725a wrapper API to get first online core on cpu socket
Change-Id: Ia1785f94ff687e53fdb868e56d4a83c2466ba2ed


[ROCm/amdsmi commit: f1ade88d47]
2023-08-29 05:15:33 -04:00
Deepak Mewar 89d8f62fc4 Renamed esmi library APIs and bound the APIs
to cpusocket handle

Change-Id: I6e3d8aa667df475339c28b27294349843f32230c


[ROCm/amdsmi commit: 0baa3f6b6a]
2023-08-29 05:15:12 -04:00
Deepak Mewar a6b0a2c8c5 Wrapper APIs for esmi library
ddr bw monitor, temperature query, Dimm statistics, xGMI BW control,

GMI3 width control, APB and LCLK level control, BW monitor

Change-Id: I9207451fbd81cfd904a2f9c29d9c28856894cf95


[ROCm/amdsmi commit: a14237b508]
2023-08-29 05:14:52 -04:00
Deepak Mewar 180b9a55e6 Wrapper APIs and sample tests for esmi power control,
boostlimit monitor, boostlimit control, esmi error status

Change-Id: Id8db926eab2f6be386ed21081e651fcc9b389a22


[ROCm/amdsmi commit: a7d7c5c6e1]
2023-08-29 05:14:26 -04:00
Galantsev, Dmitrii 8d98bfe46d Fix uint32* -> int32* conversion error
Change-Id: I23c2a842468896e8d120ac4b8b55ef433dff6d85
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 1d24dd93a6]
2023-08-28 18:32:31 -05:00