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

1558 Коммитов

Автор SHA1 Сообщение Дата
Galantsev, Dmitrii 88d5e011e6 SWDEV-424983 - Fix supported metrics api checks
Change-Id: I5c95bb3057dd7546036cbd87bbf7025469d2b3d5
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-10-30 17:28:59 -04:00
Maisam Arif 17ec594543 Parser & Command args cleanup
Change-Id: I015acc429acc6172845667fafb8f706d0a83bec1
Signed-off-by: Maisam Arif <maisarif@amd.com>
2023-10-27 19:31:07 -04:00
Maisam Arif 2b4637ff9f SWDEV-410051 - Updates to board_info struct & CLI
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I8735d8965140ee5da0c35106b388af1dca87ec71
2023-10-27 16:52:56 -05:00
Maisam Arif 741839d8e4 Type & import clean-up
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Ie09b583a0eb930afc429904e84fe46433ef33b3b
2023-10-27 17:48:43 -04:00
Maisam Arif 6d59e9b71d Fixed firmware version from int to hex
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Ie09c5b14f108f1eb5c3fd60fe37fb731173a9478
2023-10-27 17:48:27 -04:00
Charis Poag 57b6135e54 Partition EBUSY with RSMI_STATUS_BUSY & invalid GPU Metrics check
* Updates:
   - [API/CLI] rsmi_dev_*_partition_set &
     rsmi_dev_*_partition_reset - exposed RSMI_STATUS_BUSY for
     EBUSY writes + cleaned up accidental map insertions
     (maplookup[] can insert values that are not in the map,
     map.at(key) fixes this potential issue)
   - [API] rsmi_dev_gpu_metrics_info_get() - returns
     RSMI_STATUS_NOT_SUPPORTED for unsupported metric tables
     outside of 1v1/1v2/1v3
   - [API] writeDevInfoStr() - exposes RSMI_STATUS_BUSY for
     EBUSY write errors; kept backward compatibility
     for other writes which do not care about these states
   - [API] rsmi_dev_od_volt_info_get()
      & rsmi_dev_od_volt_curve_regions_get() have better logging
     + Expose more details on why they are erroring
   - [Utils/logs/example] Expose AMD GPU gfx target version to aid in
     system troubleshooting
   - [Utils] Added test methods that look at od volt
     freq & regions into here - for easier access across
     several tests
   - [Utils] Updated getRSMIStatusString(new argument - fullstatus;
     default to true for backwards compatibility)
     -> true shows shortened RSMI STATUS response
   - [Utils] Added splitString to cut out noisy return responses
     (used in getRSMIStatusString(), when fullstatus = true)
   - [Utils] Added getFileCreationDate() to expose build date
     of the library - helpful for local builds or experimental builds
   - [Utils] Macro cleanup
   - [Example] Added a few gpu_metric checks - helpful for upcoming
     updates
   - [Device] SYSFS/DebugFS - now have better r/w displayed in logs
   - [LOGS] Expose library build date - see above for details
   - [Tests] Add more warnings/errors to test builds
   - [Tests] Moved up Partition tests for ordered test runs - helped
     identify issues with GPU BUSY writes
   - [Tests] compute_partition_read_write - handles RSMI_STATUS_BUSY
     with waits for busy status found & cleaned up how we checked
     for partition changes - with RSMI responses exposed more clearly
   - [Tests] perf_determinism - multi gpu now properly runs through
     with full resets as needed
   - [Tests] volt_freq_curv_read - better error handling with more
     verbose output

Change-Id: Ie94c6abb6a9aab95c345996d3ad3843cf6734977
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
2023-10-27 14:52:02 -04:00
guanyu12 b30304aca0 Merge amd-dev into amd-master 20231026
Signed-off-by: guanyu12 <guanyu12@amd.com>
Change-Id: Ib2aee67ad342022e202258fcc881082fee49e60f
2023-10-26 14:44:39 +08:00
Galantsev, Dmitrii 336ef57ed8 CMake - Configure __version__ for python scripts
Change-Id: I646dc27b5dc93e8dde38ff09ae9c826dfc7faaa7
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-10-25 18:03:18 -05:00
Galantsev, Dmitrii 2b603be71b README - Add argcomplete instructions
Change-Id: I76a35e38735e71cd30ba62a177bed53300b63515
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-10-24 12:48:37 -04:00
Maisam Arif d6abcfa92d Enabled amd-smi auto completion using argcomplete
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I0ea48b1b3a10e738d1fe91db85bc61ad51b85de2
2023-10-24 12:39:12 -04:00
Étienne Mollier 1775ae4b8d CMake - Set rocm_smi64 soversion to 1
Upstream soversion is at 5 for a while, but Debian's soversion has been set to
 1 in the beginning of the rocm-smi-lib package.  This is probably erroneous,
 and the library should probably be better off being synchronized with upstream
 so there is some kind of ABI compatibility between the two distributions.
 .
 FIXME: please use upstream soversion next time an ABI breakage justifies an
 SOVERSION bump, instead of just incrementing the present version by one.
Author: Étienne Mollier <emollier@debian.org>
Forwarded: not-needed
Last-Update: 2023-09-17

Change-Id: I6c4d28bd26889359c0b83c474d5ae58a81741cf4
Co-authored-by: Étienne Mollier <emollier@debian.org>
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-10-23 16:41:26 -05:00
Étienne Mollier c4c19e7917 CMake - do not enforce -fPIE.
When built with LTO enabled, the linking of liboam.so chokes on the
following error, which is somewhat similar to the Debian bug #1030876
affecting PA-RISC, although the symptoms subtly differs in that it
suggests to build using -fPIC:

	/usr/bin/ld: /tmp/cc0wF8Kx.ltrans0.ltrans.o: relocation R_X86_64_PC32 against symbol `_ZTVSt9exception@@GLIBCXX_3.4' can not be used when making a shared object; recompile with -fPIC

The -fPIC argument is passed appropriately down to the build command,
however it looks to be erased by the late introduction of -fPIE flag
by upstream build system.  Erasing this flag allows the build to go
through, both with LTO and on PA-RISC.

Bug: https://github.com/RadeonOpenCompute/rocm_smi_lib/issues/111
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1015653
Change-Id: I8b35fd4b62cfa1a9ddb145362464df5dd276e2f5
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-10-23 16:37:37 -05:00
Galantsev, Dmitrii 1cf05dd9c7 CMake - Prevent failure to build on non-amd64 targets
Change-Id: Ifaa59fb672ea01c07cffea6cd2429bec15a5deaf
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>

Co-authored-by: Étienne Mollier <emollier@debian.org>
Change-Id: Ia691ab1db0061f04662e10e112da4b9ef06c4256
2023-10-23 16:36:17 -05:00
Galantsev, Dmitrii 275108f5b9 README - Clean-up cli readme
Change-Id: I665cc5a48a240f0d2289439a4877c9f667b19851
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-10-23 13:17:04 -05:00
Maxime Chambonnet 8cfcb51550 Updated README.md with standard Markdown tables, cleaned a bit header levels.
Change-Id: Ibd6e382413d7667a5a823ac69620a2cfb7046bc5
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-10-23 13:11:18 -05:00
Maisam Arif dcb59e049e Merge "Merge amd-dev into amd-master 20231018" into amd-master 2023-10-18 19:19:01 -04:00
Maisam Arif 486fea67e7 Merge amd-dev into amd-master 20231018
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I5ab16f5d121a62e23ab7bb6922a8c7782c070372
2023-10-18 18:07:21 -05:00
Maisam Arif 29afbbcbe7 Fixed Compute & Memory Parition CLI error
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Ic36d567f9a97ceb7930653692b6c5fd60814ac38
2023-10-18 17:58:02 -05:00
Sam Wu 1de63ce506 Update rocm-docs
Change-Id: I30633c9cd29bc58b0c48086d5f493204f3d6ffd8
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-10-18 14:09:26 -05:00
Galantsev, Dmitrii a465946017 Merge amd-dev into amd-master 20231017
Change-Id: I6cecdcc1126566866be2b4daf70688cfc23f618b
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-10-17 13:54:28 -05:00
Maisam Arif a1b2fb5e0e Added set & reset --power-cap
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I9fa6378cfcdb2ad9f8406c51d885209605330627
2023-10-17 02:50:22 -05:00
Maisam Arif fc025797a0 Fixed ras error output formatting
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I7fb4d13ee7d72e2e5e95c10c19491b879df07f33
2023-10-17 02:42:01 -05:00
Galantsev, Dmitrii 9cf8daaf56 Merge amd-dev into amd-master 20231016
Change-Id: Icef827628b3398fb2d70587db2446e47ca36fff6
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-10-16 21:24:53 -05:00
Maisam Arif 6ec87b6a23 CLI Fixes & ESMI import handling
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I08e66d2bdbe37064fd73f42eeb9199f1e3bc3404
2023-10-16 19:29:17 -05:00
Maisam Arif 5018a57b62 Updated READMEs & Versioning for 6.0 Release
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Idadece3c1022ecba4291b96ddbe23112e27394de
2023-10-16 16:57:49 -05:00
Maisam Arif 6d4d706f08 CLI help text clean up
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I46d8071f2bb38f3a6e366b436e7451116bfb6df9
2023-10-16 16:52:47 -05:00
Maisam Arif ec24a0f66d Enabled events subcommand to non-virtual systems
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Ied56ef015bba606b1bca1a1108a237d0c1cc7fdb
2023-10-16 16:52:47 -05:00
Maisam Arif 5405615062 Fixed set & reset parser no argument handling
Change-Id: If8161059810a9a4fc7845eb4ffd6d3dbd0e8df64
Signed-off-by: Maisam Arif <maisarif@amd.com>
2023-10-16 16:52:47 -05:00
Deepak Mewar 806652a697 esmi python wrappers for amdsmi python library
Change-Id: I51be2e4ce76f1e99820c50d4722de4e5deb87ceb
2023-10-16 17:49:27 -04:00
Deepak Mewar e6d82912e3 Added another set of esmi python wrappers for
amdsmi python library

Change-Id: Ib49efe21d4909c3e4a011eddcd96f587a9b6570c
2023-10-16 17:49:21 -04:00
Galantsev, Dmitrii 8568af65ff CMAKE - Generate ESMI wrapper
The wrapper is only generated if ENABLE_ESMI_LIB option is set.
./update_wrapper.sh will check the option if cmake was ran first.

Change-Id: I6267cdba8c6ecdff58ced75a2aa59afae964446c
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-10-16 16:49:00 -05:00
Galantsev, Dmitrii df4f5e8bf8 Merge rocmsmi/amd-staging into amd-dev 20231016
Change-Id: I137171162a64af4960d82336cc517c1b34a870f3
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-10-16 14:31:13 -05:00
Galantsev, Dmitrii 8333ffc640 ESMI - Clean-up example code
Change-Id: Iacd150209d4695a39de39bd5633293d3e040ff4b
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-10-16 15:06:10 -04:00
Suma Hegde abad3305a1 amdsmi_esmi_intg_example.cc: Fix compilation warnings
remove unused variables, fix uninitialized variables

Change-Id: Ia0b529d3bb0ec8c541bcf1abd8b06d4237d593e8
2023-10-16 15:06:02 -04:00
Suma Hegde 597fb00bef esmi: Clone open-source esmi repo as part of build
1. Remove esmi (internal gerrit) repo as git submodule
2. Clone esmi (open-source) repo during cmake using "git clone"
3. Download amd_hsmp.h header file during cmake build

TODO:
We can update the amd_hsmp.h to mainline linux kernel repo after
next Linux kernel release.

Change-Id: I763b5e287e24337c8e9e25f4e421cdb8698b9322
2023-10-16 15:06:02 -04:00
Maisam Arif 2468a6039c Adjusting cli exception handling
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I37f44f0d07a8d1fc65e6109edf9b4cf7f30695a9
Signed-off-by: Maisam Arif <maisarif@amd.com>
2023-10-16 08:52:41 -04:00
Maisam Arif ddc63db14c Added custom help formatters for subparsers
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Ib7209ad7188733fa2492cde302f5c82c9c9bfa42
2023-10-16 08:51:43 -04:00
Maisam Arif a0c2735343 Added memory & compute partitions to cli tool
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I0db6e2b9e3ae2e19397a012e095173ec550c1e42
2023-10-16 08:50:38 -04:00
Maisam Arif 2076b2a736 Fixed ecc_correction_schema call in python interface
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I16e2bf566342a8272c07f30b8db4df4acb9c3649
2023-10-13 21:31:17 -05:00
Maisam Arif 1f8d9cb9ef Added memory & compute partitions to amd-smi lib
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: If3acea6ad281298f1f05785b2e6d8e70fae8d89b
2023-10-13 21:47:59 -04:00
Charis Poag 6f1afd2678 bdfid fix for partition & xgmi nodes
* Updates:
    - [API] After discovering all amd gpus, we now properly
      map correct bdf (xgmi nodes). Especially important for
      partition changes - aka secondary nodes.
    - [API] While adding new secondary nodes we now have
      better grouping -> due to resorting based on
      kfd properties list & matching to primary uniqueid
    - [API] All secondary nodes are now AddToDeviceList
      with correct bdf (location id), provided by kfd
    - [API] Modified AddToDeviceList(..., uint64_t bdfid):
      providing an optional field - bdfid. This allows working
      around primary pcie cards with xgmi nodes
    - [API] Utils - cpplint minor fixes
    - [Example] Removed all endl references w/ newline, fixed
      spacing, and some incorrect values displaying as hex
      (needed dec representation)
    - [API] kfd node functions - now print full path of file
      for trace logs
    - [Tests] power_read.cc: Added in generic power test to
      confirm guaranteeing specific return values

Change-Id: I143474e8d64c4915a966e789be6bcea4fa7f4472
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
2023-10-13 20:14:39 -05:00
Deepak Mewar ee890c5060 esmi: remove energy reporting, fix errors from clang compiler
Clang compiler reporting errors while generating python wrappers for esmi lib

Change-Id: I62352aba3b87f9a6b044c97af6b9fd649612b622
2023-10-13 14:45:25 -04:00
Maisam Arif c7726bde3d Fixed spacing in amd-smi tool output
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I83cb040b81a4d3653417ba7399160eb81e95ce33
2023-10-13 12:07:01 -04:00
Deepak Mewar 1f0f5ab63f build issue fix with sample test code
Change-Id: I03890879253f1be74311cf613a9baad55d197f75
2023-10-13 08:17:43 -04:00
Maisam Arif de892bab69 Add yaml as dependency for Ubuntu
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Ie3da877522acbf320feac4d9d34fb9344d40f339
2023-10-13 02:20:48 -04:00
Maisam Arif d72f9cca1b Updated wrapper generation
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I2af5704ce62c7d58a13cbc51dcca92f3d35fc07a
2023-10-13 01:19:40 -05:00
Maisam Arif f0e6f34bfe Updated interface & wrapper to work with ras_feature
Change-Id: Iadd8c5e736f4dad2662dda2c9587454f00197474
Signed-off-by: Maisam Arif <maisarif@amd.com>
2023-10-13 02:06:14 -04:00
Bill(Shuzhou) Liu d92d4e4b38 Add new API for RAS related information
The API to get the EEPROM version and ECC schema.

Change-Id: Iee6b3c555541a33bf16bf9ac1fd60100dfff5643
2023-10-13 02:06:14 -04:00
Galantsev, Dmitrii 2a7589a065 TESTS - Skip XGMI test
Change-Id: Idd9f505f36fac4a670e5129f835aa051b5c4c9fa
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-10-12 21:27:55 -05:00
Galantsev, Dmitrii 69c35a4cff CMAKE - Fix amdsmi lib version
This allows for lib version to change

before: libamd_smi.so.1.0
after:  libamd_smi.so.23.4

Change-Id: Iaba991afac4e625d11df2bacdf6287c6f8bf5383
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
2023-10-12 22:13:30 -04:00