Placeholders for new ras values
Signed-off-by: Maisam Arif <maisarif@amd.com> Change-Id: I66cea253b19a5029172af0a3f4dd2f993c13b309 Signed-off-by: Maisam Arif <maisarif@amd.com>
This commit is contained in:
@@ -942,6 +942,46 @@ except AmdSmiException as e:
|
||||
print(e)
|
||||
```
|
||||
|
||||
### amdsmi_get_gpu_ras_feature_info
|
||||
|
||||
Description: Returns RAS version and schema information
|
||||
It is not supported on virtual machine guest
|
||||
|
||||
Input parameters:
|
||||
|
||||
* `processor_handle` device which to query
|
||||
|
||||
Output: List containing dictionaries with fields
|
||||
|
||||
Field | Description
|
||||
---|---
|
||||
`eeprom_version` | eeprom version
|
||||
`parity_schema` | parity schema
|
||||
`single_bit_schema` | single bit schema
|
||||
`double_bit_schema` | double bit schema
|
||||
`poison_schema` | poison schema
|
||||
|
||||
Exceptions that can be thrown by `amdsmi_get_gpu_ras_feature_info` function:
|
||||
|
||||
* `AmdSmiLibraryException`
|
||||
* `AmdSmiRetryException`
|
||||
* `AmdSmiParameterException`
|
||||
|
||||
Example:
|
||||
|
||||
```python
|
||||
try:
|
||||
devices = amdsmi_get_processor_handles()
|
||||
if len(devices) == 0:
|
||||
print("No GPUs on machine")
|
||||
else:
|
||||
for device in devices:
|
||||
ras_info = amdsmi_get_gpu_ras_feature_info(device)
|
||||
print(ras_info)
|
||||
except AmdSmiException as e:
|
||||
print(e)
|
||||
```
|
||||
|
||||
### amdsmi_get_gpu_ras_block_features_enabled
|
||||
|
||||
Description: Returns status of each RAS block for the given GPU.
|
||||
|
||||
@@ -66,6 +66,7 @@ from .amdsmi_interface import amdsmi_get_gpu_total_ecc_count
|
||||
from .amdsmi_interface import amdsmi_get_gpu_board_info
|
||||
|
||||
# # Ras Information
|
||||
from .amdsmi_interface import amdsmi_get_gpu_ras_feature_info
|
||||
from .amdsmi_interface import amdsmi_get_gpu_ras_block_features_enabled
|
||||
|
||||
# # Unsupported Functions In Virtual Environment
|
||||
|
||||
@@ -832,9 +832,26 @@ def amdsmi_get_gpu_board_info(
|
||||
}
|
||||
|
||||
|
||||
def amdsmi_get_gpu_ras_block_features_enabled(
|
||||
def amdsmi_get_gpu_ras_feature_info(
|
||||
processor_handle: amdsmi_wrapper.amdsmi_processor_handle,
|
||||
) -> Dict[str, Any]:
|
||||
if not isinstance(processor_handle, amdsmi_wrapper.amdsmi_processor_handle):
|
||||
raise AmdSmiParameterException(
|
||||
processor_handle, amdsmi_wrapper.amdsmi_processor_handle
|
||||
)
|
||||
# Dummy data waiting on population
|
||||
ras_info = {"eeprom_version": "N/A",
|
||||
"parity_schema" : "N/A",
|
||||
"single_bit_schema" : "N/A",
|
||||
"double_bit_schema" : "N/A",
|
||||
"poison_schema" : "N/A"}
|
||||
|
||||
return ras_info
|
||||
|
||||
|
||||
def amdsmi_get_gpu_ras_block_features_enabled(
|
||||
processor_handle: amdsmi_wrapper.amdsmi_processor_handle,
|
||||
) -> List[Dict[str, Any]]:
|
||||
if not isinstance(processor_handle, amdsmi_wrapper.amdsmi_processor_handle):
|
||||
raise AmdSmiParameterException(
|
||||
processor_handle, amdsmi_wrapper.amdsmi_processor_handle
|
||||
|
||||
Reference in New Issue
Block a user