Граф коммитов

1013 Коммитов

Автор SHA1 Сообщение Дата
Bill(Shuzhou) Liu 5a6b5d2a0a Use the same mutex as rocm-smi
Share the same mutex as rocm-smi implementation. Handle the crash
when a user is not in render group.

Change-Id: I486b26569f9b523b41bbdaf95d51f4a730978cfd
2024-01-15 13:12:49 -05:00
Charis Poag d74be3120e Fix AMD-SMI test segmentation fault TestGpuMetricsRead
Issue: need to return on any failure.
The nullptr check test would segfault without-
all values in struct are not initialized.

Signed-off-by: Charis Poag <Charis.Poag@amd.com>
Change-Id: I4987fb73ba9bcb182de7a439a4286333a41bf7eb
2024-01-14 19:27:34 -06:00
Galantsev, Dmitrii a60f5d2d4c SWDEV-409184 - Exclude some tests in VM
Change-Id: Ic196a113426fc63a0b2aadfa04ab4b10ed6434e3
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2024-01-11 01:38:15 -06:00
Bill(Shuzhou) Liu 9dd24a2b5a Add the ROCm version in CLI
Print the ROCm version in CLI

Change-Id: I529201274e114bde44722aa9a6aec13c2bedecf7
2024-01-04 15:25:08 -06:00
khashaik 1c90b1dea7 amdsmi_cli: Fix issue in static cpu to fetch only smu fw version when smu is pased as option
- Fix issue in static cpu to fetch only smu fw version or prototype whne smu or prototype is
    passed as option

Change-Id: Idec3b4e571ae576d1f71df74fa9a5befea5a1585
2023-12-21 00:34:18 -05:00
khashaik cdf31b8d6a amdsmi: Interface: Add units to the cpu related interfaces.
Change-Id: I294439c345a3e4ca399eb6b3f53eb1f18777180a
2023-12-21 00:09:23 -05:00
Charis Poag 5ff5af0b5a Fix GPU metric tests & cleanup test output
- CLI: Added average_power to display if current_power is empty
    - CLI: fixed PCIe current_speed not displaying GT/s
    - ROCm API: 1.3 & 1.4
                -> commented out setting avg clocks to current clock value
(leave as max uint value, not re-assign; these are not same values)
                    -> commented out setting current_socket_power = average_power
(leave as max uint value, not re-assign; these are not same values)
                    -> For all non-array clocks, placed value in first
                        array[0] to keep outputs consistent
                    (helps xcd calc)
      - ROCm API: rsmi_dev_metrics_curr_gfxclk_get fixed to count
        XCDs using backwards compatible rsmi_dev_gpu_metrics_info_get.
      - ^ Fixes XCD count overall + assigning clock[0] in 1.3 to curr
        freq
      - AMD SMI API: amdsmi_get_gpu_metrics_info() initialized all new
        1.5 metric values for all lower metric tables
      - AMD SMI API: wrapper -> fix is here + returns correct AMD SMI return
      - AMD SMI API: wrapper -> now displays amdsmi return status as
        string in logs
      - gpu_metrics_read.cc -> now has better overview of backwards
        compatible output
      - gpu_metrics_read.cc -> Cleaned up output, added units, and
        display all array output

Signed-off-by: Charis Poag <Charis.Poag@amd.com>
Change-Id: Id5b60ded5b0ed2cdf0f96ca72c79e356f0410960
2023-12-19 14:18:15 -05:00
Naveen Krishna Chatradhi 19030e5b72 amdsmi_cli: Add support for CPU specific API in amdsmi_cli tool
- Add support for only CPU if only the hsmp driver is driver is present.
  - Add support for both the amdgpu and amdcpu's if both the amdgpu driver and cpu's are present.
  - Add support for socket power metrics
  - Add support for hsmp proto type version, prochot status, read current fclkmclk freq
    and current cclk freq limit, c0 residency, lclk dpm level range, socket frequency range
  - Add CPU socket current frequency limit.
  - Update tool for API's IO bandwidth, XGMI bandwidth,
    power telemetry rails, APB enable and APB disable API's
  - Add support set_pow_limit, set_xgmi_link_width, set_lclk_dpm_level, core_boost_limit,
    curr_active_freq_core_limit, set_soc_boost_limit and set_core_boost_limit.
  - Add support for the following cpu related API's in tool
    core_energy, socket energy, set power efficiency mode, ddr bandwidth,
    cpu temperature, dimm temperature range rate, dimm power consumption
    and dimm thermal temperature.
  - Add support for set_gmi3_link_width, set_pcie_lnk_rate, set_df_pstate_range

Change-Id: I5a35d1cceeb7df0bc8b7116df7c27bb7f376e839
2023-12-18 06:31:49 -05:00
Naveen Krishna Chatradhi 94d3c563a3 amdsmi: py-interface: Add python interface for esmi api
Change-Id: I4a3ab1168a7d1bf011ecc9c508e111c281503520
2023-12-18 06:31:35 -05:00
Naveen Krishna Chatradhi 65eed73f4d amd-smi: fix cpu specific apis and header
1. provide prototype and documentation for esmi specific api.
   define structures and update classes as required
2. update cmake files as required and add esmi api to the
   amdsmi esmi integration example.

Change-Id: I753ec176f9b381e74c9646525dfd9075237bf8d9
2023-12-18 06:28:15 -05:00
Charis Poag 8f3861e1d9 Add vcn and jpeg activity
Changes:
    - Add new engine field vcn_activity (from 1.4/1.5
      gpu_metrics
    - Updated log output to enhance view of gpu_metric
      data as json pretty print
    - Added new fields provided in 1.5
    - Added unit overview in python API, CLI is WIP

Signed-off-by: Charis Poag <Charis.Poag@amd.com>
Change-Id: I7d9f29e7ecc35dcd0697814c222cdd02b0d5518e
2023-12-15 22:18:46 -05:00
Maisam Arif 498fde5cf4 SWDEV-437729 - Post install script fixes for pip & pyyaml
Change-Id: If5c4a7947764a0cb5717c906198436304fa62784
Signed-off-by: Maisam Arif <maisarif@amd.com>
2023-12-15 13:34:56 -06:00
Maisam Arif 16ed186760 SWDEV-436531 - Changed human readable topology output to tables
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I104ff21f650ea7fd6804d3b60da9b1feddb2a701
2023-12-14 22:32:12 -05:00
Bill(Shuzhou) Liu 59b510de2b Support max_num_cu_shared and num_cache_instance
Add above fields for cache info. Remove driver_date in CLI and
Remove the disable properties of cache.

Change-Id: I80672490908d9e32a149076cc37459fa56b8b0bf
2023-12-14 09:59:35 -05:00
Maisam Arif e9a6153836 Fix imports for partition API's
Change-Id: Ic3bc0230405ee5e662bfd2d5c6d0ed5bca42a671
2023-12-13 23:52:54 -06:00
Maisam Arif f91fc97fed SWDEV-413122 - Initial Monitor subcommand
Change-Id: Iaeaef77efeaa4289b19f1f676dcae6245f0e0c9e
2023-12-13 23:43:43 -06:00
Galantsev, Dmitrii 45dc83f81d SWDEV-436561 - Add CODEOWNERS
Change-Id: Id8c5e9bbbf92dc028fa1f66a7de5b3ab4fe4ab2a
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-12-12 11:41:12 -06:00
Bill(Shuzhou) Liu de7e74f7db Collect compute partition devices under the same socket
The socket represents a physical device, and the partition devices
should belong to the socket. The partition devices are only
different in function id in BDF. Use the BD part of the BDF to
identify a socket.

Change-Id: I5d355a6f5db02faa7555b760a36c7351b8d8d835
2023-11-29 08:23:23 -06:00
Maisam Arif b54086a037 Change xgmi_physical_id to oam_id
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I35fb36ec0e9f72a7135d8bb9070dbdc0e956b93a
2023-11-22 12:16:38 -06:00
Maisam Arif c2f3d87ee4 Added lowercase parsing for --loglevel level
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I52c53fc65eb05ea4e2c69157a87545ce5b6199a0
2023-11-22 11:01:12 -05:00
Maisam Arif 5b36b438b7 Refactor gpu_metrics usage in CLI
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I599878971ab94a768d008f046f2d303ad76fdb3b
2023-11-22 03:32:55 -06:00
Maisam Arif d790ebc62b Refactor gpu_metrics usage in libraries
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I763638d4b546bf49b234e823df81028c357e8f49
2023-11-22 03:32:15 -06:00
Maisam Arif 02d310e525 Merge rocmsmi/amd-staging into amd-dev 20231121
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I5cc6accced971479583954e0b93cd90c510ca814
Signed-off-by: Maisam Arif <maisarif@amd.com>
2023-11-22 03:31:35 -06:00
Galantsev, Dmitrii 4022889701 SWDEV-423944 - Clean-up un/install scripts
Change-Id: Ib16935ca456f889dc8d1280a37693858afa82715
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-11-20 13:09:09 -05:00
Bill(Shuzhou) Liu ac1ba33371 Add APIs for PM table and register table
Read the PM table and register table as the name value pair.

Change-Id: Ie44fe67a28af3341bd6beb90d809e90f280351ac
2023-11-20 12:31:18 -05:00
Deepak Mewar baa2c94a86 Added AMDSMI_CHECK_INIT to esmi library wrappers
Change-Id: Id187a9152399cdefec21a0d310bdb78f593426af
2023-11-14 11:58:18 -05:00
Maisam Arif 6441abdc1a SWDEV-425887 - Corrected vbios population
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I3728064c77fae8cfa006254769a2cc821b4d5362
2023-11-14 11:56:43 -05:00
Maisam Arif 545e57d3e3 SWDEV-426130 - Updated firmware subcommand output
Corrected truncation
	corrected xgmi to ta_xgmi
	remapped smc(system management controller) to pm(power
management)

Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I404cefa7b90a454d4f4b08f6490448b47cf32107
2023-11-14 11:56:43 -05:00
Sam Wu 2ef675b9db SWDEV-425457 - Correct typo in link to ESMI Library README
Change-Id: Ia16ba0175b0cd3d4a38bab71eb0f1281878d81d2
2023-11-10 18:23:53 -05:00
Deepak Mewar 0c790752ac modified local esmi functions called from amdsmi_init
for gtest compatibility

Change-Id: I627c9887a1f1e340c358f060818a1a7d74ce33f9
2023-11-10 15:50:42 -05:00
Deepak Mewar 14c50c9b4e another set of esmi python wrappers updated to amdsmi python library
Change-Id: I33557b9021ecfdab76daaf65ad63f624115aa322
2023-11-10 15:50:42 -05:00
Maisam Arif 695d4ee065 Correct pyyaml package dependency
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Iea055d6af87b465060b0ca8c95f855d101143241
2023-11-09 16:16:44 -06:00
Maisam Arif e0a1a6ca96 Fixed python3 lib install for DEB & RPM
Upgraded python3-yaml into a dependency; needed for cli
	Added checks before uninstalling amdsmi system
	Made argcomplete activation only for installing user
	Corrected returns outside of function to exit
	Removed returns if python3 library install fails

Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I299dc01e07029b255a3469fd63fdc8ffec943828
2023-11-09 00:17:44 -06:00
Bill(Shuzhou) Liu 18d6484c67 Sort GPU index using BDF
Sort GPU index based on BDF.

Change-Id: I921fc72e534665bd14b9a45a747f72b24f5ba641
2023-11-08 08:58:15 -05:00
Deepak Mewar d4f053b527 Updated another set of esmi python wrappers to amdsmi python library
Change-Id: Ie8b1aacfd0e7923cf608b0f03f48874b16e5aa0d
2023-11-07 07:28:48 -05:00
Maisam Arif a8efefaef6 Merge "Merge rocmsmi/amd-staging into amd-dev 20231103-1" into amd-dev 2023-11-07 04:02:00 -05:00
Maisam Arif 5dba2f3120 Updated License Dates
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Id6fd66b03c602232ecc1a063a534a15fe3a03f56
2023-11-07 03:57:08 -05:00
Galantsev, Dmitrii 9cab8c035f Merge rocmsmi/amd-staging into amd-dev 20231103-1
Change-Id: I82540740892b31232dc9902022b34001ef5b542c
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-11-03 17:58:30 -05:00
Galantsev, Dmitrii a099f0682a Fix issues introduced in 57b6135e54
- std=c++.. is not required because CMAKE_CXX_STANDARD is set
- nullptr check breaks the test because we rely on nullptr as an api for
  checking feature availability.
- enum number setting is unnecessary

Change-Id: I393e6dd3f292b7fa4198302f140c0443ba5e50f5
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-11-03 17:54:35 -05:00
Deepak Mewar 6d46e20598 Updated esmi python wrappers to amdsmi python library
Change-Id: Icf2576926d3649929d2aa580b476a013204daf95
2023-11-03 04:58:19 -04:00
Maisam Arif 9bfebc6f1c Handle GPU Not detected
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I988b0dddde23b83c1a8e402233b6aa08ce55d0c7
2023-11-03 04:58:11 -04:00
Galantsev, Dmitrii fc02ebc5f2 DOCS - Fix 'failed to reach any of the inventories'
Change-Id: I7edd1fad17bd0f3e0946a6712410cf6549afc729
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-11-03 03:59:48 -04:00
Galantsev, Dmitrii 1010787865 CMake - Bump version
Change-Id: Idc3c07b5f37309d03b46df7a6400793bc8953f61
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-11-03 03:57:35 -04:00
Galantsev, Dmitrii 513dd8a445 Merge rocmsmi/amd-staging into amd-dev 20231103
Change-Id: Ie70ab54a63b25649b6b9d30620c5546dc66cd766
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-11-03 02:55:02 -05:00
Galantsev, Dmitrii 7d629c5959 CMake - Bump version
Change-Id: Ibe62c0059262bcb9937ae856b796392b1fe362a0
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-11-02 18:26:00 -05:00
Maisam Arif f061aa4be5 SWDEV-425457 - Updated Sphinx docs to include ESMI
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Ie7669c9f94703e5c5cdc65314cbf30e8b587d0f1
2023-11-02 17:39:56 -04:00
Maisam Arif 8b0b0490d1 SWDEV-403153 - Fixed eeprom hex casting
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I46531bd9ae60947539d4b95e5b21c7008ec0b3ea
2023-11-02 15:34:06 -04:00
Maisam Arif 312732aa8a SWDEV-426130 - Fixed Decimal Firmwares & Readme
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I850105561be91a2c2581106371af9fab1fd8fa98
2023-11-02 15:34:06 -04:00
Galantsev, Dmitrii 874d8edb3d Remove absolute link to libamd_smi.so
Also modify README to include:
  export PATH="$PATH:/opt/rocm/bin"

Change-Id: Ib4513d61fd3e6b23cc789491c11d83e6a6de947a
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-11-02 14:31:58 -05:00
Galantsev, Dmitrii 08268ba1c1 Don't crash [un]install scripts on python failure
Change-Id: Icfbcc647bda94dd2ff2f65016de5c80af5d1ec79
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-11-02 15:15:27 -04:00