dsmi_get_version
Prototype
int dsmi_get_version(int device_id, char* version_str, unsigned int version_len, unsigned int *ret_len)
Description
Obtains the system version.
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. |
version_str |
Output |
System version The 64-byte space is allocated by the user. |
version_len |
Input |
Length of version_str, in bytes |
ret_len |
Output |
Length of the version number |
Returns
Type |
Description |
---|---|
int |
0 on success; else, failure |
Restrictions
None
Example
int ret = 0; int len = -1; unsigned char version_str[64] = {0}; ret = dsmi_get_version (0, version_str, 64, &len); if(ret != 0) { //To-do: records logs. return ret; } ...