aclrtGetAllGroupInfo

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Description

Obtains the compute capability details about all groups in the current context.

Prototype

1
aclError  aclrtGetAllGroupInfo(aclrtGroupInfo *groupInfo)

Parameters

Parameter

Input/Output

Description

groupInfo

Output

Pointer to the compute capability details about all groups.

Call aclrtCreateGroupInfo to create data of the aclrtGroupInfo type in advance.

Returns

0 on success; otherwise, failure. For details, see aclError.

Restrictions

This API can be called only in the Ctrl CPU open form of the Atlas inference product. This API cannot be called in the Ascend EP of the Atlas inference product.

acl API call sequence: aclrtSetDevice (specifies a compute device) --> aclrtGetAllGroupInfo (obtains the information of all groups) --> aclrtGetGroupCount (obtains the group count) --> aclrtGetGroupInfoDetail (obtains the information of a specified group) --> aclrtSetGroup (sets a group) --> execution of other tasks --> aclrtResetDevice (resets the compute device).

Before calling the acl API to set the computing power group, call the DCMI API dcmi_create_capability_group provided by the driver to create a group. If the group is updated (for example, the dcmi_create_capability_group API is called to add a group or the dcmi_delete_capability_group API is called to delete a group), the service process needs to be restarted.