When it fails to open sysfs file, it may crash. Modify the condition
to check the file descriptor after open the file.
Change-Id: I2acdc55f8194a2d734db20d16e1660a20ba09574
[ROCm/amdsmi commit: f19da1bb2c]
The amdsmi_dev_get_temp_metric() will cover both function:
amdsmi_get_temperature_measure() using AMDSMI_TEMP_CURRENT
and
amdsmi_get_temperature_limit() using AMDSMI_TEMP_CRITICAL
Remove those two function.
It also merge the amdsmi_get_power_limit() into
amdsmi_get_power_measure()
Change-Id: I40d4afeb2ec0ac7b64832729f36adfaae120c990
[ROCm/amdsmi commit: ec48312c61]
The sensor_type in amdsmi_dev_get_temp_metric() will be changed to
amdsmi_temperature_type_t
Change-Id: I72a7f271b0a55a025acc2ca523062a3d51cc036d
[ROCm/amdsmi commit: 79bd9c1d5f]
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>
[ROCm/amdsmi commit: 2184d0c3d7]
Use ctypes to import types instead of via amdsmi_wrapper
Change-Id: I217e90b74aafdd39eaab5f50edfda80e0bf91cce
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
[ROCm/amdsmi commit: 0f7c440d95]
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
[ROCm/amdsmi commit: 221d6fdc5c]
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>
[ROCm/amdsmi commit: 0c52236abd]
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>
[ROCm/amdsmi commit: b4b761d02f]
- Made all doxygen formatting consistent with @ use
- Added @file definition to fix a lot of missed references
- Simplified return definitions for easier maintainability
- Fixed bad formatting and missing section closures
Signed-off-by: Jason Albert <jason.albert@amd.com>
Change-Id: I02cc55f7d0ae277f318a4620978af096f56cac6c
[ROCm/amdsmi commit: b4cde9adec]
Assign fixed values to status codes to prevent enum auto assign
from changing them.
Signed-off-by: Jason Albert <jason.albert@amd.com>
Change-Id: I0ca1de7ba503ce8a75c56026f5a54e212204595b
[ROCm/amdsmi commit: 3b1584915b]
Instead of using assert to abort the application, the fix will
return the error code if the input parameters is incorrect.
Change-Id: I00861ddf1198386fb322ea06232a7178fb5ef4bd
[ROCm/amdsmi commit: 8d347bb6c4]
When the sysfs file does not exist, it will return NOT_SUPPORTED
instead of assert faiure.
Change-Id: I3a1c9d7cf627901e141e2617496dfafd2e6b3f25
[ROCm/amdsmi commit: 0a3ca5c555]
Added pcie, power and memory API
Change-Id: I0b3bd1c110099805c700f53974eceb6acd850930
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
[ROCm/amdsmi commit: 21d6e0f990]
- Added performance counter API calls
- Added part of unsupported functions in virtual env API calls
- README for both additions
Change-Id: I6fdf1fe83370975011fe4ec11c0b0ca2bab0a1b8
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
[ROCm/amdsmi commit: f9f792230e]
- Added Physical State Query API calls
- Added Clock, Power and Performance Query API calls
- README for both additions
Change-Id: Icf412364a13c9e51b9630f19f29a7cdfbe46f7fe
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
[ROCm/amdsmi commit: 62a69fb802]
- Add up to date README file for python tool
Change-Id: I7a02f79469e990870398b3741b033ea447998fdd
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
[ROCm/amdsmi commit: 9cad9e5216]
- Implement context manager event class for easier usage instead of having 4 different
APIs.
- Add support for with statement for easier cleanup.
Change-Id: I396947a93d3f04efc068e17804eab12eefa97cf0
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
[ROCm/amdsmi commit: 23160fa8e0]
- Added APIs for "Supported Function Checks"
- Added first half of the APIs for "Unsupported Functions In Virtual Environment"
Change-Id: Ia83303e6b7ae65aada608bd9ca5f56fd33e4ef34
Signed-off-by: Dalibor Stanisavljevic <Dalibor.Stanisavljevic@amd.com>
[ROCm/amdsmi commit: a6efdd32ed]
Init the ams_smi using the rocm-smi, which makes the GPU discovery
consistent with or without libdrm.
Change-Id: Ic714781f8ce791451b0c057621525926edb7f5ee
[ROCm/amdsmi commit: b34b7451e8]
Fix a few broken unit tests to handle NOT_YET_IMPLEMENTED errors.
Change-Id: If3afac0dc32f2e3e82d83bffa5906b630bb1894a
[ROCm/amdsmi commit: c8caa80405]
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
[ROCm/amdsmi commit: 9a92ea833f]