コミットグラフ

1558 コミット

作成者 SHA1 メッセージ 日付
Bill(Shuzhou) Liu 58c83eb379 Increase the max BDF ID length
Increase the max length from 256 to 512.

Change-Id: I3114f7ce6852aafa9dfec0186f27c1121c939c69
2023-03-29 10:04:28 -04:00
Bill(Shuzhou) Liu 0c82a9d577 Correct subsystem name by matching device id.
The rsmi_dev_subsystem_name_get() only matches subvendor id and
subdevice id for a vendor. The change will also match device id.

Change-Id: Ife3aedaf6fc7390ed7fa62edbde40c2340689b23
2023-03-28 15:48:31 -05:00
Hao Zhou 6e6d85b5c7 Merge amd-staging into amd-master 20230324
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: I1d92078484e61a63518896fe2e6e7badf4919fa1
2023-03-24 13:21:28 +08:00
AravindanC 689d58d2c9 SWDEV-351540 - ASAN packaging for amd-smi
Change-Id: I5f0bf5330727e11159db87c2814904a2832df385
2023-03-23 10:40:10 -07:00
Galantsev, Dmitrii e45938905f Merge amd-dev into amd-master 20230322
Change-Id: If3ad37b45e0e639af2bba10608e74331068234e7
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-03-22 08:26:55 -05:00
Galantsev, Dmitrii e92afab18e CLI: Remove python dependency
Python is no longer used for generating any CLI files

Change-Id: I70dff5d86df9a179f99b32630dada9e92391eaaa
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-03-22 08:14:53 -05:00
Galantsev, Dmitrii 4951f3a15c Merge amd-dev into amd-master 20230321
Change-Id: Ia2fdf41a9106c26130dd6be1994f757403add73d
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-03-21 19:46:30 -05:00
Galantsev, Dmitrii adceb8033d CLI: Make compatible with python3.6
Wrapper generation is still only compatible with python3.7 and above

Change-Id: I33cdc3925cd3fab80c9ce5f4540e1a981a5cc1f0
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-03-21 17:09:55 -05:00
Galantsev, Dmitrii 7d8cca660f Merge amd-dev into amd-master 20230320
Change-Id: Ia62c1bb990a1e6aa07fd0534c0ed3119e6bed5e3
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-03-20 21:30:52 -05:00
Galantsev, Dmitrii 87b9faf926 CMake: Replace .whl with libexec install
Generating .whl has proved to be difficult with AMD CI.
Switch to directly installing python projects instead.

Change-Id: I8a4c2fe22fc872865bba7da3a3386513efd5269a
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-03-20 21:24:39 -05:00
AravindanC 778f3b7fdc SWDEV-351540 - ASAN packaging for rocm_smi_lib
Change-Id: Iab354d02d261a0270a3d118b825835fc6f021c15
2023-03-20 13:14:53 -07:00
Maisam Arif 235c8db949 AMDSMI CLI Initial Packaging
- Added CMake packaging to the amdsmi_cli folder
- Updated Headings in the README.md to follow markdown standard
- Updated Compatibility to be based on the built package name in bin
- Added misc error handling and import corrections
- Updated py-interface amdsmi_exception imports to work by relative path
- Cleaned up py-interface cmake & generator code for finding libamd_smi.so
- Changed line endings in tools/generator.py file to unix

Change-Id: I91858ff3dd0cb57ed9b8cd61a0ada27b6af9c51c
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
2023-03-20 10:50:21 -05:00
Maisam Arif aa70b77ec5 AMDSMI_CLI version 0.0.1
Change-Id: I0b02ddf1cc22753635062475cccadcc235e3a603
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
2023-03-20 08:51:35 -05:00
Charis Poag f44d1ea8bc [SWDEV-387906] Fix rocm-smi initialize crash
Fix was needed due to hwmon updates.
Several voltage sensors (ex. vddgfx/vddnb)
are unsupported or not applicable
to upcoming hardware. This was not the case
for previous hardware sensors, resulting in
the rocm-smi crash observed.

Change-Id: Ib8593e10811638def26fc7a1eda29309e328db09
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
2023-03-17 15:04:34 -05:00
Hao Zhou f9c676536b Merge amd-staging into amd-master 20230317
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: I502e2467dcbbe918561ee730d0df1fdab5c01a61
2023-03-17 12:12:10 +08:00
Galantsev, Dmitrii 74479187d0 Improve python wrapper generation
- Add "BUILD_PACKAGE" option that is OFF by default (CI issues)

- Optionally package wrapper if python3.7 or above is present (hack for CI)
- Optionally build wrapper if clang is present (hack for CI)
- Improve dependency resolution for wrapper
- Use python venv
- Use pyproject.toml instead of setup.py
- Use CMake install path to search for libamd_smi.so
- Move python-specific CMakeLists into py-interface
- Search for libamd_smi.so more aggressively

Change-Id: Ie7dad676b0d4a5f58ad2b887db7fecf5b1297e3b
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-03-16 09:13:56 -05:00
Dalibor Stanisavljevic 3af2687f17 SWDEV-387561 - Fixed market name
In case there is no device id to map to the corresponding market_name,
the rsmi_dev_brand_get function is used to retrieve the market_name

Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
Change-Id: I565089d34b2b7e5f714e0dd41062ac8d52095835
2023-03-15 12:54:14 +01:00
Bill(Shuzhou) Liu 1b7eb4e1f4 Fix cppcheck static analysis report warning
Fix some warning from static anaysis tool.

Change-Id: I7e8c2f5d6f79aff5fdcad81b1fd832900f213c47
2023-03-13 09:27:19 -05:00
Ranjith Ramakrishnan 14b86107a7 SWDEV-366831 - Compile time flag to switch between #warning and #error message
Using backward compatibility paths will provide an #error message. Compile time option added to enable/disable the #error message.
Disabling the same will provide a #warning message

Change-Id: Ib49633501aa6eb6d97158b1ecfc47de6f18fba85
2023-03-10 08:56:45 -08:00
Bill(Shuzhou) Liu ad3b7d9f0d amdsmitst crash when read ECC counter
If the amdsmi is fail to read ECC counter from sysfs file, it
still assumes the data is read into vector, which causes crash.

Add the check to make sure the data is read into the vector.

Change-Id: Ia24331ee6e75408120248b0ed7bc58581a2f23ad
2023-03-08 09:13:04 -05:00
Bill(Shuzhou) Liu 710649ab66 Filter out the GPUs not assigned to a container in showpid
The process ids of other container are still visible in the sysfs file,
filter it out to prevent crash.

Change-Id: I665912cd09c606804186aff8cba5c24f5e58ded7
2023-03-06 11:05:02 -06:00
Marko Oblak d1325fcf40 SWDEV-379772 - [Navi32] [SMI-LIB] [Linux] [BM] [Guest] Wrong market name
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com>
Change-Id: I12d3e650851a3aa474ccbf62628b60d4c385e68c
2023-03-06 17:08:33 +01:00
Hao Zhou f579cd684a Merge amd-staging into amd-master 20230303
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: I489eeb6b3d6cbb713e1da8be02371fcff3831a96
2023-03-03 10:46:06 +08:00
Charis Poag c252ecccd1 [SWDEV-335697 + SWDEV-342812] Fix NPS & Compute tests
Updates:
    * Fixed rsmi_dev_compute_partition_get
      & rsmi_dev_nps_mode_get to properly check
      for invalid arguments
    * Updated compute partition & NPS mode tests
      - Now properly confirms the invalid
        argument is seen
      - Spacing for multiple devices is added
        to better see distinction between
        separate device's tests (for verbose output)
      - Changed expect to assert calls, so errors
        are observed faster for test failures
      - Fixed multiple device testing where a
        variable should have been unset, but
        having multiple devices caused it to
        set
      - Updated multiple device testing to iterate
        accross all devices (previously returned,
        instead of continuing checking support
        after RSMI_STATUS_NOT_SUPPORTED detected)
      - Fixed a few spelling errors & verbose output

Change-Id: Ieba9e5b46763c6cd880fbf27fcdf58be8ecbc683
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
2023-03-02 13:24:38 -06:00
Marko Oblak 8429df989c SWDEV-371210 - [AMDSMI][LinuxBM] SMILIB returns wrong pcie speed value
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com>
Change-Id: Ie3ca6997f11d18505df799fef9cd9d53716d53f9
2023-02-28 11:49:20 +01: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
Dalibor Stanisavljevic 7b176fc2df SWDEV-380736 - Adjusted ouput for amdsmi_get_vram_usage
Change-Id: I6a2cd2353a0c3fafc3a3690098a1e279ecd30378
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2023-02-24 14:47:07 +01:00
Hao Zhou befdbaa9a8 Merge amd-staging into amd-master 20230224
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: I5907cf268e6ba6c98d8e7b47467d42dbc6202ca4
2023-02-24 09:16:32 +08:00
Marko Oblak b43b6e71c2 SWDEV-384518 - [AMDSMI] [Navi32] [Linux] [BM] [Guest] Fixed RAS enabled Python interface
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com>
Change-Id: Iacdb57ddc63ea3e7ce5c19506577487ab18c0c89
2023-02-23 15:51:45 +01:00
Marko Oblak 7eea4e596b SWDEV-384678 - Resolve issue with amdsmi build failure
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com>
Change-Id: I073113814d2f6740c9eaea1b298d8aff9ea58c72
2023-02-22 11:00:57 +01:00
Bill(Shuzhou) Liu b40933b895 Use Unified Changelog Template
The CHANGELOG.md is added to track changes.

Change-Id: I33547cb7f1596b4b8abf206aebdd664649d4d19f
2023-02-21 14:27:55 -06:00
Marko Oblak 0aadf7eab2 SWDEV-373291 - Added implementation of versioning solution
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com>
Change-Id: Ifd0be3f81902466339b6c098ce16d5e49740056c
2023-02-21 17:37:54 +01:00
Marko Oblak db9d8793be SWDEV-381227 - [AMDSMI][Linux][BM] SMILIB returns wrong temperature value
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com>
Change-Id: Idc9929d1cfd882bb33abf040378587f68d22b31a
2023-02-21 17:21:15 +01: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
Galantsev, Dmitrii 3bed2b7b8f Improve Debian packaging recommendation
See: https://cmake.org/cmake/help/latest/cpack_gen/deb.html#variable:CPACK_DEBIAN_PACKAGE_RECOMMENDS

Change-Id: I945cbf2104d108caf0ee6e2e963ecfca9a6320e0
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-02-16 14:40:40 -06: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
Bill(Shuzhou) Liu 00a6c78a51 Dispaly printable device name
Fallback to other methods if the device name in sysfs is not printable.

Change-Id: I20b22950399d4a515d2688b955248a3de3c61d05
2023-02-10 11:32:46 -05:00
Ranjith Ramakrishnan 02141a7f1d SWDEV-366831 - File reorg backward compatibility message changed to #error
Change-Id: I3d3b220b31f42140eab5404df790a130d2c238c4
2023-02-08 14:25: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 e79a230f92 Merge amd-staging into amd-master 20230130
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: Ia1a0eadf0e37a684badaf66a8ac61ec58ced9f40
2023-01-30 13:20:29 +08:00
Harish Kasiviswanathan 142dcfa8f4 Don't depend on vbios_version sysfs file
On APU's vbios_version string might not be exposed. Relying on vendor ID
to detect AMDGPU is sufficient

Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Change-Id: I08ef4b4bc7491a40f318791803aeaf261f7fac25
2023-01-29 21:31:13 -05:00
Dalibor Stanisavljevic c469c3d505 SWDEV-375213 - Renamed gpu_device to gpudevice for amdsmi_get_power_cap_info
Change-Id: I8518587f35e4ce897317a09505435eee7a8f81f8
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2023-01-26 14:11:26 +01:00
Dalibor Stanisavljevic ff553cdb56 SWDEV-375213 - Separate smi from rocm part inside functions
Change-Id: I81d2e9d02794ac017a74b3273c6f5a8c85b042a0
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2023-01-26 07:28:53 -05:00
Dalibor Stanisavljevic 08bcaee3e2 SWDEV-373295 - Updated python interface
Change-Id: I882179d97a4f522deb0e8b9cdbff85d9b23471ab
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2023-01-25 14:21:24 +01:00
Dalibor Stanisavljevic 411ef54087 SWDEV-375113 - Fixed process info
The format of the fdinfo file has changed

Change-Id: Iad2e26487e75f3e614e364456e929aa1f6f949a4
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2023-01-23 08:13:55 -05:00
Dalibor Stanisavljevic cf7a92f383 SWDEV-373282 - Fixed compiler warnings
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
Change-Id: Ieacf1057ad23f9a31d47a6d1199c90d8fa0d12db
2023-01-23 03:37:29 -05:00
Dalibor Stanisavljevic a926f42599 SWDEV-373295 - Added power_limit field in python api
Change-Id: Ie81e78eb9930fb0d8132ee9f119e291afbcad84f
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
2023-01-23 03:36:00 -05:00