aclrtGetGroupInfoDetail

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

☓

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

☓

Function

Obtains the compute capability details of a group in the current context.

Prototype

1
aclError  aclrtGetGroupInfoDetail(const aclrtGroupInfo *groupInfo, int32_t groupIndex, aclrtGroupAttr attr, void *attrValue, size_t valueLen, size_t *paramRetSize)

Parameters

Parameter

Input/Output

Description

groupInfo

Input

Pointer to the start address of the compute capability details.

Call aclrtGetAllGroupInfo to obtain the compute capability details of all groups.

groupIndex

Input

Group index for accessing contiguous memory blocks with groupInfo.

Must be within the range of [0, Group count – 1]. Call aclrtGetGroupCount to obtain the group count.

attr

Input

Compute capability attribute to be obtained. For details about the type definition, see aclrtGroupAttr.

attrValue

Output

Pointer to the value of the compute capability attribute to be obtained.

Allocate memory according to the data type of each attribute value to store the attribute values.

valueLen

Input

Maximum length of attrValue, in bytes.

paramRetSize

Output

Pointer to the size of the returned attrValue, in bytes.

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