dsmi_pcie_hot_reset
Prototype
int dsmi_pcie_hot_reset(int device_id)
Description
Hot resets (in-band) an Ascend AI Processor. A successful API call indicates only the execution success of the reset command. Whether a processor is available needs to be determined by calling APIs such as dsmi_get_device_health. Only standard PCIe cards are supported.
Parameters
Parameter |
Input/Output |
Description |
---|---|---|
device_id |
Input |
Device ID ranging from 0 to 63, which can be obtained by calling dsmi_list_device |
Returns
Type |
Description |
---|---|
int |
0 on success; else, failure |
Exception Handling
None
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_pcie_hot_reset(0); if(ret != 0) { //To-do: records logs. return ret; } ...