dsmi_pre_reset_soc
Prototype
int dsmi_pre_reset_soc(int device_id)
Description
Pre-resets an the Ascend AI Processor to remove the dependencies of the high-level drivers and software. After the pre-reset is complete, isolate or actual reset the device.
The reset procedure is as follows: dsmi_pre_reset_soc -> reset –> dsmi_rescan_soc.
Reset is implemented through the BMC out-of-band channel. Only Huawei servers are supported. Upgrade the BMC of a server to the latest version for the reset to proceed properly.
For the Ascend 310 AI Processor, this API supports only 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. |
Returns
Type |
Description |
---|---|
int |
0 on success; else, failure |
Restrictions
Run the caller application as the root user on a physical machine. Otherwise, a permission error is returned.
Before calling this API, stop all Ascend AI Processor services.
Example
int ret = 0; ret = dsmi_pre_reset_soc(0); if(ret != 0) { //To-do: records logs. return ret; } ...