aclrtGetGroupCount

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Description

Queries the number of compute-capable groups in the current context.

Prototype

aclError  aclrtGetGroupCount(uint32_t *count)

Parameters

Parameter

Input/Output

Description

count

Output

Pointer to the number of available groups in the current context.

Restrictions

This API cannot be called in the Ascend EP of Atlas inference products.

Before calling an acl API to query or set a compute group, you need to call the dcmi_create_capability_group DCMI API to create a group.

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).

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.