Deepak Mewar
928b7e2a4d
Renamed API amdsmi_get_board_info to
...
amdsmi_get_gpu_board_info
grep -rli 'amdsmi_get_board_info' * | xargs -i@ sed -i
's/amdsmi_get_board_info/amdsmi_get_gpu_board_info/g' @
Change-Id: Ia3fb361aaf5832813e7ce41bfb88fbbf1432020b
2023-05-11 10:36:10 -04:00
Deepak Mewar
9b76d64944
Renamed API amdsmi_dev_get_pci_bandwidth to
...
amdsmi_get_gpu_pci_bandwidth
grep -rli 'amdsmi_dev_get_pci_bandwidth' * | xargs -i@ sed -i
's/amdsmi_dev_get_pci_bandwidth/amdsmi_get_gpu_pci_bandwidth/g' @
Change-Id: I43e5fc475f933b33770b6c2244232fca811c2036
2023-05-11 10:35:49 -04:00
Deepak Mewar
1f9074916f
Renamed API amdsmi_get_asic_info to
...
amdsmi_get_gpu_asic_info
grep -rli 'amdsmi_get_asic_info' * | xargs -i@ sed -i
's/amdsmi_get_asic_info/amdsmi_get_gpu_asic_info/g' @
Change-Id: I4586c7f8876eba7b8af33b5ea29afa8bacb85a9a
2023-05-11 10:35:09 -04:00
Deepak Mewar
ac1b857f24
Renamed API amdsmi_dev_get_drm_render_minor to
...
amdsmi_get_gpu_drm_render_minor
grep -rli 'amdsmi_dev_get_drm_render_minor' * | xargs -i@ sed -i
's/amdsmi_dev_get_drm_render_minor/amdsmi_get_gpu_drm_render_minor/g' @
Change-Id: Icf6a1ba28ee3ff7f1fa66bad5d600725aad0bfca
2023-05-11 10:34:01 -04:00
Deepak Mewar
82dbd07b2c
Renamed API amdsmi_dev_get_subsystem_name to
...
amdsmi_get_gpu_subsystem_name
grep -rli 'amdsmi_dev_get_subsystem_name' * | xargs -i@ sed -i
's/amdsmi_dev_get_subsystem_name/amdsmi_get_gpu_subsystem_name/g' @
Change-Id: Ib6f2b03f824e1ee910cfbbd0bab09ad859ec252b
2023-05-11 10:33:20 -04:00
Deepak Mewar
14f1367d6b
Renamed API amdsmi_dev_get_subsystem_id to
...
amdsmi_get_gpu_subsystem_id
grep -rli 'amdsmi_dev_get_subsystem_id' * | xargs -i@ sed -i
's/amdsmi_dev_get_subsystem_id/amdsmi_get_gpu_subsystem_id/g' @
Change-Id: I64616ac4c001f7761b8d83120d05d21c5c8e763f
2023-05-11 10:32:32 -04:00
Deepak Mewar
f69a6ea64e
Renamed API amdsmi_dev_get_vram_vendor to
...
amdsmi_get_gpu_vram_vendor
grep -rli 'amdsmi_dev_get_vram_vendor' * | xargs -i@ sed -i
's/amdsmi_dev_get_vram_vendor/amdsmi_get_gpu_vram_vendor/g' @
Change-Id: I3c11643a778f147027d0d3121b9782931439c752
2023-05-11 10:32:00 -04:00
Deepak Mewar
21da55b9df
Renamed API amdsmi_dev_get_vendor_name to
...
amdsmi_get_gpu_vendor_name
grep -rli 'amdsmi_dev_get_vendor_name' * | xargs -i@ sed -i
's/amdsmi_dev_get_vendor_name/amdsmi_get_gpu_vendor_name/g' @
Change-Id: Ib31c1387150d0dd268d1bd54cfb43786c7ec41c1
2023-05-11 10:31:41 -04:00
Deepak Mewar
20222f771e
Renamed API amdsmi_dev_get_id to amdsmi_get_gpu_id
...
grep -rli 'amdsmi_dev_get_id' * | xargs -i@ sed -i
's/amdsmi_dev_get_id/amdsmi_get_gpu_id/g' @
Change-Id: I78faeff9a94250454bcecfaa50b5c7cc7e04cb98
2023-05-11 10:30:53 -04:00
Suma Hegde
3f9e4d95d4
Change device_handle to processor_handle
...
grep -rli 'device_handle' * | xargs -i@ sed -i
's/device_handle/processor_handle/g' @
Change-Id: Ifc8b7fa3b5488ce1fa8d8cf9eb3981a09450de11
2023-05-11 10:11:24 -04:00
Suma Hegde
3963036a05
Change amdsmi_device_handle to amdsmi_processor_handle
...
grep -rli 'amdsmi_device_handle' * | xargs -i@ sed -i
's/amdsmi_device_handle/amdsmi_processor_handle/g' @
Change-Id: Ie25c51933dcc31e5b34c8070d0d5ba0e8cd05cc1
2023-05-11 10:09:11 -04:00
Galantsev, Dmitrii
3d00ae1240
CMake: Install amdsmitst.exclude
...
Change-Id: I166cbd265cf9074e17cad39fddac77988e2fd686
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com >
2023-04-27 11:58:03 -04:00
Galantsev, Dmitrii
6ee793ca03
SWDEV-340919 - Move examples and tests install dir
...
Previous install locations:
- /opt/rocm/share/example/amd-smi
- /opt/rocm/share/tests/amd-smi
New install locations:
- /opt/rocm/share/amd_smi/example
- /opt/rocm/share/amd_smi/tests
Change-Id: I305477b9f66bdc5963923efe6da1c01f87ea2085
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com >
2023-01-20 09:49:56 -06:00
Dalibor Stanisavljevic
bf79fe4323
SWDEV-378294 - Fixed failing tests
...
Change-Id: Ie0f9dedd6901e05b1a5ca7846624c127d92ed67f
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com >
2023-01-18 10:28:32 -05:00
Bill(Shuzhou) Liu
79bd9c1d5f
change sensor_type in amdsmi_dev_get_temp_metric() to enum
...
The sensor_type in amdsmi_dev_get_temp_metric() will be changed to
amdsmi_temperature_type_t
Change-Id: I72a7f271b0a55a025acc2ca523062a3d51cc036d
2023-01-04 13:01:04 -06:00
Galantsev, Dmitrii
2184d0c3d7
SWDEV-374138 - Improve ASAN flags
...
Tests overwritten the linker flags resulting in failed build with clang.
This change improves ASAN linker flag assignment and fixes test issue.
Change-Id: I88f38360d46b20f6cc7298ad0d1fd09ff6ce47d6
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com >
2023-01-03 16:30:48 -06:00
Bill(Shuzhou) Liu
221d6fdc5c
Make amdsmi function name consistent
...
Some of the amdsmi function have the verb (set or get) at the
end of the function. Move it to the middle to be consistent with
other APIs.
Change-Id: I8053d16f46af951c25aaaf8febf2896a33633fa1
2022-12-16 10:20:49 -06:00
Galantsev, Dmitrii
0c52236abd
CMAKE: Resolve lib dependencies for tests
...
amdsmitst was failing and not finding libgtest and libamd_smi.
This change resolves the issue by
1. Installing gtest into tests directory
2. Modifying RUNPATH variable to point to libamd_smi.so
Change-Id: I126d01c88116d37c5f2b55b9ecb2c9f1313f26fe
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com >
2022-12-12 14:37:57 -06:00
Dalibor Stanisavljevic
b4b761d02f
SWDEV-370223 - Change the name of the header to amdsmi.h
...
Change dev to device_handle throughout the file
Change the pcie_info pcie_speed field type to uint32_t
Add AMDSMI prefix before amdsmi_mm_ip enum
Change-Id: I242145389ddc3f2ad05dfd6ca371640f4d118fc4
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com >
2022-12-08 13:34:34 +01:00
Galantsev, Dmitrii
aeb0bf5832
CMAKE: Repackage whole project for ROCm 5.5 release
...
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com >
Change-Id: I932b11a111c8e0db04bd8c5e0c3d1a470e5b2386
2022-11-29 17:04:32 -06:00
Bill(Shuzhou) Liu
c8caa80405
Fix the unit tests
...
Fix a few broken unit tests to handle NOT_YET_IMPLEMENTED errors.
Change-Id: If3afac0dc32f2e3e82d83bffa5906b630bb1894a
2022-11-04 08:53:09 -05:00
Galantsev, Dmitrii
7957b63dd4
Cleanup tests
...
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com >
2022-11-03 13:30:16 -05:00
Galantsev, Dmitrii
c99e4e1501
Cleanup CMakeLists.txt for packaging
...
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com >
2022-11-03 12:44:23 -05:00
Bill(Shuzhou) Liu
9a92ea833f
The device name and vbios version is incorrect
...
Get the device name from rocm-smi which is not displayed properly
in some cards. Set the vibos version using the rocm-smi.
Change-Id: I138f1760cde94007cb93cad02c6d8cccbb4afa28
2022-10-28 13:03:18 -05:00
Bill(Shuzhou) Liu
a25c71b730
Fix unit test compile error
...
Update the unit test as header enum type name is changed.
Change-Id: Ie965462da7d46259883650b15644003cf936982a
2022-10-20 09:54:11 -05:00
Bill(Shuzhou) Liu
2b2d11c446
Change the get_socket_handles and get_device_handles APIs interface
...
Those two APIs are changed to let the user get the handles count,
allocate memory, and then return handles to the allocated memory.
Change-Id: Ibe28a89ad188c99da6af3af1740b2b25ff22ba06
2022-10-20 09:24:31 -05:00
Dalibor Stanisavljevic
3daf9c1063
SWDEV-353742 - Port smilib function to amdsmi
...
Change-Id: I99df249755a5c665a8dd1777fa82d046e139bd77
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com >
2022-10-20 09:24:22 -05:00
Bill(Shuzhou) Liu
0c91ef919d
Restructure the folder
...
Move rocm_smi related function to rocm_smi folder. Move amd_smi to
top level include/ and src/ folder. Remove obsolte oam folder.
Change the CMakeLists.txt to update folder locations.
Change-Id: I52e6be739e49f3b0545865f25364787f5985e9c3
2022-10-20 09:23:51 -05:00
Bill(Shuzhou) Liu
1ec3a2182e
Support rocm-smi related device information
...
A few fields are added to board_info and asic_info for rocm-smi
device information.
Implement rocm-smi related fw block in amdsmi_get_fw_info().
Change-Id: I825d3e5c7feaa07a6e05386d4f1a59ebf528dfc0
2022-10-20 09:23:41 -05:00
Bill(Shuzhou) Liu
f1d02aca79
Port rocm-smi function to amd-smi
...
Port most rocm-smi function to amd-smi and add unit tests.
Change-Id: I6387a4bdaf20ead2389c99bb01d438156ccd0747
2022-09-06 12:08:59 -04:00
Bill(Shuzhou) Liu
86017b799c
Port more rocm-smi function to amd-smi
...
The API support function, performance counter, process information,
topology and xgmi info.
Change-Id: I3350ec75fdd2ca1438e79134582ae83c49763056
2022-08-24 12:49:27 -05:00
Bill(Shuzhou) Liu
7b92c694a0
Support events in the amdsmi
...
Port the events handling from rocm-smi to amd-smi
Change-Id: I0b4cb30a585cb2188a24be0e21c1c156b461bb1d
2022-08-23 16:49:56 -04:00
Bill(Shuzhou) Liu
98df483bef
Add unit test support
...
Add gtest based unit test framework. Implement fan read/write function.
Change-Id: I83375c24b99d24d01d12bccda863a38f75f5987f
2022-08-05 09:55:34 -04:00
Bill(Shuzhou) Liu
8ce9289bc2
Upgrade GoogleTest to v1.11.0
...
The old GoogleTest has compile errors on Centos 9. Upgrade it
to latest version.
Change-Id: I6bbe6afdfad6422a210f258880ddc87a9f088d76
2022-03-09 15:18:43 -05:00
Sreekant Somasekharan
e6ae697e9c
Add blacklist filter 'virtualization' for rsmi tests failing in SRIOV
...
Change-Id: Ibbaef092482c0b78ecd86a29f0b9b4331b51abe2
2022-03-04 22:13:44 -05:00
Divya Shikre
8c4635acea
Temporary blacklist TestPerfLevelReadWrite for navi21
...
Signed-off-by: Divya Shikre <DivyaUday.Shikre@amd.com >
Change-Id: Iee2146170b6828fe4fe2846c3ebfd57f95734f34
2022-01-27 22:56:37 -05:00
Divya Shikre
11a71c63b1
Don't assert when fan is not supported.
...
Add a check when RSMI_STATUS_NOT_SUPPORTED is returned for fanRead/fanReadWrite.
Fix for SWDEV-314176 & SWDEV-314175 reported.
Signed-off-by: Divya Shikre <DivyaUday.Shikre@amd.com >
Change-Id: Icf2cc541a3fa5ca4794aff5d6bc91104adc45e6d
2022-01-20 12:29:12 -05:00
Divya Shikre
b4fd9c0d94
Update temp_read rsmitst.
...
Check for RSMI_STATUS_INVALID_ARGS when invalid args are passed.
Signed-off-by: Divya Shikre <DivyaUday.Shikre@amd.com >
Change-Id: I0d5ff84aee5cce4214026ddcd860a17ae3e43147
2021-11-29 18:09:45 -05:00
Sreekant Somasekharan
c6f695f5a9
Skip TestFrequenciesReadWrite for unsupported ASICs
...
For ASICs NAVI10 and above setting display clock [DCEFCLK] is not supported and the sysfs entry is
read-only. As a result, the test falsely fails for these ASICs. ROCm SMI Lib is ASIC independent.
So Display clock set cannot be selectively disabled for these ASICs.
As a compromise if the set (write to sysfs entry) fails due to permission error and euid is root,
assume that set feature is not supported and skip the test.
Change-Id: I7a273878cbf1465b01728705323e8a92a42378dd
2021-11-29 11:23:38 -05:00
Sreekant Somasekharan
3f27dcc1ac
Modify bool variable to true in if condition of src=dst
...
Change-Id: Ie2024b3a6ad68e48384bb3472fe8785bcd643665
2021-11-17 12:53:40 -05:00
Sreekant Somasekharan
ce46fd237a
Add test case for rsmi_is_P2P_accessible API.
...
Change-Id: Iccfede42925c98d96454b5f25cc0ed6fc9258911
2021-10-28 17:06:07 -04:00
Divya Shikre
e96d6ab77e
Add failing rsmi tests to exclude file to enable blacklisting
...
Signed-off-by: Divya Shikre <DivyaUday.Shikre@amd.com >
Change-Id: Ibdad4d54ffe87391b13379c63e005fd04c6abaf5
2021-10-26 17:57:05 -04:00
Bill(Shuzhou) Liu
42d39d3e34
Add -g compiler option for ADDRESS_SANITIZER
...
Add -g compiler option for Address Sanitizer
Change-Id: I958fefa6c4b5871c29734ab1d4ec238c9e073192
2021-08-03 13:54:19 -04:00
Divya Shikre
6edea7a92e
Add fix to ignore error returned when perf determinism is not supported.
...
Signed-off-by: Divya Shikre <DivyaUday.Shikre@amd.com >
Change-Id: I89b6a0a3dbba6fbd4b12ff2e20670eff9f32ed7f
2021-06-14 12:18:22 -04:00
Ori Messinger
5b42cdf780
ROCm SMI LIB: Add Default Power Cap To rsmitst
...
Implement default GPU power cap functionality in rsmitst.
It is available in the "rsmitstReadOnly.TestPowerRead" test, and
is displayed as: "Default Power Cap: #uW" (where uW is microwatts).
Signed-off-by: Ori Messinger <Ori.Messinger@amd.com >
Change-Id: I564ea3785f1a93dfd30587634057516549fa762c
2021-04-28 12:42:34 -04:00
Harish Kasiviswanathan
844acbc0d8
Add energy counter resolution to rsmi_dev_energy_count_get
...
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com >
Change-Id: I03b70968257db7a45e21d7ba62542cdedd18eb85
2021-04-22 10:25:06 -04:00
Harish Kasiviswanathan
92cf7ff28a
Add time profile for set_power_cap function
...
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com >
Change-Id: Id728cb5fe85b3558e52b4517508211dca499e801
2021-04-21 15:29:44 -04:00
Bill(Shuzhou) Liu
392d13e318
Unit test for energy accumulator counter
...
Add a few unit tests for energy accumulator counter.
Change-Id: Ib78a67e29465de9c14e6e934c5d62ec64de66d8a
2021-04-14 16:04:46 -04:00
Bill(Shuzhou) Liu
6340176b99
Unit tests for coarse grain utilization counters
...
The unit tests for GFX and Memory activity counters.
Change-Id: I968dabc9ef6de9d335d7f751b290fb713b51a79c
2021-04-14 10:53:55 -04:00
Divya Shikre
aaf2120117
Update performance determinism api as per the modified sysfs interface.
...
Signed-off-by: Divya Shikre <DivyaUday.Shikre@amd.com >
Change-Id: Ib0ec5128819644a2ff6c916da9194a7fe1dad795
2021-04-07 16:38:48 -04:00