dsmi_get_phyid_from_logicid
Prototype
int dsmi_get_phyid_from_logicid(unsigned int logicid, unsigned int *phyid)
Description
Obtains the the Ascend AI Processor physical ID from a logical ID.
In a container, logical ID refers to the logical ID of a device. On a physical machine, both logical ID and physical ID refer to the device ID.
For the Ascend 310 AI Processor, this API supports mini modules (EP) and standard PCIe cards.
Parameters
Parameter |
Input/Output |
Description |
---|---|---|
logicid |
Input |
Logical ID The value range is [0, device_count – 1], where device_count is obtained from the dsmi_get_device_count call. |
phyid |
Output |
Physical ID, that is, slot_id |
Returns
Type |
Description |
---|---|
int |
0 on success; else, failure |
Restrictions
None
Example
... int ret = 0; unsigned int logicid = 0; unsigned int phyid=0; ret = dsmi_get_phyid_from_logicid (logicid, &phyid); ...