dsmi_get_all_device_count
Prototype
int dsmi_get_all_device_count(int* all_device_count)
Description
Obtains the count of the Ascend AI Processors that have successfully connected to the PCIe on the host.
For the Ascend 310 AI Processor, this API supports only standard PCIe cards.
Parameters
Parameter |
Input/Output |
Description |
---|---|---|
all_device_count |
Output |
Device count For the Ascend 310 AI Processor, the value range is 0–64. |
Returns
Type |
Description |
---|---|
int |
0 on success; else, failure |
Restrictions
None
Example
int ret = 0; int device_count = 0; ret = dsmi_get_all_device_count(&device_count); if(ret != 0) { //To-do: records logs. return ret; } ...