614 Коммитов

Автор SHA1 Сообщение Дата
Bill(Shuzhou) Liu 9869516963 Support PCIe vendor name
Add the support for PCIe vendor name.

Change-Id: Ibc1d289a08731e4c5a14f992f3b0d31b51482396


[ROCm/amdsmi commit: 9021ef96dc]
2023-08-28 16:46:43 -05:00
Maisam Arif 39aedec916 Added mi300 market names & change tabs to spaces
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Ic0f363b888c9f19397fa84d2b26698b3881682b2


[ROCm/amdsmi commit: f4d25d7ba3]
2023-08-28 15:53:57 -05:00
Bill(Shuzhou) Liu 914dee641d Numa affinity shows large number
Change the affinity from unsigned int to integer to represent -1.

Change-Id: I82dc6f476b45fa4ec03a3c686fe8e6e2b7761b56


[ROCm/amdsmi commit: 471fbfddc1]
2023-08-25 09:01:08 -04:00
Galantsev, Dmitrii 413698396a Merge remote-tracking branch 'rocmsmi/amd-staging' into amd-dev
Change-Id: I9c38b4facd472b877d1ad133f3176a023c890955
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 936719eeb6]
2023-08-23 16:04:15 -05:00
Charis Poag d0ea73d2a2 Error handling for unset freqs
Sending RSMI_STATUS_UNEXPECTED_DATA for drivers
which do not set some clock freqs

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


[ROCm/amdsmi commit: f191c2753c]
2023-08-23 10:44:57 -05:00
Bill(Shuzhou) Liu 05b5ef35b3 Fallback to kfd node when VRAM sysfs not available
The driver may not expose VRAM sysfs in certain system. Add a
fallback to it.

Change-Id: Ib3be71b4f4d2c79318d5026b0a97f3657d8a97b6


[ROCm/amdsmi commit: a10f00bf57]
2023-08-17 14:36:03 -05:00
Charis Poag 8915ef543c [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>


[ROCm/amdsmi commit: 755e14dbad]
2023-08-10 19:53:38 -04:00
Oliveira, Daniel 8b4e4ac01e Fix rsmitstReadWrite.TestPowerReadWrite test failure
Code changes related to the following:
  * All reinforcement work moved to their own files
  * Self contained changes only to support them
  * New files added to CMakeLists.txt

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


[ROCm/amdsmi commit: cc5ab079df]
2023-08-09 21:51:05 -05:00
Maisam Arif 7cd10f2082 Added workaround for inconsistent current pcie speed from gpumetrics
Change-Id: If8404d21341cd15eb4d0221ab92cb0b351bbdf3e
Signed-off-by: Maisam Arif <maisarif@amd.com>


[ROCm/amdsmi commit: b14da692eb]
2023-08-09 11:35:35 -05:00
Maisam Arif e2a1fed08c Added Gen type to pcie info
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Icaa050a6f53fad608ed0353b2a0cbea33dee1dd2
Signed-off-by: Maisam Arif <maisarif@amd.com>


[ROCm/amdsmi commit: 82ac307f9b]
2023-08-02 23:42:48 -05:00
Charis Poag 65c425c77f [lib] Enhance Logger: gpu_metrics + enable console out
* Updates:
    - Env variable RSMI_LOGGING=0 or any other value
        -> all logging off
    - Env variable RSMI_LOGGING=1 -> logs only
    - Env variable RSMI_LOGGING=2 -> console only
    - Env variable RSMI_LOGGING=3 -> both logs + console
    - Metrics output includes hexdump of current file
      and decoded metrics (functions: logHexDump
      and log_gpu_metrics)
    - System info gathered, now includes if system's
      perceived endianness - little or big endian
      helpful for viewing decoded hexdump or any
      binary translation
    - Added templates for printing unsigned hex
      (print_unsigned_hex_and_int), unsigned integers
      (print_unsigned_int), and printing both unsigned
      hex and int with an optional header
      (print_unsigned_hex_and_int)
    - Fixed some build compile warnings/errors -
      ex. doing strncpys for sku or board names
      this operation is expected and needed
      and for temp file writes if unsuccessful
      we now properly send RSMI_STATUS_FILE_ERROR
    - Fixed on RHEL 8.8/9.x logrotate does not properly
      initialize

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


[ROCm/amdsmi commit: 9c7eed7edc]
2023-08-01 21:46:19 -05:00
Maisam Arif 9edae52b03 Updated Clock minimum values
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Ia4c34eca18077c595248ac34afed1b844a1be727


[ROCm/amdsmi commit: 27388c6208]
2023-08-01 14:28:45 -04:00
Maisam Arif 9a98e0e317 Updated Versioning
corrected to amd-smi version from rocm-smi version
	Added newline characters in the gpu choices
	Updated cli versioning to 23.2.1.0 to match amd-smi

Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Ia6db3a281e2349e05a09209bdcfdfa5ac48e3a86


[ROCm/amdsmi commit: ca59a60a9a]
2023-08-01 14:28:27 -04:00
Maisam Arif 294b2df38f ASIC serial updates
Corrected asic serial fallback to use rsmi's unique id
	Removed product serial due to duplication

Change-Id: Ib4e9ac00d2bf31ccbc35060bc84f7e79e5332d37
Signed-off-by: Maisam Arif <maisarif@amd.com>


[ROCm/amdsmi commit: d705801adf]
2023-08-01 14:28:19 -04:00
Bill(Shuzhou) Liu 14752945c0 Crash when ecc count sysfile cannot be read
Replace assert with error handling code.

Change-Id: I6500ae4d38a8caea87828aa7d76373d20c8354c7


[ROCm/amdsmi commit: 0522439ac2]
2023-07-31 08:36:53 -05:00
Deepak Mewar 263a9fb6f4 esmi library integration update v1.0
1. new class files for cpu socket and cpu core created
2. wrapper API's for getting energy monitoring, system
   statistics, power monitoring values implemented
3. modified amdsmi init & cleanup functions for esmi lib support
4. modified amdsmi system class for esmi lib support
5. sample test code created in example dir

Change-Id: Ic41f31641c283a681de696bb4346b557265bad42


[ROCm/amdsmi commit: 8a9771b225]
2023-07-27 17:29:27 -05:00
Marko Oblak 49f5f98560 SWDEV-413516 - [AMDSMI][Linux][BM] Changed mapping pcie speed from pcie type
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com>
Change-Id: I5bcee99ec596bb831465d5a4e98a78681c24b20f


[ROCm/amdsmi commit: e0b84c5d1f]
2023-07-27 16:21:24 -05:00
Marko Oblak cff0c1374e SWDEV-412839 - PCIe speed - change in mapping
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com>
Change-Id: If75530a8b2e1647d2cb31733decfba3837dac7bf


[ROCm/amdsmi commit: f9ce3925a4]
2023-07-27 16:21:24 -05:00
Maisam Arif 6d0f19bbd3 Make vbios optional in amd-smi
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I61d54ea8a01112818df9f431f319533f1bc36f27


[ROCm/amdsmi commit: 261de2ceab]
2023-07-24 16:11:19 -05:00
Bill(Shuzhou) Liu 4d4f8a4f8c Change API to get the driver date
Support the driver date from libdrm.

Change-Id: I88e694732b538220e11fdb4029712bb5a6f44380


[ROCm/amdsmi commit: 55bf9cbe13]
2023-07-21 08:28:06 -05:00
Oliveira, Daniel bec2ebc893 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>


[ROCm/amdsmi commit: 573620f586]
2023-07-18 16:17:33 -05:00
Galantsev, Dmitrii 77d8364211 Fix sys and id tests
The following read tests were failing:
*.TestIdInfoRead
*.TestSysInfoRead

1. *.TestIdInfoRead failed because rsmi_dev_brand_get did not specify
   dependency on vbios_version.

2. *.TestSysInfoRead failed because the test didn't expect vbios_version to
   be missing. Which is a new behavior in Aqua Vanjaram.

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


[ROCm/amdsmi commit: 8fe848d10e]
2023-07-17 15:52:23 -04:00
Tom Rix 830de53e50 Improve handling of ContructBDFID errors
Building on this package on Fedora reports this warning
In file included from rpmbuild/BUILD/rocm_smi_lib-rocm-5.5.1/src/rocm_smi_main.cc:62:
In member function 'amd::smi::Device::set_bdfid(unsigned long)',
    inlined from 'amd::smi::RocmSMI::Initialize(unsigned long)' at rpmbuild/BUILD/rocm_smi_lib-rocm-5.5.1/src/rocm_smi_main.cc:330:27:
rpmbuild/BUILD/rocm_smi_lib-rocm-5.5.1/include/rocm_smi/rocm_smi_device.h:199:42: warning: 'bdfid' may be used uninitialized [-Wmaybe-uninitialized]
  199 |     void set_bdfid(uint64_t val) {bdfid_ = val;}
      |                                   ~~~~~~~^~~~~
rpmbuild/BUILD/rocm_smi_lib-rocm-5.5.1/src/rocm_smi_main.cc: In member function 'amd::smi::RocmSMI::Initialize(unsigned long)':
rpmbuild/BUILD/rocm_smi_lib-rocm-5.5.1/src/rocm_smi_main.cc:324:12: note: 'bdfid' was declared here
  324 |   uint64_t bdfid;
      |            ^~~~~

Only set the bdfid when it is know to be valid.

Signed-off-by: Tom Rix <trix@redhat.com>
Change-Id: I839b4d2d2d4e3b25469cf5972245b9630da00c87


[ROCm/amdsmi commit: 19c3e2aff9]
2023-06-30 00:16:44 -04:00
Bill(Shuzhou) Liu a2d80150c6 Crash if no hwmon sysfs
Return NOT_SUPPORTED if no hwmon sysfs.

Change-Id: I01356a21f004ab552ca6ef7ffb49934bfdfd5e31


[ROCm/amdsmi commit: 910bf677a9]
2023-06-26 08:00:32 -05:00
Suma Hegde 18c5ae7414 add esmi src and inc paths to CMakeLists.txt
Amd-smi functions will be calling esmi functions.
Hence we need to include esmi source and include files

Change-Id: Icea0553ab76da64b89aebbf2423f26e0dd4fee65


[ROCm/amdsmi commit: a51a5d76e0]
2023-06-26 02:35:50 -04:00
Marko Oblak a255ac2a38 SWDEV-392359 - [AMDSMI] [Linux] [Guest] Documented unsupported APIs
Signed-off-by: Marko Oblak <Marko.Oblak@amd.com>
Change-Id: I0cff925082e6bc637e4b5073df64445380b3a3f5


[ROCm/amdsmi commit: 01474ff14e]
2023-06-21 13:18:32 +02:00
Bill(Shuzhou) Liu 2540d432cc SWDEV-405668 - BDF difference between amdsmi and rocmsmi
The render node discovery is changed to match rocm-smi index.

Change-Id: I707d0844b377304f4e8fc15035902c707805c2dc


[ROCm/amdsmi commit: 8f26e881fb]
2023-06-16 17:06:00 -04:00
Bill(Shuzhou) Liu f6b66b7661 Expand showpids to provide more details
Provide details of GPU usage by an application.

Change-Id: I0f36df7d358754c2c8a60432b736d98f667ee99c


[ROCm/amdsmi commit: d9b6af7a09]
2023-06-16 08:52:18 -04:00
Nikola Veljkovic 6419d75809 SWDEV-404225 Add support for Navi32 deviceIDs
Change-Id: Ibfe7c8f4cf04243c3e4e5754c1eaa3253d4d5be4
Signed-off-by: Nikola Veljkovic <Nikola.Veljkovic@amd.com>


[ROCm/amdsmi commit: b3d3b4c38d]
2023-06-09 10:42:00 -04:00
Maisam Arif a3ec450571 Cleaned up APIs
Change-Id: I93487e01d7126bdfa77439b571df927a6af3bb70
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>


[ROCm/amdsmi commit: 9cebc93cee]
2023-06-07 10:48:37 -04:00
Dalibor Stanisavljevic 7fcee0d34b Align header changes with other platforms
Change-Id: I366e57310e0504855692626e2b2014bea235ed6b
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: 8dbc1d7d57]
2023-06-02 12:28:09 +02:00
Galantsev, Dmitrii fb3672e29b Fix memset compile warning
Change-Id: If31210f3c6038e56f43ae8631ed1657d1509488e
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>


[ROCm/amdsmi commit: 2048f8978f]
2023-05-31 21:54:32 -04:00
Sam Wu 505a8bc3c4 add configurations for sphinx documentation
Change-Id: I5672348aab0f20d0bfc4dd1efcfecdf4324342d6


[ROCm/amdsmi commit: c5e06b4040]
2023-05-30 16:08:54 -06:00
Bill(Shuzhou) Liu 58962bb075 Clean up the APIs
Remove and rename APIs after review.

Change-Id: I5464f200eb605b366673f8abca95183c3837843b


[ROCm/amdsmi commit: 62ce965409]
2023-05-30 16:08:54 -04:00
Bill(Shuzhou) Liu 4c8f64224e Fallback to gpu_metrics if the sysfs is not available
The gpu_metrics may have required PCI link width and speed.

Change-Id: I939d733f5f6a71088545ba042345eb1b6ad20ee5


[ROCm/amdsmi commit: a6467c4083]
2023-05-24 14:51:43 -05:00
Maisam Arif 66f933eeb3 SWDEV-399063 - Fixed process metrics showing incorrectly for all gpus
Change-Id: I4ae576f34472c3dbbfa0b136f55ce996834323ad
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>


[ROCm/amdsmi commit: 6b8fe4a377]
2023-05-23 10:25:05 -05:00
Dalibor Stanisavljevic d95be94e51 SWDEV-384793 - Clean up API
Change-Id: I441b315d32df59a454e06d521e5ca8b2c229451a
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: 1bc1d431d8]
2023-05-19 16:40:26 +02:00
Charis Poag 14b2f93d48 [SWDEV-398070] Adding logging to ROCm SMI (by default off)
Updates:
    * [rocm-smi] Provide a thread-safe logging feature
    * [rocm-smi] Adding logrotation into install/upgrade/remove
      scripts
    * [rocm-smi] Updated cmake lists to include rocm_smi_logger
    * [rocm-smi] Updated DEB/RPM install/remove logging file &
      folder with all users having r/w privledges for
      /var/log/rocm_smi_lib/ROCm-SMI-lib.log
    * [rocm-smi] Added ability to do a glob search for multiple files
      (globFileExists), assists doing file searches with * strings
    * [rocm-smi] Added ability to log system details when RSMI_LOGGING
      is turned on (getSystemDetails())
    * [rocm-smi] Added logging to provide which ROCm API is being called
      when RSMI_LOGGING is on
    * [rocm-smi] Added logging to provide SYSFS path and read value,
      when RSMI_LOGGING is on. Provides error reponse on failure.
    * [rocm-smi] Added logging to provide SYSFS path and read value,
      when RSMI_LOGGING is on. Provides error reponse on failure.
    * [rocm-smi] Added environment variable RSMI_LOGGING to control
      when logging is enabled or disabled. By default, by not
      setting this env. variable, logging is turned off. When
      setting RSMI_LOGGING=<any value>, logging is enabled
      which is placed in /var/log/rocm_smi_lib/ROCm-SMI-lib.log file.
      Setting RSMI_LOGGING is allowed in both debug and release builds.
    * [rocm-smi] Removed an initialize procedure which keeps
      debug_inf_loop. Seems this feature is not being used.

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


[ROCm/amdsmi commit: c3a095a180]
2023-05-17 21:18:52 -05:00
Dalibor Stanisavljevic c76586e482 SWDEV-384797 - Renamed measure to info
Change-Id: I2397ed189fe0171ed29bd6440f8fa0bb210b95a5
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>


[ROCm/amdsmi commit: ca7f965018]
2023-05-17 05:10:58 -04:00
Suma Hegde 90607682ef Renamed APIs
amdsmi_dev_open_supported_func_iterator -> amdsmi_open_supported_func_iterator
amdsmi_dev_open_supported_variant_iterator -> amdsmi_open_supported_variant_iterator
amdsmi_dev_close_supported_func_iterator -> amdsmi_close_supported_func_iterator

Change-Id: Ie9b2efa5aee7095c3c835b91de1951df6b065510


[ROCm/amdsmi commit: edd8f1ae23]
2023-05-11 11:01:37 -04:00
Suma Hegde 19262e1fd8 Renamed API amdsmi_dev_reset_xgmi_error
amdsmi_dev_reset_xgmi_error -> amdsmi_reset_gpu_xgmi_error

grep -rli 'amdsmi_dev_reset_xgmi_error' * | xargs -i@ sed -i
's/amdsmi_dev_reset_xgmi_error/amdsmi_reset_gpu_xgmi_error/g' @

Change-Id: Ic7e4c4b345fdf6187aed42d53fb7ae8536c2edea


[ROCm/amdsmi commit: 6256bf6f1a]
2023-05-11 11:01:25 -04:00
Suma Hegde 13c55d85fe Renamed amd_smi_device.h to amd_smi_processor.h
Change-Id: I9f3cd8b29e4b5e9e552faeb7e977d7a1002abd65


[ROCm/amdsmi commit: a8acfbf8ff]
2023-05-11 11:01:14 -04:00
Suma Hegde 0be5a5fb82 Renamed APIs
amdsmi_dev_get_gpu_ecc_status -> amdsmi_get_gpu_ecc_status
amdsmi_dev_get_gpu_ecc_enabled -> amdsmi_get_gpu_ecc_enabled
amdsmi_dev_get_gpu_ecc_count -> amdsmi_get_gpu_ecc_count

Change-Id: I84e6489f82bae115e1a13c9e4fce8029888ca379


[ROCm/amdsmi commit: d9ba131f73]
2023-05-11 11:00:59 -04:00
Deepak Mewar e0d2d9b909 Renamed APIs
1) amdsmi_dev_set_overdrive_level to amdsmi_set_gpu_overdrive_level
2) amdsmi_dev_set_overdrive_level_v1 to amdsmi_set_gpu_overdrive_level_v1

grep -rli 'amdsmi_dev_set_overdrive_level' * | xargs -i@ sed -i
's/amdsmi_dev_set_overdrive_level/amdsmi_set_gpu_overdrive_level/g' @

Change-Id: Id6934e5b0962c9262cca041bdfdf02c60f69573b


[ROCm/amdsmi commit: e687a72235]
2023-05-11 11:00:45 -04:00
Deepak Mewar 9d23ac40c6 Renamed API amdsmi_dev_get_od_volt_curve_regions
to amdsmi_get_gpu_od_volt_curve_regions

grep -rli 'amdsmi_dev_get_od_volt_curve_regions' * | xargs -i@ sed -i
's/amdsmi_dev_get_od_volt_curve_regions/amdsmi_get_gpu_od_volt_curve_regions/g' @

Change-Id: I4b390c2d5173ca919c4ab5b1173a4fc40e2a0015


[ROCm/amdsmi commit: ced22230c4]
2023-05-11 11:00:33 -04:00
Deepak Mewar a970cea1b0 Renamed API amdsmi_dev_set_od_volt_info
to amdsmi_set_gpu_od_volt_info

grep -rli 'amdsmi_dev_set_od_volt_info' * | xargs -i@ sed -i
's/amdsmi_dev_set_od_volt_info/amdsmi_set_gpu_od_volt_info/g' @

Change-Id: I2364f9f555c010e1022e2c946a65b72fcf3d2233


[ROCm/amdsmi commit: 467f3e3bb7]
2023-05-11 10:59:51 -04:00
Deepak Mewar 19d30f71bd Renamed API amdsmi_dev_set_od_clk_info
to amdsmi_set_gpu_od_clk_info

grep -rli 'amdsmi_dev_set_od_clk_info' * | xargs -i@ sed -i
's/amdsmi_dev_set_od_clk_info/amdsmi_set_gpu_od_clk_info/g' @

Change-Id: I0f1fd5a80322a544f7d25e09146c9e52b82091f6


[ROCm/amdsmi commit: a72e1ec91d]
2023-05-11 10:59:25 -04:00
Deepak Mewar cd81fa970d Renamed API amdsmi_dev_get_od_volt_info
to amdsmi_get_gpu_od_volt_info

grep -rli 'amdsmi_dev_get_od_volt_info' * | xargs -i@ sed -i
's/amdsmi_dev_get_od_volt_info/amdsmi_get_gpu_od_volt_info/g' @

Change-Id: Icd8658509b28523b7c04f8d2c53efb82689e294b


[ROCm/amdsmi commit: 2bd94db02c]
2023-05-11 10:59:11 -04:00
Deepak Mewar 6229bac89b Renamed API amdsmi_dev_get_overdrive_level
to amdsmi_get_gpu_overdrive_level

grep -rli 'amdsmi_dev_get_overdrive_level' * | xargs -i@ sed -i
's/amdsmi_dev_get_overdrive_level/amdsmi_get_gpu_overdrive_level/g' @

Change-Id: Id33a4544a2f2fd9d77de601addcf4e45d09d65d1


[ROCm/amdsmi commit: 78ce4979e1]
2023-05-11 10:59:00 -04:00
Deepak Mewar f9e0851070 Renamed API amdsmi_dev_xgmi_error_status
to amdsmi_gpu_xgmi_error_status

grep -rli 'amdsmi_dev_xgmi_error_status' * | xargs -i@ sed -i
's/amdsmi_dev_xgmi_error_status/amdsmi_gpu_xgmi_error_status/g' @

Change-Id: I0d2338f0e924da5d69d280fdd988c2a6f9fe4ace


[ROCm/amdsmi commit: d83dc2b005]
2023-05-11 10:58:49 -04:00