dsmi_get_ecc_enable
Prototype
int dsmi_get_ecc_enable(int device_id, DSMI_DEVICE_TYPE device_type, int* enable_flag)
Description
Obtains the ECC enable flag.
For the Ascend 310 AI Processor, this API supports mini modules (EP) and standard PCIe cards.
Parameters
Parameter |
Input/Output |
Description |
---|---|---|
device_id |
Input |
Device ID For the Ascend 310 AI Processor, the value range is 0–63. Obtain the actual device ID by calling dsmi_list_device. |
device_type |
Input |
Device type. Currently, only DSMI_DEVICE_TYPE_DDR is supported. typedef enum { DSMI_DEVICE_TYPE_DDR, DSMI_DEVICE_TYPE_SRAM, DSMI_DEVICE_TYPE_HBM, DSMI_DEVICE_TYPE_NPU, DSMI_DEVICE_TYPE_NONE=0xff } DSMI_DEVICE_TYPE; |
enable_flag |
Output |
1: enabled 0: disabled |
Returns
Type |
Description |
---|---|
int |
0 on success; else, failure |
Restrictions
None
Example
int ret = 0; int enable_flag = 0; ret = dsmi_get_ecc_enable(0, DSMI_DEVICE_TYPE_DDR, &enable_flag); if(ret != 0) { //To-do: records logs. return ret; } ...