diff --git a/projects/amdsmi/docs/how-to/amdsmi-py-lib.md b/projects/amdsmi/docs/how-to/amdsmi-py-lib.md index 2fc1833f7c..3fd2cd964b 100644 --- a/projects/amdsmi/docs/how-to/amdsmi-py-lib.md +++ b/projects/amdsmi/docs/how-to/amdsmi-py-lib.md @@ -125,26 +125,34 @@ Exceptions that can be thrown by AMD SMI are: When this exception is thrown, `err_code` and `err_info` are set. `err_code` is an integer that corresponds to errors that can occur in amdsmi-lib and `err_info` is a string that explains the error that occurred. - For example: - ```python try: num_of_GPUs = len(amdsmi_get_processor_handles()) - if num_of_GPUs == 0: - print("No GPUs on machine") - except AmdSmiException as e: - print("Error code: {}".format(e.err_code)) - if e.err_code == amdsmi_wrapper.AMDSMI_STATUS_RETRY: - print("Error info: {}".format(e.err_info)) + except amdsmi_exception.AmdSmiLibraryException as e: + print("Unable to get processor handles, error: {} {}".format(str(e.get_error_code()), e.err_info)) ``` -* `AmdSmiRetryException` : Derives `AmdSmiLibraryException` class and signals - device is busy and call should be retried. -* `AmdSmiTimeoutException` : Derives `AmdSmiLibraryException` class and - represents that call had timed out. + * `AmdSmiParameterException`: Derives base `AmdSmiException` class and represents errors related to invaild parameters passed to functions. When this exception is thrown, `err_msg` is set and it explains what is the actual and expected type of the parameters. -* `AmdSmiBdfFormatException`: Derives base `AmdSmiException` class and - represents invalid bdf format. + + For example: + + ```python + try: + processor_handles = amdsmi_get_cpusocket_handles() + if len(processor_handles) == 0: + print("No CPU sockets on machine") + else: + for processor in processor_handles: + temperature = amdsmi_get_cpu_socket_temperature(processor) + print(temperature) + except amdsmi_exception.AmdSmiParameterException as e: + print("Invalid parameter error: {} {}".format(str(e.get_error_code()), e.err_msg)) + except amdsmi_exception.AmdSmiLibraryException as e: + print("Unable to get processor handles, error: {} {}".format(str(e.get_error_code()), e.err_info)) + ``` + + diff --git a/projects/amdsmi/docs/reference/amdsmi-py-api.md b/projects/amdsmi/docs/reference/amdsmi-py-api.md index 7ccf0ca870..7f39dd227e 100644 --- a/projects/amdsmi/docs/reference/amdsmi-py-api.md +++ b/projects/amdsmi/docs/reference/amdsmi-py-api.md @@ -29,6 +29,12 @@ Output: `None` Exceptions that can be thrown by `amdsmi_init` function: * `AmdSmiLibraryException` +* `AmdSmiTimeoutException` + +#### Possible Library Exceptions + +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_INVAL` - Invalid parameters Initialize GPUs only example: @@ -75,6 +81,12 @@ Output: `None` Exceptions that can be thrown by `amdsmi_shut_down` function: * `AmdSmiLibraryException` +* `AmdSmiTimeoutException` + +#### Possible Library Exceptions + +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_INVAL` - Invalid parameters Example: @@ -99,6 +111,13 @@ Exceptions that can be thrown by `amdsmi_get_processor_type` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported + Example: ```python @@ -122,6 +141,15 @@ Exceptions that can be thrown by `amdsmi_get_processor_handles` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_INIT` - Device not initialized +- `AMDSMI_STATUS_DRIVER_NOT_LOADED` - Driver not loaded +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported + Example: ```python @@ -175,6 +203,14 @@ Exceptions that can be thrown by `amdsmi_get_socket_info` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -208,6 +244,14 @@ Exceptions that can be thrown by `amdsmi_get_processor_handle_from_bdf` function * `AmdSmiLibraryException` * `AmdSmiBdfFormatException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -239,6 +283,14 @@ Exceptions that can be thrown by `amdsmi_get_gpu_device_bdf` function: * `AmdSmiParameterException` * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -264,6 +316,14 @@ Exceptions that can be thrown by `amdsmi_get_gpu_device_uuid` function: * `AmdSmiParameterException` * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -295,9 +355,16 @@ Field | Content Exceptions that can be thrown by `amdsmi_get_gpu_enumeration_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported + Example: ```python @@ -335,6 +402,15 @@ Exceptions that can be thrown by `amdsmi_get_gpu_driver_info` function: * `AmdSmiParameterException` * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_DRIVER_NOT_LOADED` - Driver not loaded +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported + Example: ```python @@ -371,9 +447,17 @@ Field | Content Exceptions that can be thrown by `amdsmi_get_gpu_asic_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_FILE_ERROR` - Problem accessing a file +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported + Example: ```python @@ -408,9 +492,16 @@ Field | Content Exceptions that can be thrown by `amdsmi_get_gpu_kfd_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported + Example: ```python @@ -434,7 +525,6 @@ on the given GPU. It is not supported on virtual machine guest Input parameters: * `processor_handle` device which to query -* `sensor_ind` The Package Power Tracking (PPT) type to query Output: Dictionary with fields @@ -449,9 +539,16 @@ Field | Description | Units Exceptions that can be thrown by `amdsmi_get_power_cap_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported + Example: ```python @@ -461,7 +558,7 @@ try: print("No GPUs on machine") else: for device in devices: - power_cap_info = amdsmi_get_power_cap_info(device, 0) + power_cap_info = amdsmi_get_power_cap_info(device) print(power_cap_info['power_cap']) print(power_cap_info['dpm_cap']) print(power_cap_info['default_power_cap']) @@ -471,43 +568,6 @@ except AmdSmiException as e: print(e) ``` -### amdsmi_get_supported_power_cap - -Description: Returns dictionary of Package Power Tracking (PPT) types as currently -configured on the given GPU. It is not supported on virtual machine guest - -Input parameters: - -* `processor_handle` device which to query - -Output: Dictionary with fields - -Field | Description | Units ----|--- -`sensor_inds` | List of integer indices of the supported ppt types. 0 indicates PPT0 and 1 indicates PPT1. Should be used as input for `amdsmi_get_power_cap_info` and `amdsmi_set_power_cap_info`. -`sensor_types` | Enum `AmdSmiPowerCapType` that corresponds to the ppt types that are supported on the device. - -Exceptions that can be thrown by `amdsmi_get_supported_power_cap` function: - -* `AmdSmiLibraryException` -* `AmdSmiParameterException` - -Example: - -```python -try: - devices = amdsmi_get_processor_handles() - if len(devices) == 0: - print("No GPUs on machine") - else: - for device in devices: - power_cap_types = amdsmi_get_supported_power_cap(device) - print(power_cap_types['sensor_inds']) - print(power_cap_types['sensor_types']) -except AmdSmiException as e: - print(e) -``` - ### amdsmi_get_gpu_vram_info Description: Returns dictionary of vram information for the given GPU. @@ -528,9 +588,16 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_gpu_vram_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported + Example: ```python @@ -570,9 +637,14 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_gpu_board_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_BUSY` - Processor busy + Example: ```python @@ -607,6 +679,12 @@ Exceptions that can be thrown by `amdsmi_get_gpu_revision` function: * `AmdSmiLibraryException` If the processor handle is invalid. * `AmdSmiParameterException` If the underlying library call fails. +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_INVAL` - Invalid parameters + Example: ```python @@ -660,9 +738,13 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_gpu_cache_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -704,9 +786,15 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_gpu_vbios_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_FILE_ERROR` - Problem accessing a file +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -743,9 +831,17 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_fw_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + + Example: ```python @@ -784,9 +880,16 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_gpu_activity` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -828,9 +931,15 @@ Field | Description | Units Exceptions that can be thrown by `amdsmi_get_power_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters + Example: ```python @@ -869,9 +978,16 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_gpu_vram_usage` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -938,10 +1054,17 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_violation_status` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` * `AmdSmiTimeoutException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -1022,9 +1145,16 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_clock_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -1063,9 +1193,16 @@ Fields | Description Exceptions that can be thrown by `amdsmi_get_pcie_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -1103,9 +1240,16 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_gpu_bad_page_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -1142,9 +1286,16 @@ Output: Bad page threshold value Exceptions that can be thrown by `amdsmi_get_gpu_bad_page_threshold` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -1181,9 +1332,16 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_gpu_memory_reserved_pages` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -1229,9 +1387,17 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_gpu_process_list` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_NO_PERM` - Permission Denied + Example: ```python @@ -1275,9 +1441,16 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_gpu_total_ecc_count` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -1310,8 +1483,12 @@ Input parameters: * `cursor` the zero based index at which to start retrieving cper entries; default value is 0; for example, if there are 10 cper entries available, then with a cursor value of 8, it will retrieve the last two cper entries only Output: Dictionary with fields, updated cursor, and a dictionary of the cper_data, status_code + status_code: + AMDSMI_STATUS_SUCCESS: If all entries were retrieved successfully + AMDSMI_STATUS_MORE_DATA: If some of the entries were retrieved and: + * A subsequent call to the API with the updated cursor will result in the fetching the next batch of entries, or + * Increasing the input buffer_size will allow more entries to be fetched with the same cursor -Output1: Dictionary with fields Field | Description ---|--- `error_severity` | The severity of the CPER error ex: `non_fatal_uncorrected`, `fatal`, `non_fatal_corrected`. | @@ -1322,30 +1499,24 @@ Field | Description `signature_end` | A marker value (typically `0xFFFFFFFF`) confirming the integrity of the signature. | `sec_cnt` | The count of sections included in the CPER entry. | `record_length` | The total length in bytes of the CPER entry. | -`serial_number` | The product serial number. Exists in raw entries in C++ API | `platform_id` | A character array identifying the GPU or platform. | `creator_id` | A character array indicating the creator of the CPER entry. | `record_id` | A unique identifier for the CPER entry. | `flags` | Reserved flags related to the CPER entry. | `persistence_info` | Reserved information related to persistence. | -Output2: Updated cursor (int type) -* Cursor is the index of the next cper entry in the GPU ring buffer. For example, if 10 entries were fetched successfully, the value of cursor will be 11 upon return from the API. Subsequent call to the API with cursor value of 11 should fetch the next entry - -Output3: A list of dictionaries, each dictionary containing the CPER record and its size: -* {"bytes": , "size": } - -Output4: status_code - AMDSMI_STATUS_SUCCESS: If all entries were retrieved successfully - AMDSMI_STATUS_MORE_DATA: If some of the entries were retrieved and: - * A subsequent call to the API with the updated cursor will result in the fetching the next batch of entries, or - * Increasing the input buffer_size will allow more entries to be fetched with the same cursor - Exceptions that can be thrown by `amdsmi_get_gpu_cper_entries` function: * `AmdSmiLibraryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_NO_PERM` - Permission Denied +- `AMDSMI_STATUS_FILE_NOT_FOUND` - File or directory not found +- `AMDSMI_STATUS_FILE_ERROR` - Problem accessing a file + Example: ```python @@ -1375,11 +1546,14 @@ Output: Tuple[List[int], int]: A tuple containing: Exceptions that can be thrown by `amdsmi_get_gpu_cper_entries` function: * `AmdSmiParameterException` -* `AmdSmiLibraryException` with these possible error codes: - AMDSMI_STATUS_INVAL - AMDSMI_STATUS_UNEXPECTED_SIZE - AMDSMI_STATUS_UNEXPECTED_DATA - AMDSMI_STATUS_NOT_SUPPORTED +* `AmdSmiLibraryException` + +#### Possible Library Exceptions + +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_UNEXPECTED_SIZE` - unexpected size of data was read +- `AMDSMI_STATUS_UNEXPECTED_DATA` - The data read or provided was unexpected +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported Example 1: Using a single CPER record as bytes @@ -1435,9 +1609,16 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_gpu_ras_feature_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported" +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported" +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented" +- `AMDSMI_STATUS_INVAL` - Invalid parameters" +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call" + Example: ```python @@ -1491,9 +1672,17 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_gpu_ras_block_features_enabled` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_API_FAILED` - API call failed +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -1604,9 +1793,17 @@ Output: None Exceptions that can be thrown by `amdsmi_set_gpu_pci_bandwidth` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_NO_PERM` - Permission Denied +- `AMDSMI_STATUS_INVAL` - Invalid parameters + Example: ```python @@ -1638,9 +1835,17 @@ Output: None Exceptions that can be thrown by `amdsmi_set_power_cap` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_NO_PERM` - Permission Denied + Example: ```python @@ -1672,9 +1877,17 @@ Output: None Exceptions that can be thrown by `amdsmi_set_gpu_power_profile` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_NO_PERM` - Permission Denied + Example: ```python @@ -1707,9 +1920,16 @@ Output: None Exceptions that can be thrown by `amdsmi_set_gpu_clk_range` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_INVAL` - Invalid parameters + Example: ```python @@ -1749,9 +1969,16 @@ BDFID = ((DOMAIN & 0xffffffff) << 32) | ((BUS & 0xff) << 8) | Exceptions that can be thrown by `amdsmi_get_gpu_bdf_id` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -1794,9 +2021,16 @@ Field | Content Exceptions that can be thrown by `amdsmi_get_gpu_pci_bandwidth` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -1831,9 +2065,16 @@ Field | Content Exceptions that can be thrown by `amdsmi_get_gpu_pci_throughput` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_INVAL` - Invalid parameters + Example: ```python @@ -1863,9 +2104,16 @@ The sum of the NAK's received and generated by the GPU Exceptions that can be thrown by `amdsmi_get_gpu_pci_replay_counter` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -1894,9 +2142,17 @@ Output: NUMA node value Exceptions that can be thrown by `amdsmi_get_gpu_topo_numa_affinity` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_NOT_FOUND` - Device Not found +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -1934,9 +2190,16 @@ Field | Content Exceptions that can be thrown by `amdsmi_get_energy_count` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -1966,9 +2229,16 @@ Output: total amount of memory Exceptions that can be thrown by `amdsmi_get_gpu_memory_total` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_INVAL` - Invalid parameters + Example: ```python @@ -2006,9 +2276,16 @@ Output: None Exceptions that can be thrown by `amdsmi_set_gpu_od_clk_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_INVAL` - Invalid parameters + Example: ```python @@ -2042,9 +2319,17 @@ Output: the amount of memory currently being used Exceptions that can be thrown by `amdsmi_get_gpu_memory_usage` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_FILE_ERROR` - Problem accessing a file +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_INVAL` - Invalid parameters + Example: ```python @@ -2081,9 +2366,16 @@ Output: None Exceptions that can be thrown by `amdsmi_set_gpu_od_volt_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_INVAL` - Invalid parameters + Example: ```python @@ -2114,9 +2406,16 @@ Output: Fan speed in rpms as integer Exceptions that can be thrown by `amdsmi_get_gpu_fan_rpms` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -2148,9 +2447,16 @@ Output: Fan speed in relative to MAX Exceptions that can be thrown by `amdsmi_get_gpu_fan_speed` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -2182,9 +2488,16 @@ Output: Max fan speed as integer Exceptions that can be thrown by `amdsmi_get_gpu_fan_speed_max` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -2213,9 +2526,16 @@ Output: Bool true if power management enabled else false Exceptions that can be thrown by `amdsmi_is_gpu_power_management_enabled` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -2248,9 +2568,16 @@ Output: Temperature as integer in millidegrees Celcius Exceptions that can be thrown by `amdsmi_get_temp_metric` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -2288,6 +2615,14 @@ Exceptions that can be thrown by `amdsmi_get_gpu_volt_metric` function: * `AmdSmiLibraryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -2326,9 +2661,16 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_utilization_count` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -2371,9 +2713,16 @@ Output: Performance level as enum value of dev_perf_level_t Exceptions that can be thrown by `amdsmi_get_gpu_perf_level` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -2404,9 +2753,17 @@ Output: None Exceptions that can be thrown by `amdsmi_set_gpu_perf_determinism_mode` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_NO_PERM` - Permission Denied + Example: ```python @@ -2434,9 +2791,17 @@ Output: integer corresponding to isolation_status; 0 - disabled, 1 - enabled Exceptions that can be thrown by `amdsmi_get_gpu_process_isolation` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_NO_PERM` - Permission Denied + Example: ```python @@ -2466,9 +2831,17 @@ Output: None Exceptions that can be thrown by `amdsmi_set_gpu_process_isolation` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_NO_PERM` - Permission Denied + Example: ```python @@ -2496,9 +2869,17 @@ Output: None Exceptions that can be thrown by `amdsmi_clean_gpu_local_data` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_NO_PERM` - Permission Denied + Example: ```python @@ -2527,9 +2908,16 @@ Output: Overdrive percentage as integer Exceptions that can be thrown by `amdsmi_get_gpu_overdrive_level` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -2559,9 +2947,16 @@ Output: Overdrive percentage as integer Exceptions that can be thrown by `amdsmi_get_gpu_mem_overdrive_level` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -2598,9 +2993,16 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_clk_freq` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -2639,9 +3041,16 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_gpu_od_volt_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -2731,9 +3140,16 @@ Output: Dictionary with fields Exceptions that can be thrown by `amdsmi_get_gpu_metrics_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -2767,9 +3183,16 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_gpu_pm_metrics_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_INVAL` - Invalid parameters + Example: ```python @@ -2803,9 +3226,16 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_gpu_reg_table_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_INVAL` - Invalid parameters + Example: ```python @@ -2840,9 +3270,18 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_gpu_od_volt_curve_regions` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_UNEXPECTED_SIZE` - unexpected size of data was read +- `AMDSMI_STATUS_UNEXPECTED_DATA` - The data read or provided was unexpected +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -2878,9 +3317,16 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_gpu_power_profile_presets` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -2910,9 +3356,16 @@ Output: None Exceptions that can be thrown by `amdsmi_gpu_counter_group_supported` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -2941,9 +3394,16 @@ Output: An event handle of the newly created performance counter object Exceptions that can be thrown by `amdsmi_gpu_create_counter` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -2971,9 +3431,16 @@ Output: None Exceptions that can be thrown by `amdsmi_gpu_destroy_counter` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_INVAL` - Invalid parameters + Example: ```python @@ -3004,9 +3471,16 @@ Output: None Exceptions that can be thrown by `amdsmi_gpu_control_counter` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_INVAL` - Invalid parameters + Example: ```python @@ -3041,9 +3515,16 @@ Field | Description Exceptions that can be thrown by `amdsmi_gpu_read_counter` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_INVAL` - Invalid parameters + Example: ```python @@ -3074,9 +3555,16 @@ Output: Number of available counters for the given device of the inputted event Exceptions that can be thrown by `amdsmi_get_gpu_available_counters` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_INVAL` - Invalid parameters + Example: ```python @@ -3107,9 +3595,17 @@ Output: None Exceptions that can be thrown by `amdsmi_set_gpu_perf_level` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_NO_PERM` - Permission Denied + Example: ```python @@ -3138,9 +3634,13 @@ Output: None Exceptions that can be thrown by `amdsmi_reset_gpu` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_INVAL` - Invalid parameters + Example: ```python @@ -3171,9 +3671,14 @@ Output: None Exceptions that can be thrown by `amdsmi_set_gpu_fan_speed` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_NO_PERM` - Permission Denied + Example: ```python @@ -3203,9 +3708,13 @@ Output: None Exceptions that can be thrown by `amdsmi_reset_gpu_fan` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -3239,9 +3748,15 @@ Output: None Exceptions that can be thrown by `amdsmi_set_clk_freq` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NO_PERM` - Permission Denied +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -3277,9 +3792,15 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_soc_pstate` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_INIT` - Device not initialized +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported + Example: ```python @@ -3309,9 +3830,17 @@ Output: None Exceptions that can be thrown by `amdsmi_set_soc_pstate` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_NO_PERM` - Permission Denied + Example: ```python @@ -3340,9 +3869,17 @@ Output: None Exceptions that can be thrown by `amdsmi_set_xgmi_plpd` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_NO_PERM` - Permission Denied + Example: ```python @@ -3376,9 +3913,16 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_xgmi_plpd` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -3410,9 +3954,17 @@ Output: None Exceptions that can be thrown by `amdsmi_set_gpu_overdrive_level` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_NO_PERM` - Permission Denied + Example: ```python @@ -3452,9 +4004,16 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_gpu_ecc_count` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -3488,9 +4047,16 @@ Output: Enabled ECC bit-mask Exceptions that can be thrown by `amdsmi_get_gpu_ecc_enabled` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -3525,9 +4091,16 @@ Output: ECC status for a requested GPU block Exceptions that can be thrown by `amdsmi_get_gpu_ecc_status` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -3557,6 +4130,12 @@ Exceptions that can be thrown by `amdsmi_status_code_to_string` function: * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -3587,7 +4166,15 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_gpu_compute_process_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` + +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INSUFFICIENT_SIZE` - Insufficient size for operation +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call Example: @@ -3622,9 +4209,17 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_gpu_compute_process_info_by_pid` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_FOUND` - Device Not found +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -3649,9 +4244,17 @@ Output: List of indices of devices currently being used by the process Exceptions that can be thrown by `amdsmi_get_gpu_compute_process_gpus` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_NOT_FOUND` - Device Not found +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -3677,9 +4280,16 @@ Output: XGMI error status for a requested device Exceptions that can be thrown by `amdsmi_gpu_xgmi_error_status` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -3709,9 +4319,17 @@ Output: None Exceptions that can be thrown by `amdsmi_reset_gpu_xgmi_error` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_STATUS_NO_PERM` - Permission Denied + Example: ```python @@ -3739,9 +4357,16 @@ Output: device vendor name Exceptions that can be thrown by `amdsmi_get_gpu_vendor_name` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -3770,9 +4395,16 @@ Output: device id Exceptions that can be thrown by `amdsmi_get_gpu_id` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -3801,9 +4433,16 @@ Output: vram vendor Exceptions that can be thrown by `amdsmi_get_gpu_vram_vendor` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -3832,9 +4471,16 @@ Output: subsystem device id Exceptions that can be thrown by `amdsmi_get_gpu_subsystem_id` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -3863,9 +4509,16 @@ Output: device subsytem Exceptions that can be thrown by `amdsmi_get_gpu_subsystem_name` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -3894,9 +4547,16 @@ Output: node number of NUMA CPU for the device Exceptions that can be thrown by `amdsmi_topo_get_numa_node_number` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -3926,9 +4586,16 @@ Output: the weight for a connection between 2 GPUs Exceptions that can be thrown by `amdsmi_topo_get_link_weight` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -3964,9 +4631,16 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_minmax_bandwidth_between_processors` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4010,6 +4684,14 @@ Exceptions that can be thrown by `amdsmi_get_link_metrics` function: * `AmdSmiLibraryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4057,9 +4739,16 @@ Field | Description Exceptions that can be thrown by `amdsmi_topo_get_link_type` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4105,9 +4794,16 @@ Fields | Description Exceptions that can be thrown by `amdsmi_get_P2P_status` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4148,9 +4844,16 @@ Output: P2P availability status between 2 GPUs Exceptions that can be thrown by `amdsmi_is_P2P_accessible` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4180,9 +4883,17 @@ Output: String of the partition type Exceptions that can be thrown by `amdsmi_get_gpu_compute_partition` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call +- `AMDSMI_COMPUTE_PARTITION_INVALID` - Invalid compute partition type + Example: ```python @@ -4212,9 +4923,18 @@ Output: String of the partition type Exceptions that can be thrown by `amdsmi_set_gpu_compute_partition` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_NO_PERM` - Permission Denied +- `AMDSMI_STATUS_SETTING_UNAVAILABLE` - Setting is not available +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4244,9 +4964,16 @@ Output: String of the partition type Exceptions that can be thrown by `amdsmi_get_gpu_memory_partition` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4276,9 +5003,17 @@ Output: String of the partition type Exceptions that can be thrown by `amdsmi_set_gpu_memory_partition` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_NO_PERM` - Permission Denied +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4314,9 +5049,16 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_gpu_accelerator_partition_profile` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4352,9 +5094,16 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_xgmi_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4390,6 +5139,14 @@ Exceptions that can be thrown by `amdsmi_get_link_topology_nearest` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4442,6 +5199,14 @@ Exceptions that can be thrown by `amdsmi_get_gpu_virtualization_mode` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4472,9 +5237,13 @@ Field | Description Exceptions that can be thrown by `amdsmi_get_gpu_vram_info` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_FOUND` - Device Not found +- `AMDSMI_STATUS_INVAL` - Invalid parameters + Example: ```python @@ -4507,6 +5276,14 @@ Exceptions that can be thrown by `amdsmi_get_processor_info` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4531,6 +5308,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_hsmp_proto_ver` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4556,6 +5341,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_family` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4576,6 +5369,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_hsmp_driver_version` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4602,6 +5403,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_smu_fw_version` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4629,6 +5438,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_prochot_status` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4654,6 +5471,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_fclk_mclk` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4681,6 +5506,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_cclk_limit` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4706,6 +5539,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_socket_current_active_freq_limi * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4733,6 +5574,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_socket_freq_range` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4760,6 +5609,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_core_current_freq_limit` functi * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4785,6 +5642,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_socket_power` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4810,6 +5675,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_socket_power_cap` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4835,6 +5708,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_socket_power_cap_max` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4860,6 +5741,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_pwr_svi_telemetry_all_rails` fu * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4885,6 +5774,14 @@ Exceptions that can be thrown by `amdsmi_set_cpu_socket_power_cap` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4909,6 +5806,11 @@ Exceptions that can be thrown by `amdsmi_set_cpu_pwr_efficiency_mode` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4933,6 +5835,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_core_boostlimit` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4958,6 +5868,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_socket_c0_residency` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -4983,6 +5901,14 @@ Exceptions that can be thrown by `amdsmi_set_cpu_core_boostlimit` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -5007,6 +5933,14 @@ Exceptions that can be thrown by `amdsmi_set_cpu_socket_boostlimit` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -5031,6 +5965,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_ddr_bw` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -5058,6 +6000,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_socket_temperature` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -5083,6 +6033,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_dimm_temp_range_and_refresh_rat * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -5109,6 +6067,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_dimm_power_consumption` functio * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -5136,6 +6102,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_dimm_thermal_sensor` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -5164,6 +6138,14 @@ Exceptions that can be thrown by `amdsmi_set_cpu_xgmi_width` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -5188,6 +6170,14 @@ Exceptions that can be thrown by `amdsmi_set_cpu_gmi3_link_width_range` function * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -5212,6 +6202,14 @@ Exceptions that can be thrown by `amdsmi_cpu_apb_enable` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -5236,6 +6234,14 @@ Exceptions that can be thrown by `amdsmi_cpu_apb_disable` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -5260,6 +6266,14 @@ Exceptions that can be thrown by `amdsmi_set_cpu_socket_lclk_dpm_level` function * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -5284,6 +6298,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_socket_lclk_dpm_level` function * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -5310,6 +6332,14 @@ Exceptions that can be thrown by `amdsmi_set_cpu_pcie_link_rate` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -5334,6 +6364,14 @@ Exceptions that can be thrown by `amdsmi_set_cpu_df_pstate_range` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -5357,6 +6395,15 @@ Output: link id and bw type to which io bandwidth to be obtained Exceptions that can be thrown by `amdsmi_get_cpu_current_io_bandwidth` function: * `AmdSmiLibraryException` +* `AmdSmiParameterException` + +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call Example: @@ -5383,6 +6430,11 @@ Exceptions that can be thrown by `amdsmi_get_cpu_current_xgmi_bw` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -5408,6 +6460,14 @@ Exceptions that can be thrown by `amdsmi_get_hsmp_metrics_table_version` functio * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -5433,6 +6493,14 @@ Exceptions that can be thrown by `amdsmi_get_hsmp_metrics_table` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -5464,6 +6532,14 @@ Exceptions that can be thrown by `amdsmi_first_online_core_on_cpu_socket` functi * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -5489,6 +6565,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_family` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -5509,6 +6593,14 @@ Exceptions that can be thrown by `amdsmi_get_cpu_model` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -5529,6 +6621,11 @@ Exceptions that can be thrown by `amdsmi_get_cpu_model_name` function: * `AmdSmiLibraryException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python @@ -5550,9 +6647,16 @@ Output: amdsmi build version Exceptions that can be thrown by `amdsmi_get_lib_version` function: * `AmdSmiLibraryException` -* `AmdSmiRetryException` * `AmdSmiParameterException` +#### Possible Library Exceptions + +- `AMDSMI_STATUS_NOT_SUPPORTED` - Feature not supported +- `AMDSMI_STATUS_NOT_YET_IMPLEMENTED` - Feature not yet implemented +- `AMDSMI_STATUS_NO_HSMP_MSG_SUP` - HSMP message/feature not supported +- `AMDSMI_STATUS_INVAL` - Invalid parameters +- `AMDSMI_STATUS_TIMEOUT` - Timeout in API call + Example: ```python diff --git a/projects/amdsmi/py-interface/__init__.py b/projects/amdsmi/py-interface/__init__.py index c0aafb21d7..b5aa300658 100644 --- a/projects/amdsmi/py-interface/__init__.py +++ b/projects/amdsmi/py-interface/__init__.py @@ -319,6 +319,5 @@ from .amdsmi_exception import AmdSmiLibraryException from .amdsmi_exception import AmdSmiRetryException from .amdsmi_exception import AmdSmiParameterException from .amdsmi_exception import AmdSmiKeyException -from .amdsmi_exception import AmdSmiBdfFormatException from .amdsmi_exception import AmdSmiTimeoutException from .amdsmi_exception import AmdSmiException diff --git a/projects/amdsmi/py-interface/amdsmi_exception.py b/projects/amdsmi/py-interface/amdsmi_exception.py index fa0fc413e0..2f9fa506f0 100644 --- a/projects/amdsmi/py-interface/amdsmi_exception.py +++ b/projects/amdsmi/py-interface/amdsmi_exception.py @@ -79,6 +79,7 @@ class AmdSmiLibraryException(AmdSmiException): amdsmi_wrapper.AMDSMI_STATUS_NOT_INIT : "AMDSMI_STATUS_NOT_INIT - Device not initialized", amdsmi_wrapper.AMDSMI_STATUS_NO_SLOT : "AMDSMI_STATUS_NO_SLOT - No more free slot", amdsmi_wrapper.AMDSMI_STATUS_DRIVER_NOT_LOADED : "AMDSMI_STATUS_DRIVER_NOT_LOADED - Driver not loaded", + amdsmi_wrapper.AMDSMI_STATUS_MORE_DATA : "AMDSMI_STATUS_MORE_DATA - There is more data than the buffer size the user passed", amdsmi_wrapper.AMDSMI_STATUS_NO_DATA : "AMDSMI_STATUS_NO_DATA - No data was found for given input", amdsmi_wrapper.AMDSMI_STATUS_INSUFFICIENT_SIZE : "AMDSMI_STATUS_INSUFFICIENT_SIZE - Insufficient size for operation", amdsmi_wrapper.AMDSMI_STATUS_UNEXPECTED_SIZE : "AMDSMI_STATUS_UNEXPECTED_SIZE - unexpected size of data was read", @@ -93,10 +94,10 @@ class AmdSmiLibraryException(AmdSmiException): amdsmi_wrapper.AMDSMI_STATUS_NO_DRV : "AMDSMI_STATUS_NO_DRV - No Energy and HSMP driver present", amdsmi_wrapper.AMDSMI_STATUS_FILE_NOT_FOUND : "AMDSMI_STATUS_FILE_NOT_FOUND - File or directory not found", amdsmi_wrapper.AMDSMI_STATUS_ARG_PTR_NULL : "AMDSMI_STATUS_ARG_PTR_NULL - Parsed argument is invalid", - amdsmi_wrapper.AMDSMI_STATUS_MAP_ERROR : "AMDSMI_STATUS_MAP_ERROR - The internal library error did not map to a status code", amdsmi_wrapper.AMDSMI_STATUS_AMDGPU_RESTART_ERR: "AMDSMI_STATUS_AMDGPU_RESTART_ERR - AMDGPU restart failed, please check dmsg for errors", amdsmi_wrapper.AMDSMI_STATUS_SETTING_UNAVAILABLE: "AMDSMI_STATUS_SETTING_UNAVAILABLE - Setting is not available", amdsmi_wrapper.AMDSMI_STATUS_CORRUPTED_EEPROM: "AMDSMI_STATUS_CORRUPTED_EEPROM - Setting is not available", + amdsmi_wrapper.AMDSMI_STATUS_MAP_ERROR : "AMDSMI_STATUS_MAP_ERROR - The internal library error did not map to a status code", amdsmi_wrapper.AMDSMI_STATUS_UNKNOWN_ERROR : "AMDSMI_STATUS_UNKNOWN_ERROR - An unknown error occurred" } @@ -146,7 +147,6 @@ class AmdSmiKeyException(AmdSmiException): def __str__(self): return self.err_msg - class AmdSmiBdfFormatException(AmdSmiException): def __init__(self, bdf): super().__init__() @@ -161,4 +161,4 @@ class AmdSmiBdfFormatException(AmdSmiException): + "\t is 2 hex digits long from 00-FF interval\n" + "\t is 2 hex digits long from 00-1F interval\n" + "\t is 1 hex digit long from 0-7 interval" - ).format(self.bdf) + ).format(self.bdf) \ No newline at end of file diff --git a/projects/amdsmi/py-interface/amdsmi_interface.py b/projects/amdsmi/py-interface/amdsmi_interface.py index fbe7bb65ae..b8934cb15e 100644 --- a/projects/amdsmi/py-interface/amdsmi_interface.py +++ b/projects/amdsmi/py-interface/amdsmi_interface.py @@ -1728,6 +1728,10 @@ def amdsmi_get_cpu_current_io_bandwidth( raise AmdSmiParameterException( processor_handle, amdsmi_wrapper.amdsmi_processor_handle ) + if not isinstance(encoding, int): + raise AmdSmiParameterException(encoding, int) + if not isinstance(link_name, str): + raise AmdSmiParameterException(link_name, str) link = amdsmi_wrapper.amdsmi_link_id_bw_type_t() link.bw_type = ctypes.c_uint32(encoding) @@ -1750,6 +1754,10 @@ def amdsmi_get_cpu_current_xgmi_bw( raise AmdSmiParameterException( processor_handle, amdsmi_wrapper.amdsmi_processor_handle ) + if not isinstance(encoding, int): + raise AmdSmiParameterException(encoding, int) + if not isinstance(link_name, str): + raise AmdSmiParameterException(link_name, str) link = amdsmi_wrapper.amdsmi_link_id_bw_type_t() link.bw_type = ctypes.c_uint32(encoding) @@ -2304,6 +2312,8 @@ def amdsmi_get_gpu_reg_table_info( raise AmdSmiParameterException( processor_handle, amdsmi_wrapper.amdsmi_processor_handle ) + if not isinstance(reg_type, AmdSmiRegType): + raise AmdSmiParameterException(reg_type, AmdSmiRegType) reg_metrics = POINTER(amdsmi_wrapper.amdsmi_name_value_t)() num_regs = ctypes.c_uint32(0) @@ -2709,16 +2719,6 @@ def amdsmi_get_gpu_total_ecc_count( "deferred_count": ec.deferred_count, } -def notifyTypeToString(notify_type_b): - idx = 0 - guid = [] - for i in notify_type_b: - guid.append(format(i, '02x')) - if idx == 7: - break - idx = idx +1 - return "".join(guid[::-1]) - def amdsmi_get_gpu_cper_entries( processor_handle: processor_handle_t, severity_mask: int, @@ -2730,6 +2730,12 @@ def amdsmi_get_gpu_cper_entries( raise AmdSmiParameterException( processor_handle, amdsmi_wrapper.amdsmi_processor_handle ) + if not isinstance(severity_mask, int): + raise AmdSmiParameterException(severity_mask, int) + if not isinstance(buffer_size, int): + raise AmdSmiParameterException(buffer_size, int) + if not isinstance(cursor, int): + raise AmdSmiParameterException(cursor, int) # Allocate a buffer for CPER data. buf = ctypes.create_string_buffer(buffer_size) @@ -2840,6 +2846,11 @@ def amdsmi_get_afids_from_cper( "bytes": list(cper_afid_data), "size": len(cper_afid_data) }] + elif isinstance(cper_afid_data, List[Dict[str, Any]]): + cper_records = cper_afid_data + else: + raise AmdSmiParameterException(cper_afid_data, bytes) + all_afids: List[int] = [] for record in cper_records: @@ -3229,7 +3240,6 @@ def amdsmi_get_processor_handle_from_bdf(bdf): amdsmi_bdf, ctypes.byref(processor_handle))) return processor_handle - def amdsmi_get_gpu_vendor_name( processor_handle: processor_handle_t, ) -> str: @@ -3520,7 +3530,6 @@ def amdsmi_is_P2P_accessible( return accessible.value - def amdsmi_get_gpu_compute_partition(processor_handle: processor_handle_t): if not isinstance(processor_handle, amdsmi_wrapper.amdsmi_processor_handle): raise AmdSmiParameterException( @@ -4035,6 +4044,8 @@ def amdsmi_set_soc_pstate( raise AmdSmiParameterException( processor_handle, amdsmi_wrapper.amdsmi_processor_handle ) + if not isinstance(policy_id, int): + raise AmdSmiParameterException(policy_id, int) _check_res( amdsmi_wrapper.amdsmi_set_soc_pstate( processor_handle, policy_id @@ -4050,6 +4061,8 @@ def amdsmi_set_xgmi_plpd( raise AmdSmiParameterException( processor_handle, amdsmi_wrapper.amdsmi_processor_handle ) + if not isinstance(policy_id, int): + raise AmdSmiParameterException(policy_id, int) _check_res( amdsmi_wrapper.amdsmi_set_xgmi_plpd( processor_handle, policy_id @@ -4066,6 +4079,8 @@ def amdsmi_set_gpu_process_isolation( raise AmdSmiParameterException( processor_handle, amdsmi_wrapper.amdsmi_processor_handle ) + if not isinstance(pisolate, int): + raise AmdSmiParameterException(pisolate, int) _check_res( amdsmi_wrapper.amdsmi_set_gpu_process_isolation( processor_handle, pisolate @@ -4326,6 +4341,10 @@ def amdsmi_set_gpu_clk_limit( raise AmdSmiParameterException( processor_handle, amdsmi_wrapper.amdsmi_processor_handle ) + if not isinstance(clk_type, str): + raise AmdSmiParameterException(clk_type, str) + if not isinstance(limit_type, str): + raise AmdSmiParameterException(limit_type, str) if not isinstance(value, int): raise AmdSmiParameterException(value, int) if clk_type.lower() == "sclk": @@ -5510,6 +5529,13 @@ def amdsmi_get_link_topology_nearest( link_type: AmdSmiLinkType, )-> Dict[str, Any]: + if not isinstance(processor_handle, amdsmi_wrapper.amdsmi_processor_handle): + raise AmdSmiParameterException( + processor_handle, amdsmi_wrapper.amdsmi_processor_handle + ) + if not isinstance(link_type, AmdSmiLinkType): + raise AmdSmiParameterException(link_type, AmdSmiLinkType) + topology_nearest_list = amdsmi_wrapper.amdsmi_topology_nearest_t() _check_res( amdsmi_wrapper.amdsmi_get_link_topology_nearest( @@ -5532,6 +5558,11 @@ def amdsmi_get_gpu_virtualization_mode( processor_handle: processor_handle_t ) -> Dict[str, AmdSmiVirtualizationMode]: + if not isinstance(processor_handle, amdsmi_wrapper.amdsmi_processor_handle): + raise AmdSmiParameterException( + processor_handle, amdsmi_wrapper.amdsmi_processor_handle + ) + # make info struct here mode = amdsmi_wrapper.amdsmi_virtualization_mode_t() @@ -5896,5 +5927,4 @@ def amdsmi_get_gpu_busy_percent(processor_handle: processor_handle_t): gpu_busy_percent = ctypes.c_uint32(0) _check_res(amdsmi_wrapper.amdsmi_get_gpu_busy_percent(processor_handle, ctypes.byref(gpu_busy_percent))) - return gpu_busy_percent.value - + return gpu_busy_percent.value \ No newline at end of file diff --git a/projects/amdsmi/py-interface/amdsmi_wrapper.py b/projects/amdsmi/py-interface/amdsmi_wrapper.py index 71c8a15560..e0e88a063f 100644 --- a/projects/amdsmi/py-interface/amdsmi_wrapper.py +++ b/projects/amdsmi/py-interface/amdsmi_wrapper.py @@ -304,7 +304,6 @@ amdsmi_status_t__enumvalues = { 6: 'AMDSMI_STATUS_DRM_ERROR', 7: 'AMDSMI_STATUS_API_FAILED', 8: 'AMDSMI_STATUS_TIMEOUT', - 9: 'AMDSMI_STATUS_RETRY', 10: 'AMDSMI_STATUS_NO_PERM', 11: 'AMDSMI_STATUS_INTERRUPT', 12: 'AMDSMI_STATUS_IO', @@ -3334,7 +3333,7 @@ __all__ = \ 'AMDSMI_STATUS_NO_HSMP_SUP', 'AMDSMI_STATUS_NO_MSR_DRV', 'AMDSMI_STATUS_NO_PERM', 'AMDSMI_STATUS_NO_SLOT', 'AMDSMI_STATUS_OUT_OF_RESOURCES', - 'AMDSMI_STATUS_REFCOUNT_OVERFLOW', 'AMDSMI_STATUS_RETRY', + 'AMDSMI_STATUS_REFCOUNT_OVERFLOW', 'AMDSMI_STATUS_SETTING_UNAVAILABLE', 'AMDSMI_STATUS_SUCCESS', 'AMDSMI_STATUS_TIMEOUT', 'AMDSMI_STATUS_UNEXPECTED_DATA', 'AMDSMI_STATUS_UNEXPECTED_SIZE', 'AMDSMI_STATUS_UNKNOWN_ERROR', diff --git a/projects/amdsmi/src/amd_smi/amd_smi_cper.cc b/projects/amdsmi/src/amd_smi/amd_smi_cper.cc index 370f3ba970..59499103df 100644 --- a/projects/amdsmi/src/amd_smi/amd_smi_cper.cc +++ b/projects/amdsmi/src/amd_smi/amd_smi_cper.cc @@ -156,6 +156,8 @@ static auto amdsmi_read_cper_file(const std::string &filepath) -> CperFileCtx { GUID_INIT(0xDC3EA0B0, 0xA144, 0x4797, 0xB9, 0x5B, 0x53, 0xFA, \ 0x24, 0x2B, 0x6E, 0x1D) +static amdsmi_cper_guid_t mce = CPER_NOTIFY_MCE; +static amdsmi_cper_guid_t cmc = CPER_NOTIFY_CMC; static amdsmi_cper_guid_t bt = BOOT_TYPE; static amdsmi_cper_guid_t cr = AMD_OOB_CRASHDUMP; static amdsmi_cper_guid_t nonstd = AMD_GPU_NONSTANDARD_ERROR;