dsmi_get_chip_info
Prototype
int dsmi_get_chip_info(int device_id, struct dsmi_chip_info_stru *chip_info)
Description
Obtains the Ascend AI Processor information.
For the Ascend 310 AI Processor, this API supports mini modules (EP) and 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. |
chip_info |
Output |
the Ascend AI Processor information The information struct is defined as follows. #define MAX_CHIP_NAME (32) struct dsmi_chip_info_stru{ unsigned char chip_type[MAX_CHIP_NAME]; unsigned char chip_name[MAX_CHIP_NAME]; unsigned char chip_ver[MAX_CHIP_NAME]; }; |
Returns
Type |
Description |
---|---|
int |
0 on success; else, failure |
Restrictions
None
Example
int ret = 0; struct dsmi_chip_info_stru info = {{0},{0},{0}}; ret = dsmi_get_chip_info(0, &info); if(ret != 0) { //To-do: records logs. return ret; } ...