dsmi_rescan_soc
Prototype
int dsmi_rescan_soc(int device_id)
Description
Rescans an the Ascend AI Processor.
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.
Example
int ret = 0; ret = dsmi_rescan_soc(0); if(ret != 0) { //To-do: records logs. return ret; } ...