fix: [SWDEV-458862] [rocm/rocm_smi_lib]
Fixes reading pp_od_clk_voltage new variable format and size.
Code changes related to the following:
* get_od_clk_volt_info()
* get_od_clk_volt_curve_regions()
* Unit tests
* CLI options restored: --showclkvolt, --showvc, --showvoltagerange, --setvc
* Rework: 162d1d24
* Bump CLI version
* CHANGELOG.md
Change-Id: I817ca224de923fdaa992df84592d63b4d5a12b22
Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>
[ROCm/rocm_smi_lib commit: 8e6d66e15b]
This commit is contained in:
committed by
Maisam Arif
parent
02a862bde1
commit
af02873dfb
@@ -21,7 +21,8 @@ Added `RSMI_EVT_NOTIF_RING_HANG` to the possible events in the `rsmi_evt_notific
|
||||
|
||||
### Fixed
|
||||
|
||||
- N/A
|
||||
- **Fixed parsing of `pp_od_clk_voltage` within `get_od_clk_volt_info`**
|
||||
The parsing of `pp_od_clk_voltage` was not dynamic enough to work with the dropping of voltage curve support on MI series cards.
|
||||
|
||||
### Known Issues
|
||||
|
||||
@@ -30,15 +31,15 @@ Added `RSMI_EVT_NOTIF_RING_HANG` to the possible events in the `rsmi_evt_notific
|
||||
## rocm_smi_lib for ROCm 6.1.1
|
||||
|
||||
### Added
|
||||
- **Unlock mutex if process is dead**
|
||||
- **Unlock mutex if process is dead**
|
||||
Added in order to unlock mutex when process is dead. Additional debug output has been added if futher issues are detected.
|
||||
|
||||
- **Added Partition ID to rocm-smi CLI**
|
||||
- **Added Partition ID to rocm-smi CLI**
|
||||
`rsmi_dev_pci_id_get()` now provides partition ID. See API for better detail. Previously these bits were reserved bits (right before domain) and partition id was within function.
|
||||
- bits [63:32] = domain
|
||||
- bits [31:28] = partition id
|
||||
- bits [27:16] = reserved
|
||||
- bits [15: 0] = pci bus/device/function
|
||||
- bits [15: 0] = pci bus/device/function
|
||||
|
||||
rocm-smi now provides partition ID in `rocm-smi` and `rocm-smi --showhw`. If device supports partitioning and is in a non-SPX mode (CPX, DPX,TPX,... etc) partition ID will be non-zero. In SPX and non-supported devices will show as 0. See examples provided below.
|
||||
|
||||
@@ -47,11 +48,11 @@ rocm-smi now provides partition ID in `rocm-smi` and `rocm-smi --showhw`. If dev
|
||||
|
||||
========================================= ROCm System Management Interface =========================================
|
||||
=================================================== Concise Info ===================================================
|
||||
Device Node IDs Temp Power Partitions SCLK MCLK Fan Perf PwrCap VRAM% GPU%
|
||||
(DID, GUID) (Edge) (Avg) (Mem, Compute, ID)
|
||||
Device Node IDs Temp Power Partitions SCLK MCLK Fan Perf PwrCap VRAM% GPU%
|
||||
(DID, GUID) (Edge) (Avg) (Mem, Compute, ID)
|
||||
====================================================================================================================
|
||||
0 1 0x73bf, 34495 43.0°C 6.0W N/A, N/A, 0 0Mhz 96Mhz 0% manual 150.0W 3% 0%
|
||||
1 2 0x73a3, 22215 34.0°C 8.0W N/A, N/A, 0 0Mhz 96Mhz 20.0% manual 213.0W 0% 0%
|
||||
0 1 0x73bf, 34495 43.0°C 6.0W N/A, N/A, 0 0Mhz 96Mhz 0% manual 150.0W 3% 0%
|
||||
1 2 0x73a3, 22215 34.0°C 8.0W N/A, N/A, 0 0Mhz 96Mhz 20.0% manual 213.0W 0% 0%
|
||||
====================================================================================================================
|
||||
=============================================== End of ROCm SMI Log ================================================
|
||||
```
|
||||
@@ -78,15 +79,15 @@ GPU NODE DID GUID GFX VER GFX RAS SDMA RAS UMC RAS VBIOS BUS
|
||||
======================================= End of ROCm SMI Log ========================================
|
||||
```
|
||||
|
||||
- **Added `NODE`, `GUID`, and `GFX Version`**
|
||||
- **Added `NODE`, `GUID`, and `GFX Version`**
|
||||
Changes impact the following rocm-smi CLIs:
|
||||
- `rocm-smi`
|
||||
- `rocm-smi -i`
|
||||
- `rocm-smi --showhw`
|
||||
- `rocm-smi --showproduct`
|
||||
|
||||
`NODE` - is the KFD node, since these can both be CPU and GPU devices. This field is invariant between boots.
|
||||
`GUID` - also known as GPU ID. GUID is the KFD GPU's ID. This field has a chance to be variant between boots.
|
||||
`NODE` - is the KFD node, since these can both be CPU and GPU devices. This field is invariant between boots.
|
||||
`GUID` - also known as GPU ID. GUID is the KFD GPU's ID. This field has a chance to be variant between boots.
|
||||
`GFX Version` - this is the device's target graphics version.
|
||||
|
||||
See below for a few example outputs.
|
||||
@@ -184,12 +185,12 @@ GPU[3] : GFX Version: gfx942
|
||||
================================== End of ROCm SMI Log ===================================
|
||||
```
|
||||
|
||||
- **Documentation now includes C++ and Python: tutorials, API guides, and C++ reference pages**
|
||||
- **Documentation now includes C++ and Python: tutorials, API guides, and C++ reference pages**
|
||||
See [https://rocm.docs.amd.com/](https://rocm.docs.amd.com/projects/rocm_smi_lib/en/latest/) once 6.1.1 is released.
|
||||
|
||||
|
||||
### Changed
|
||||
- **Aligned `rocm-smi` fields display "N/A" instead of "unknown"/"unsupported": `Card ID`, `DID`, `Model`, `SKU`, and `VBIOS`**
|
||||
- **Aligned `rocm-smi` fields display "N/A" instead of "unknown"/"unsupported": `Card ID`, `DID`, `Model`, `SKU`, and `VBIOS`**
|
||||
Impacts the following commands:
|
||||
- `rocm-smi` - see other examples above for 6.1.1
|
||||
- `rocm-smi --showhw` - see other examples above for 6.1.1
|
||||
@@ -208,11 +209,11 @@ GPU[3] : VBIOS version: N/A
|
||||
==========================================================================================
|
||||
================================== End of ROCm SMI Log ===================================
|
||||
```
|
||||
- **Removed stacked id formatting in `rocm-smi`**
|
||||
- **Removed stacked id formatting in `rocm-smi`**
|
||||
This is to simplify identifiers helpful to users. More identifiers can be found on:
|
||||
- `rocm-smi -i`
|
||||
- `rocm-smi --showhw`
|
||||
- `rocm-smi --showproduct`
|
||||
- `rocm-smi --showproduct`
|
||||
|
||||
See examples shown above for 6.1.1. Previous output example can be seen below.
|
||||
```shell
|
||||
@@ -233,18 +234,18 @@ Device [Model : Revision] Temp Power Partitions SCLK MCLK
|
||||
- N/A
|
||||
|
||||
### Fixed
|
||||
- **Fixed HIP and ROCm SMI mismatch on GPU bus assignments**
|
||||
- **Fixed HIP and ROCm SMI mismatch on GPU bus assignments**
|
||||
These changes prompted us to to provide better visability for our device nodes and partition IDs (see addition provided above). See examples below for fix overview.
|
||||
1. MI300a GPU device `Domain:Bus:Device.function` clashes with another AMD USB device
|
||||
Cause(s):
|
||||
a. ROCm SMI did not propagate domain consistently (for partitioned devices)
|
||||
1. MI300a GPU device `Domain:Bus:Device.function` clashes with another AMD USB device
|
||||
Cause(s):
|
||||
a. ROCm SMI did not propagate domain consistently (for partitioned devices)
|
||||
b. AMD GPU driver previously reported partition IDs within function node - causing clash with the other AMD USB device PCIe ID displayed.
|
||||
2. Domain does not propagate for devices which support partitioning (MI300x/a)
|
||||
Cause(s):
|
||||
a. ROCm SMI did not propagate domain consistently (for partitioned devices)
|
||||
3. Displayed topology will show disordered nodes when compared to HIP
|
||||
Cause(s):
|
||||
a. ROCm SMI did not propogate domain consistently (for partitioned devices)
|
||||
2. Domain does not propagate for devices which support partitioning (MI300x/a)
|
||||
Cause(s):
|
||||
a. ROCm SMI did not propagate domain consistently (for partitioned devices)
|
||||
3. Displayed topology will show disordered nodes when compared to HIP
|
||||
Cause(s):
|
||||
a. ROCm SMI did not propogate domain consistently (for partitioned devices)
|
||||
|
||||
*Device in TPX*
|
||||
```shell
|
||||
@@ -305,9 +306,9 @@ GPU[11] : (Topology) Numa Node: 3
|
||||
GPU[11] : (Topology) Numa Affinity: 3
|
||||
================================== End of ROCm SMI Log ===================================
|
||||
```
|
||||
- **Fixed memory leaks**
|
||||
- **Fixed memory leaks**
|
||||
Caused by not closing directories and creating maps nodes instead of checking using by using .at().
|
||||
- **Fixed Python rocm_smi API calls**
|
||||
- **Fixed Python rocm_smi API calls**
|
||||
Fixed initializing calls which reuse rocmsmi.initializeRsmi() bindings.
|
||||
|
||||
```shell
|
||||
@@ -318,7 +319,7 @@ Traceback (most recent call last):
|
||||
ret_init = rocmsmi.rsmi_init(0)
|
||||
NameError: name 'rocmsmi' is not defined
|
||||
```
|
||||
- **Fixed rsmi_dev_activity_metric_get gfx/memory activity does not update with GPU activity**
|
||||
- **Fixed rsmi_dev_activity_metric_get gfx/memory activity does not update with GPU activity**
|
||||
Checks and forces rereading gpu metrics unconditionally.
|
||||
|
||||
### Known Issues
|
||||
@@ -327,10 +328,10 @@ NameError: name 'rocmsmi' is not defined
|
||||
## rocm_smi_lib for ROCm 6.1.0
|
||||
|
||||
### Added
|
||||
- **Added support to set max/min clock level for sclk (`RSMI_CLK_TYPE_SYS`) or mclk (`RSMI_CLK_TYPE_MEM`)**
|
||||
- **Added support to set max/min clock level for sclk (`RSMI_CLK_TYPE_SYS`) or mclk (`RSMI_CLK_TYPE_MEM`)**
|
||||
Users can now set a maximum or minimum sclk or mclk value through `rsmi_dev_clk_extremum_set()` API provided ASIC support. Alternatively, users can
|
||||
use our Python CLI tool (`rocm-smi --setextremum max sclk 1500`). See example below.
|
||||
|
||||
use our Python CLI tool (`rocm-smi --setextremum max sclk 1500`). See example below.
|
||||
|
||||
```shell
|
||||
$ sudo /opt/rocm/bin/rocm-smi --setextremum max sclk 2100
|
||||
|
||||
@@ -358,15 +359,15 @@ GPU[3] : Successfully set max sclk to 2100(MHz)
|
||||
================================== End of ROCm SMI Log ===================================
|
||||
```
|
||||
|
||||
- **Added `rsmi_dev_target_graphics_version_get()`**
|
||||
- **Added `rsmi_dev_target_graphics_version_get()`**
|
||||
Users can now query through ROCm SMI API (`rsmi_dev_target_graphics_version_get()`) to retreive the target graphics version for a GPU device. Currently, this output is not supplied through our rocm-smi CLI.
|
||||
|
||||
### Changed
|
||||
|
||||
- **Removed non-unified API headers: Individual GPU metric APIs are no longer supported**
|
||||
- **Removed non-unified API headers: Individual GPU metric APIs are no longer supported**
|
||||
The individual metric APIs (`rsmi_dev_metrics_*`) were removed in order to keep updates easier for new GPU metric support. By providing a simple API (`rsmi_dev_gpu_metrics_info_get()`) with its reported device metrics, it is worth noting there is a risk for ABI break-age using `rsmi_dev_gpu_metrics_info_get()`. It is vital to understand, that ABI breaks are necessary (in some cases) in order to support newer ASICs and metrics for our customers. We will continue to support `rsmi_dev_gpu_metrics_info_get()` with these considerations and limitations in mind.
|
||||
|
||||
- **Depricated rsmi_dev_power_ave_get(), use newer API rsmi_dev_power_get()**
|
||||
- **Depricated rsmi_dev_power_ave_get(), use newer API rsmi_dev_power_get()**
|
||||
As outlined in change below for 6.0.0 (***Added a generic power API: rsmi_dev_power_get***), is now depricated. Please update your ROCm SMI API calls accordingly.
|
||||
|
||||
### Optimizations
|
||||
@@ -374,17 +375,17 @@ As outlined in change below for 6.0.0 (***Added a generic power API: rsmi_dev_po
|
||||
|
||||
|
||||
### Fixed
|
||||
- Fix `--showpids` reporting `[PID] [PROCESS NAME] 1 UNKNOWN UNKNOWN UNKNOWN`
|
||||
- Fix `--showpids` reporting `[PID] [PROCESS NAME] 1 UNKNOWN UNKNOWN UNKNOWN`
|
||||
Output was failing because cu_occupancy debugfs method is not provided on some graphics cards by design. `get_compute_process_info_by_pid` was updated to reflect this and returns with output needed by CLI.
|
||||
- Fix `rocm-smi --showpower` output was inconsistent on Navi32/31 devices
|
||||
- Fix `rocm-smi --showpower` output was inconsistent on Navi32/31 devices
|
||||
Updated to use `rsmi_dev_power_get()` within CLI to provide a consistent device power output. This was caused due to using the now depricated `rsmi_dev_average_power_get()` API.
|
||||
- Fixed `rocm-smi --setcomputepartition` and `rocm-smi --resetcomputepartition` to notate if device is EBUSY
|
||||
- Fixed `rocm-smi --setmemorypartition` and `rocm-smi --resetmemorypartition` read only SYSFS to return RSMI_STATUS_NOT_SUPPORTED
|
||||
- Fixed `rocm-smi --setcomputepartition` and `rocm-smi --resetcomputepartition` to notate if device is EBUSY
|
||||
- Fixed `rocm-smi --setmemorypartition` and `rocm-smi --resetmemorypartition` read only SYSFS to return RSMI_STATUS_NOT_SUPPORTED
|
||||
The `rsmi_dev_memory_partition_set` API is updated to handle the readonly SYSFS check. Corresponding tests and CLI (`rocm-smi --setmemorypartition` and `rocm-smi --resetmemorypartition`) calls were updated accordingly.
|
||||
- Fix `rocm-smi --showclkvolt` and `rocm-smi --showvc` displaying 0 for overdrive and voltage curve is not supported
|
||||
|
||||
### Known Issues
|
||||
- **HIP and ROCm SMI mismatch on GPU bus assignments**
|
||||
- **HIP and ROCm SMI mismatch on GPU bus assignments**
|
||||
Three separate issues have been identified:
|
||||
1. MI300a GPU device `Domain:Bus:Device.function` clashes with another AMD USB device
|
||||
```shell
|
||||
@@ -408,7 +409,7 @@ GPU[3] : PCI Bus: 0000:01:00.3
|
||||
==========================================================================================
|
||||
================================== End of ROCm SMI Log ===================================
|
||||
```
|
||||
2. Domain does not propagate for devices which support partitioning (MI300x/a)
|
||||
2. Domain does not propagate for devices which support partitioning (MI300x/a)
|
||||
For example, a device in non-SPX (single partition) - devices will overlap in function device.
|
||||
```shell
|
||||
$ rocm-smi --showbus
|
||||
@@ -440,7 +441,7 @@ GPU[22] : PCI Bus: 0002:01:00.0
|
||||
GPU[23] : PCI Bus: 0003:01:00.0
|
||||
================================== End of ROCm SMI Log ===================================
|
||||
```
|
||||
3. Displayed topology will show disordered nodes when compared to HIP
|
||||
3. Displayed topology will show disordered nodes when compared to HIP
|
||||
See rocm-smi output vs transferbench.
|
||||
```shell
|
||||
rocm-smi --showtopo option is not displaying the correct information when the MI300 driver is loaded in TPX mode.
|
||||
@@ -514,9 +515,9 @@ GPU[11] : (Topology) Numa Affinity: 3
|
||||
|
||||
### Added
|
||||
|
||||
- **Added rocm-smi --version**
|
||||
The SMI will report two "versions", ROCM-SMI version and other is ROCM-SMI-LIB version.
|
||||
- The ROCM-SMI version is the CLI/tool version number with commit ID appended after `+` sign.
|
||||
- **Added rocm-smi --version**
|
||||
The SMI will report two "versions", ROCM-SMI version and other is ROCM-SMI-LIB version.
|
||||
- The ROCM-SMI version is the CLI/tool version number with commit ID appended after `+` sign.
|
||||
- The ROCM-SMI-LIB version is the library package version number.
|
||||
```
|
||||
$ rocm-smi --version
|
||||
@@ -524,11 +525,11 @@ ROCM-SMI version: 2.0.0+8e78352
|
||||
ROCM-SMI-LIB version: 6.0.0
|
||||
```
|
||||
|
||||
- **Added support for gfx941/gfx942 metrics**
|
||||
- **Added support for gfx941/gfx942 metrics**
|
||||
You can now query MI300 device metrics to get real-time information. Metrics include power, temperature, energy, and performance. Users can query through `rsmi_dev_gpu_metrics_info_get()`.
|
||||
|
||||
|
||||
- **Compute and memory partition support**
|
||||
- **Compute and memory partition support**
|
||||
Users can now view, set, and reset partitions. The topology display can provide a more in-depth look at the device's current configuration. If your ASIC supports these features, the following commands can help get started:
|
||||
- `rocm-smi --showcomputepartition`
|
||||
- `rocm-smi --setcomputepartition <SPX, DPX, CPX, TPX, QPX>`
|
||||
@@ -539,23 +540,23 @@ Users can now view, set, and reset partitions. The topology display can provide
|
||||
|
||||
### Changed
|
||||
|
||||
- **GPU index sorting made consistent with other tools**
|
||||
- **GPU index sorting made consistent with other tools**
|
||||
To ensure alignment with other ROCm software tools, GPU index sorting is optimized to use Bus:Device.Function (BDF) rather than the card number.
|
||||
|
||||
- **Increase max BDF ID length**
|
||||
- **Increase max BDF ID length**
|
||||
To allow for larger BDF data, we have increased the maximum BDF length from 256 to 512 buffer size.
|
||||
|
||||
- **Documentation is transitioning to Sphinx**
|
||||
- **Documentation is transitioning to Sphinx**
|
||||
Sphinx allows us to generate code documentation easier for our users. Helps us provide centrized HTML documentation at single website location. Here customers can see how to use our software and tools.
|
||||
|
||||
- **Added a generic power API: `rsmi_dev_power_get()`**
|
||||
Older ASICs provided average socket power, newer ASICs (MI300) provide current socket power. The generic API provides one interface to retreive either of these power readings, allowing backwards compatability.
|
||||
- **Added a generic power API: `rsmi_dev_power_get()`**
|
||||
Older ASICs provided average socket power, newer ASICs (MI300) provide current socket power. The generic API provides one interface to retreive either of these power readings, allowing backwards compatability.
|
||||
|
||||
- **Added flexible temperature readings (`rocm-smi` and `rocm-smi --showtempgraph`)**
|
||||
- **Added flexible temperature readings (`rocm-smi` and `rocm-smi --showtempgraph`)**
|
||||
Older ASICs provided edge temperature, newer ASICs (MI300) provide junction socket power (not edge). The rocm-smi CLI now provides a way to view which type of temperature is read across all sockets.
|
||||
|
||||
- **Added deep sleep frequency readings**
|
||||
Newer ASICs (MI300) provide ability to know if a clock is in deep sleep.
|
||||
- **Added deep sleep frequency readings**
|
||||
Newer ASICs (MI300) provide ability to know if a clock is in deep sleep.
|
||||
|
||||
|
||||
### Optimizations
|
||||
@@ -566,8 +567,8 @@ Newer ASICs (MI300) provide ability to know if a clock is in deep sleep.
|
||||
|
||||
### Fixed
|
||||
- Fix memory usage division by 0
|
||||
- Fix missing firmware blocks (rocm-smi --showfw)
|
||||
- Fix rocm-smi --showevents shows wrong gpuID
|
||||
- Fix missing firmware blocks (rocm-smi --showfw)
|
||||
- Fix rocm-smi --showevents shows wrong gpuID
|
||||
|
||||
|
||||
## rocm_smi_lib for ROCm 5.5.0
|
||||
|
||||
@@ -2870,8 +2870,6 @@ rsmi_status_t rsmi_dev_od_clk_info_set(uint32_t dv_ind, rsmi_freq_ind_t level,
|
||||
/**
|
||||
* @brief This function sets 1 of the 3 voltage curve points.
|
||||
*
|
||||
* @deprecated This function is deprecated due to driver changes.
|
||||
*
|
||||
* @details Given a device index @p dv_ind, a voltage point @p vpoint
|
||||
* and a voltage value @p voltvalue this function will set voltage curve point
|
||||
*
|
||||
@@ -2897,8 +2895,6 @@ rsmi_status_t rsmi_dev_od_volt_info_set(uint32_t dv_ind, uint32_t vpoint,
|
||||
* @brief This function will retrieve the current valid regions in the
|
||||
* frequency/voltage space.
|
||||
*
|
||||
* @deprecated This function is deprecated due to driver changes.
|
||||
*
|
||||
* @details Given a device index @p dv_ind, a pointer to an unsigned integer
|
||||
* @p num_regions and a buffer of ::rsmi_freq_volt_region_t structures, @p
|
||||
* buffer, this function will populate @p buffer with the current
|
||||
|
||||
@@ -554,9 +554,9 @@ class TagTextContents_t
|
||||
++line_counter;
|
||||
}
|
||||
|
||||
// Any remaining elements?
|
||||
// Any remaining elements? If so, the data belongs to the last found section title
|
||||
if (line_counter > bottom_title_line) {
|
||||
update_primary_tbl(bottom_title_line, (line_counter - 1));
|
||||
update_primary_tbl(bottom_title_line, line_counter);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -570,15 +570,24 @@ class TagTextContents_t
|
||||
// Note: Organizes table with Title as a Key, a Key/ID for values and values.
|
||||
// It takes into consideration the initial constraints were all good and
|
||||
// that the primary table has been populated.
|
||||
auto sec_key = std::string();
|
||||
auto sec_data = std::string();
|
||||
auto auto_key = uint32_t(0);
|
||||
for (const auto& [prim_key, prim_values] : m_primary) {
|
||||
for (const auto& value : prim_values) {
|
||||
if (auto mark_pos = value.find_first_of(m_line_splitter_mark.c_str());
|
||||
mark_pos != std::string::npos) {
|
||||
auto sec_key = trim(value.substr(0, mark_pos + 1));
|
||||
auto sec_data = trim(value.substr((mark_pos + 1), value.size()));
|
||||
if (!sec_key.empty()) {
|
||||
m_structured[prim_key].insert(std::make_pair(sec_key, sec_data));
|
||||
}
|
||||
sec_key = trim(value.substr(0, mark_pos + 1));
|
||||
sec_data = trim(value.substr((mark_pos + 1), value.size()));
|
||||
}
|
||||
// In case there is no 'key' based on the data token marker, generate one.
|
||||
else {
|
||||
sec_key = std::to_string(auto_key) + m_line_splitter_mark;
|
||||
sec_data = trim(value.substr(0, value.size()));
|
||||
++auto_key;
|
||||
}
|
||||
if (!sec_key.empty()) {
|
||||
m_structured[prim_key].insert(std::make_pair(sec_key, sec_data));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ from rsmiBindings import *
|
||||
# Patch version - Increment when adding a fix, set to 0 when minor is incremented
|
||||
# Hash version - Shortened commit hash. Print here and not with lib for consistency with amd-smi
|
||||
SMI_MAJ = 2
|
||||
SMI_MIN = 1
|
||||
SMI_MIN = 2
|
||||
SMI_PAT = 0
|
||||
# SMI_HASH is provided by rsmiBindings
|
||||
__version__ = '%s.%s.%s+%s' % (SMI_MAJ, SMI_MIN, SMI_PAT, SMI_HASH)
|
||||
@@ -1270,6 +1270,34 @@ def setClockExtremum(deviceList, level, clkType, clkValue, autoRespond):
|
||||
printLog(device, 'Setting %s %s clock is not supported for this device.' % (level, clkType), None)
|
||||
|
||||
|
||||
def setVoltageCurve(deviceList, point, clk, volt, autoRespond):
|
||||
""" Set voltage curve for a point in the PowerPlay table for a list of devices.
|
||||
|
||||
:param deviceList: List of DRM devices (can be a single-item list)
|
||||
:param point: Point on the voltage curve to modify
|
||||
:param clk: Clock speed specified for this curve point
|
||||
:param volt: Voltage specified for this curve point
|
||||
:param autoRespond: Response to automatically provide for all prompts
|
||||
"""
|
||||
global RETCODE
|
||||
value = '%s %s %s' % (point, clk, volt)
|
||||
try:
|
||||
any(int(item) for item in value.split())
|
||||
except ValueError:
|
||||
printErrLog(None, 'Unable to set Voltage curve')
|
||||
printErrLog(None, 'Non-integer characters are present in %s' %value)
|
||||
RETCODE = 1
|
||||
return
|
||||
confirmOutOfSpecWarning(autoRespond)
|
||||
for device in deviceList:
|
||||
ret = rocmsmi.rsmi_dev_od_volt_info_set(device, int(point), int(clk), int(volt))
|
||||
if rsmi_ret_ok(ret, device, 'set_voltage_curve'):
|
||||
printLog(device, 'Successfully set voltage point %s to %s(MHz) %s(mV)' % (point, clk, volt), None)
|
||||
else:
|
||||
printErrLog(device, 'Unable to set voltage point %s to %s(MHz) %s(mV)' % (point, clk, volt))
|
||||
RETCODE = 1
|
||||
|
||||
|
||||
def setPowerPlayTableLevel(deviceList, clkType, point, clk, volt, autoRespond):
|
||||
""" Set clock frequency and voltage for a level in the PowerPlay table for a list of devices.
|
||||
|
||||
@@ -2683,6 +2711,38 @@ def showPower(deviceList):
|
||||
printLogSpacer()
|
||||
|
||||
|
||||
def showPowerPlayTable(deviceList):
|
||||
""" Display current GPU Memory clock frequencies and voltages for a list of devices
|
||||
|
||||
:param deviceList: List of DRM devices (can be a single-item list)
|
||||
"""
|
||||
global PRINT_JSON
|
||||
if PRINT_JSON:
|
||||
return
|
||||
printLogSpacer(' GPU Memory clock frequencies and voltages ')
|
||||
odvf = rsmi_od_volt_freq_data_t()
|
||||
for device in deviceList:
|
||||
ret = rocmsmi.rsmi_dev_od_volt_info_get(device, byref(odvf))
|
||||
if rsmi_ret_ok(ret, device, 'get_od_volt'):
|
||||
# TODO: Make this more dynamic and less hard-coded if possible
|
||||
printLog(device, 'OD_SCLK:', None)
|
||||
printLog(device, '0: %sMhz' % (int(odvf.curr_sclk_range.lower_bound / 1000000)), None)
|
||||
printLog(device, '1: %sMhz' % (int(odvf.curr_sclk_range.upper_bound / 1000000)), None)
|
||||
printLog(device, 'OD_MCLK:', None)
|
||||
printLog(device, '0: %sMhz' % (int(odvf.curr_mclk_range.lower_bound / 1000000)), None)
|
||||
printLog(device, '1: %sMhz' % (int(odvf.curr_mclk_range.upper_bound / 1000000)), None)
|
||||
if odvf.sclk_freq_limits.lower_bound > 0 or odvf.sclk_freq_limits.upper_bound > 0 \
|
||||
or odvf.mclk_freq_limits.lower_bound >0 or odvf.mclk_freq_limits.upper_bound > 0:
|
||||
printLog(device, 'OD_RANGE:', None)
|
||||
if odvf.sclk_freq_limits.lower_bound > 0 or odvf.sclk_freq_limits.upper_bound > 0:
|
||||
printLog(device, 'SCLK: %sMhz %sMhz' % (
|
||||
int(odvf.sclk_freq_limits.lower_bound / 1000000), int(odvf.sclk_freq_limits.upper_bound / 1000000)), None)
|
||||
if odvf.mclk_freq_limits.lower_bound >0 or odvf.mclk_freq_limits.upper_bound > 0:
|
||||
printLog(device, 'MCLK: %sMhz %sMhz' % (
|
||||
int(odvf.mclk_freq_limits.lower_bound / 1000000), int(odvf.mclk_freq_limits.upper_bound / 1000000)), None)
|
||||
printLogSpacer()
|
||||
|
||||
|
||||
def showProduct(deviceList):
|
||||
""" Show the requested product information for a list of devices
|
||||
|
||||
@@ -2754,7 +2814,7 @@ def showRange(deviceList, rangeType):
|
||||
:param rangeType: [sclk|voltage] Type of range to return
|
||||
"""
|
||||
global RETCODE
|
||||
if rangeType not in {'sclk', 'mclk'}:
|
||||
if rangeType not in {'sclk', 'mclk', 'voltage'}:
|
||||
printLog(None, 'Invalid range identifier %s' % (rangeType), None)
|
||||
RETCODE = 1
|
||||
return
|
||||
@@ -2769,6 +2829,21 @@ def showRange(deviceList, rangeType):
|
||||
if rangeType == 'mclk':
|
||||
printLog(device, 'Valid mclk range: %sMhz - %sMhz' % (
|
||||
int(odvf.curr_mclk_range.lower_bound / 1000000), int(odvf.curr_mclk_range.upper_bound / 1000000)), None)
|
||||
if rangeType == 'voltage':
|
||||
if odvf.num_regions == 0:
|
||||
printErrLog(device, 'Voltage curve regions unsupported.')
|
||||
continue
|
||||
num_regions = c_uint32(odvf.num_regions)
|
||||
regions = (rsmi_freq_volt_region_t * odvf.num_regions)()
|
||||
ret = rocmsmi.rsmi_dev_od_volt_curve_regions_get(device, byref(num_regions), byref(regions))
|
||||
if rsmi_ret_ok(ret, device, 'volt'):
|
||||
for i in range(num_regions.value):
|
||||
printLog(device,
|
||||
'Region %d: Valid voltage range: %smV - %smV' % (i, regions[i].volt_range.lower_bound,
|
||||
regions[i].volt_range.upper_bound),
|
||||
None)
|
||||
else:
|
||||
printLog(device, 'Unable to display %s range' % (rangeType), None)
|
||||
printLogSpacer()
|
||||
|
||||
|
||||
@@ -3086,6 +3161,25 @@ def showVoltage(deviceList):
|
||||
printLogSpacer()
|
||||
|
||||
|
||||
def showVoltageCurve(deviceList):
|
||||
""" Show the voltage curve points for the specified devices
|
||||
|
||||
:param deviceList: List of DRM devices (can be a single-item list)
|
||||
"""
|
||||
printLogSpacer(' Voltage Curve Points ')
|
||||
odvf = rsmi_od_volt_freq_data_t()
|
||||
for device in deviceList:
|
||||
ret = rocmsmi.rsmi_dev_od_volt_info_get(device, byref(odvf))
|
||||
if rsmi_ret_ok(ret, device, 'get_od_volt_info', silent=False) and odvf.num_regions > 0:
|
||||
for position in range(3):
|
||||
printLog(device, 'Voltage point %d: %sMhz %smV' % (
|
||||
position, int(list(odvf.curve.vc_points)[position].frequency / 1000000),
|
||||
int(list(odvf.curve.vc_points)[position].voltage)), None)
|
||||
else:
|
||||
printErrLog(device, 'Voltage curve Points unsupported.')
|
||||
printLogSpacer()
|
||||
|
||||
|
||||
def showXgmiErr(deviceList):
|
||||
""" Display the XGMI Error status
|
||||
|
||||
@@ -3739,6 +3833,7 @@ if __name__ == '__main__':
|
||||
groupDisplayTop.add_argument('--showproductname', help='Show product details', action='store_true')
|
||||
groupDisplayTop.add_argument('--showserial', help='Show GPU\'s Serial Number', action='store_true')
|
||||
groupDisplayTop.add_argument('--showuniqueid', help='Show GPU\'s Unique ID', action='store_true')
|
||||
groupDisplayTop.add_argument('--showvoltagerange', help='Show voltage range', action='store_true')
|
||||
groupDisplayTop.add_argument('--showbus', help='Show PCI bus number', action='store_true')
|
||||
groupDisplayPages.add_argument('--showpagesinfo', help='Show retired, pending and unreservable pages',
|
||||
action='store_true')
|
||||
@@ -3763,6 +3858,8 @@ if __name__ == '__main__':
|
||||
groupDisplay.add_argument('-o', '--showoverdrive', help='Show current GPU Clock OverDrive level',
|
||||
action='store_true')
|
||||
groupDisplay.add_argument('-p', '--showperflevel', help='Show current DPM Performance Level', action='store_true')
|
||||
groupDisplay.add_argument('-S', '--showclkvolt', help='Show supported GPU and Memory Clocks and Voltages',
|
||||
action='store_true')
|
||||
groupDisplay.add_argument('-s', '--showclkfrq', help='Show supported GPU and Memory Clock', action='store_true')
|
||||
groupDisplay.add_argument('--showmeminfo', help='Show Memory usage information for given block(s) TYPE',
|
||||
metavar='TYPE', type=str, nargs='+')
|
||||
@@ -3774,6 +3871,7 @@ if __name__ == '__main__':
|
||||
groupDisplay.add_argument('--showrasinfo',
|
||||
help='Show RAS enablement information and error counts for the specified block(s) (all if no arg given)',
|
||||
nargs='*')
|
||||
groupDisplay.add_argument('--showvc', help='Show voltage curve', action='store_true')
|
||||
groupDisplay.add_argument('--showxgmierr', help='Show XGMI error information since last read', action='store_true')
|
||||
groupDisplay.add_argument('--showtopo', help='Show hardware topology information', action='store_true')
|
||||
groupDisplay.add_argument('--showtopoaccess', help='Shows the link accessibility between GPUs ', action='store_true')
|
||||
@@ -3813,6 +3911,8 @@ if __name__ == '__main__':
|
||||
groupAction.add_argument('--setmlevel',
|
||||
help='Change GPU Memory clock frequency (MHz) and Voltage for (mV) a specific Level',
|
||||
metavar=('MCLKLEVEL', 'MCLK', 'MVOLT'), nargs=3)
|
||||
groupAction.add_argument('--setvc', help='Change SCLK Voltage Curve (MHz mV) for a specific point',
|
||||
metavar=('POINT', 'SCLK', 'SVOLT'), nargs=3)
|
||||
groupAction.add_argument('--setsrange', help='Set min and max SCLK speed', metavar=('SCLKMIN', 'SCLKMAX'), nargs=2)
|
||||
groupAction.add_argument('--setextremum', help='Set min/max of SCLK/MCLK speed', metavar=('min|max', "sclk|mclk", 'CLK'), nargs=3)
|
||||
groupAction.add_argument('--setmrange', help='Set min and max MCLK speed', metavar=('MCLKMIN', 'MCLKMAX'), nargs=2)
|
||||
@@ -3882,7 +3982,7 @@ if __name__ == '__main__':
|
||||
or args.resetclocks or args.setprofile or args.resetprofile or args.setoverdrive or args.setmemoverdrive \
|
||||
or args.setpoweroverdrive or args.resetpoweroverdrive or args.rasenable or args.rasdisable or \
|
||||
args.rasinject or args.gpureset or args.setperfdeterminism or args.setslevel or args.setmlevel or \
|
||||
args.setsrange or args.setextremum or args.setmrange or args.setclock or \
|
||||
args.setvc or args.setsrange or args.setextremum or args.setmrange or args.setclock or \
|
||||
args.setcomputepartition or args.setmemorypartition or args.resetcomputepartition or args.resetmemorypartition:
|
||||
relaunchAsSudo()
|
||||
|
||||
@@ -3929,6 +4029,7 @@ if __name__ == '__main__':
|
||||
args.showproductname = True
|
||||
args.showserial = True
|
||||
args.showuniqueid = True
|
||||
args.showvoltagerange = True
|
||||
args.showbus = True
|
||||
args.showpagesinfo = True
|
||||
args.showfan = True
|
||||
@@ -3946,12 +4047,14 @@ if __name__ == '__main__':
|
||||
args.showpids = "summary"
|
||||
args.showpidgpus = []
|
||||
args.showreplaycount = True
|
||||
args.showvc = True
|
||||
args.showcomputepartition = True
|
||||
args.showmemorypartition = True
|
||||
|
||||
if not PRINT_JSON:
|
||||
args.showprofile = True
|
||||
args.showclkfrq = True
|
||||
args.showclkvolt = True
|
||||
|
||||
# Don't do reset in combination with any other command
|
||||
if args.gpureset:
|
||||
@@ -4022,6 +4125,8 @@ if __name__ == '__main__':
|
||||
showPids(args.showpids)
|
||||
if args.showpidgpus or str(args.showpidgpus) == '[]':
|
||||
showGpusByPid(args.showpidgpus)
|
||||
if args.showclkvolt:
|
||||
showPowerPlayTable(deviceList)
|
||||
if args.showvoltage:
|
||||
showVoltage(deviceList)
|
||||
if args.showbus:
|
||||
@@ -4065,6 +4170,10 @@ if __name__ == '__main__':
|
||||
showRange(deviceList, 'sclk')
|
||||
if args.showmclkrange:
|
||||
showRange(deviceList, 'mclk')
|
||||
if args.showvoltagerange:
|
||||
showRange(deviceList, 'voltage')
|
||||
if args.showvc:
|
||||
showVoltageCurve(deviceList)
|
||||
if args.showenergycounter:
|
||||
showEnergy(deviceList)
|
||||
if args.showcomputepartition:
|
||||
@@ -4101,6 +4210,8 @@ if __name__ == '__main__':
|
||||
resetPowerOverDrive(deviceList, args.autorespond)
|
||||
if args.setprofile:
|
||||
setProfile(deviceList, args.setprofile)
|
||||
if args.setvc:
|
||||
setVoltageCurve(deviceList, args.setvc[0], args.setvc[1], args.setvc[2], args.autorespond)
|
||||
if args.setextremum:
|
||||
setClockExtremum(deviceList, args.setextremum[0], args.setextremum[1], args.setextremum[2], args.autorespond)
|
||||
if args.setsrange:
|
||||
|
||||
@@ -1286,12 +1286,16 @@ static rsmi_status_t get_od_clk_volt_info(uint32_t dv_ind,
|
||||
return RSMI_STATUS_NOT_YET_IMPLEMENTED;
|
||||
}
|
||||
|
||||
//
|
||||
// Tags expected in this file
|
||||
const std::string kTAG_OD_SCLK{"OD_SCLK:"};
|
||||
const std::string kTAG_GFXCLK{"GFXCLK:"};
|
||||
const std::string KTAG_OD_MCLK{"OD_MCLK:"};
|
||||
const std::string kTAG_GFXCLK{"GFXCLK:"};
|
||||
const std::string KTAG_MCLK{"MCLK:"};
|
||||
const std::string KTAG_SCLK{"SCLK:"};
|
||||
const std::string KTAG_OD_RANGE{"OD_RANGE:"};
|
||||
const std::string KTAG_OD_VDDGFX_OFFSET{"OD_VDDGFX_OFFSET:"};
|
||||
const std::string KTAG_FIRST_FREQ_IDX{"0:"};
|
||||
|
||||
amd::smi::TextFileTagContents_t txt_power_dev_od_voltage(val_vec);
|
||||
txt_power_dev_od_voltage
|
||||
.set_title_terminator(":", amd::smi::TagSplitterPositional_t::kLAST)
|
||||
@@ -1337,6 +1341,20 @@ static rsmi_status_t get_od_clk_volt_info(uint32_t dv_ind,
|
||||
p->curr_mclk_range.lower_bound = freq_string_to_int(build_lower_bound(KTAG_OD_MCLK), nullptr, nullptr, 0);
|
||||
p->curr_mclk_range.upper_bound = freq_string_to_int(build_upper_bound(KTAG_OD_MCLK), nullptr, nullptr, 0);
|
||||
}
|
||||
|
||||
// Validates 'OD_RANGE' is in the structure
|
||||
if (txt_power_dev_od_voltage.contains_structured_key(KTAG_OD_RANGE,
|
||||
KTAG_SCLK)) {
|
||||
od_value_pair_str_to_range(txt_power_dev_od_voltage
|
||||
.get_structured_value_by_keys(KTAG_OD_RANGE, KTAG_SCLK),
|
||||
&p->sclk_freq_limits);
|
||||
}
|
||||
if (txt_power_dev_od_voltage.contains_structured_key(KTAG_OD_RANGE,
|
||||
KTAG_MCLK)) {
|
||||
od_value_pair_str_to_range(txt_power_dev_od_voltage
|
||||
.get_structured_value_by_keys(KTAG_OD_RANGE, KTAG_MCLK),
|
||||
&p->mclk_freq_limits);
|
||||
}
|
||||
}
|
||||
// Validates 'GFXCLK' is in the structure
|
||||
else if (txt_power_dev_od_voltage.contains_structured_key(kTAG_GFXCLK,
|
||||
@@ -1354,6 +1372,8 @@ static rsmi_status_t get_od_clk_volt_info(uint32_t dv_ind,
|
||||
else {
|
||||
return RSMI_STATUS_NOT_YET_IMPLEMENTED;
|
||||
}
|
||||
|
||||
// Note: No curve entries.
|
||||
p->num_regions = 0;
|
||||
|
||||
return RSMI_STATUS_SUCCESS;
|
||||
@@ -1562,6 +1582,36 @@ rsmi_status_t rsmi_dev_od_volt_info_set(uint32_t dv_ind, uint32_t vpoint,
|
||||
}
|
||||
|
||||
|
||||
static void get_vc_region(const std::vector<std::string>& val_vec, rsmi_freq_volt_region_t& p)
|
||||
{
|
||||
std::ostringstream ss;
|
||||
ss << __PRETTY_FUNCTION__ << " | ======= start =======";
|
||||
LOG_TRACE(ss);
|
||||
|
||||
//
|
||||
amd::smi::TextFileTagContents_t txt_power_dev_od_voltage(val_vec);
|
||||
txt_power_dev_od_voltage
|
||||
.set_title_terminator(":", amd::smi::TagSplitterPositional_t::kLAST)
|
||||
.set_key_data_splitter(":", amd::smi::TagSplitterPositional_t::kBETWEEN)
|
||||
.structure_content();
|
||||
|
||||
const std::string KTAG_OD_RANGE{"OD_RANGE:"};
|
||||
const std::string KTAG_MCLK{"MCLK:"};
|
||||
const std::string KTAG_SCLK{"SCLK:"};
|
||||
if (txt_power_dev_od_voltage.contains_structured_key(KTAG_OD_RANGE,
|
||||
KTAG_SCLK)) {
|
||||
od_value_pair_str_to_range(txt_power_dev_od_voltage
|
||||
.get_structured_value_by_keys(KTAG_OD_RANGE, KTAG_SCLK),
|
||||
&p.freq_range);
|
||||
}
|
||||
if (txt_power_dev_od_voltage.contains_structured_key(KTAG_OD_RANGE,
|
||||
KTAG_MCLK)) {
|
||||
od_value_pair_str_to_range(txt_power_dev_od_voltage
|
||||
.get_structured_value_by_keys(KTAG_OD_RANGE, KTAG_MCLK),
|
||||
&p.volt_range);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* num_regions [inout] on calling, the number of regions requested to be read
|
||||
* in. At completion, the number of regions actually read in
|
||||
@@ -1606,7 +1656,11 @@ static rsmi_status_t get_od_clk_volt_curve_regions(uint32_t dv_ind,
|
||||
<< " | val_vec_size = " << std::dec
|
||||
<< val_vec_size;
|
||||
LOG_DEBUG(ss);
|
||||
|
||||
// Note: No curve entries.
|
||||
*num_regions = 0;
|
||||
// Get OD ranges.
|
||||
get_vc_region(val_vec, *p);
|
||||
|
||||
return RSMI_STATUS_SUCCESS;
|
||||
CATCH
|
||||
|
||||
@@ -1076,6 +1076,7 @@ static std::string print_pnt(rsmi_od_vddc_point_t *pt) {
|
||||
ss << "\t\t** Voltage: " << pt->voltage << " mV\n";
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
static std::string pt_vddc_curve(rsmi_od_volt_curve *c) {
|
||||
std::ostringstream ss;
|
||||
if (c == nullptr) {
|
||||
@@ -1098,6 +1099,14 @@ std::string print_rsmi_od_volt_freq_data_t(rsmi_od_volt_freq_data_t *odv) {
|
||||
|
||||
ss << pt_rng_Mhz("\t**Current SCLK frequency range: ", &odv->curr_sclk_range);
|
||||
ss << pt_rng_Mhz("\t**Current MCLK frequency range: ", &odv->curr_mclk_range);
|
||||
ss << pt_rng_Mhz("\t**Min/Max Possible SCLK frequency range: ",
|
||||
&odv->sclk_freq_limits);
|
||||
ss << pt_rng_Mhz("\t**Min/Max Possible MCLK frequency range: ",
|
||||
&odv->mclk_freq_limits);
|
||||
|
||||
ss << "\t**Current Freq/Volt. curve: " << "\n";
|
||||
ss << "\t\t N/A" << "\n";
|
||||
|
||||
ss << "\t**Number of Freq./Volt. regions: " << odv->num_regions << "\n\n";
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
@@ -93,9 +93,9 @@ void TestPerfDeterminism::Close() {
|
||||
void TestPerfDeterminism::Run(void) {
|
||||
rsmi_status_t err;
|
||||
rsmi_dev_perf_level_t pfl;
|
||||
rsmi_od_volt_freq_data_t odv;
|
||||
rsmi_od_volt_freq_data_t odv{};
|
||||
rsmi_status_t ret;
|
||||
uint64_t clkvalue;
|
||||
uint64_t clkvalue(0);
|
||||
TestBase::Run();
|
||||
if (setup_failed_) {
|
||||
std::cout << "** SetUp Failed for this test. Skipping.**" << std::endl;
|
||||
|
||||
@@ -113,22 +113,7 @@ void TestVoltCurvRead::Run(void) {
|
||||
<< amd::smi::getRSMIStatusString(ret, false) << "\n";
|
||||
}
|
||||
CHK_ERR_ASRT(ret)
|
||||
err = rsmi_dev_od_volt_info_get(i, &odv);
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**rsmi_dev_od_volt_info_get(i, &odv): "
|
||||
<< amd::smi::getRSMIStatusString(err, false)
|
||||
<< "\n"
|
||||
<< amd::smi::print_rsmi_od_volt_freq_data_t(&odv)
|
||||
<< "\n";
|
||||
}
|
||||
if (err != RSMI_STATUS_SUCCESS) {
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout <<
|
||||
"\t**rsmi_dev_od_volt_info_get: Not supported on this machine"
|
||||
<< std::endl;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// Verify api support checking functionality is working
|
||||
err = rsmi_dev_od_volt_info_get(i, nullptr);
|
||||
IF_VERB(STANDARD) {
|
||||
@@ -144,5 +129,44 @@ void TestVoltCurvRead::Run(void) {
|
||||
<< "\t**odv.num_regions = " << std::dec
|
||||
<< odv.num_regions << "\n";
|
||||
}
|
||||
if (err == RSMI_STATUS_SUCCESS) {
|
||||
std::cout << "\t**Frequency-voltage curve data:" << "\n";
|
||||
std::cout << amd::smi::print_rsmi_od_volt_freq_data_t(&odv);
|
||||
|
||||
rsmi_freq_volt_region_t *regions{};
|
||||
uint32_t num_regions;
|
||||
regions = new rsmi_freq_volt_region_t[odv.num_regions];
|
||||
ASSERT_TRUE(regions != nullptr);
|
||||
|
||||
num_regions = odv.num_regions;
|
||||
err = rsmi_dev_od_volt_curve_regions_get(i, &num_regions, regions);
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**rsmi_dev_od_volt_curve_regions_get("
|
||||
<< "i, &num_regions, regions): "
|
||||
<< amd::smi::getRSMIStatusString(err, false) << "\n"
|
||||
<< "\t**Number of regions: " << std::dec << num_regions
|
||||
<< "\n";
|
||||
}
|
||||
ASSERT_TRUE(err == RSMI_STATUS_SUCCESS
|
||||
|| err == RSMI_STATUS_NOT_SUPPORTED
|
||||
|| err == RSMI_STATUS_UNEXPECTED_DATA
|
||||
|| err == RSMI_STATUS_UNEXPECTED_SIZE
|
||||
|| err == RSMI_STATUS_INVALID_ARGS);
|
||||
if (err != RSMI_STATUS_SUCCESS) {
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**rsmi_dev_od_volt_curve_regions_get: "
|
||||
"Not supported on this machine" << std::endl;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
CHK_ERR_ASRT(err)
|
||||
ASSERT_TRUE(num_regions == odv.num_regions);
|
||||
|
||||
std::cout << "\t**Frequency-voltage curve regions:" << std::endl;
|
||||
std::cout << amd::smi::print_rsmi_od_volt_freq_regions(num_regions,
|
||||
regions);
|
||||
|
||||
delete []regions;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user