aclmdlRIKernelTaskGetAttribute

Note: This API is for trial use and may be changed in later versions. It is not available in production environments.

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

Queries the attribute configuration of compute tasks on the Cube Core and Vector Core.

Before calling this API to query the attribute configuration, call aclmdlRIGetTasksByStream to obtain all tasks in the specified stream and call aclmdlRITaskGetType to confirm that the current task is a compute task on the Cube Core and Vector Core.

Prototype

1
aclError aclmdlRIKernelTaskGetAttribute(aclmdlRITask task, aclrtLaunchKernelAttrId attrId, aclrtLaunchKernelAttrValue *attrValue)

Parameters

Parameter

Input/Output

Description

task

Input

Task. For details about the type definition, see aclmdlRITask.

attrId

Input

ID of the attribute to be queried. For details about the type definition, see aclrtLaunchKernelAttrId.

The following attributes cannot be queried: ACL_RT_LAUNCH_KERNEL_ATTR_ENGINE_TYPE (operator execution engine), ACL_RT_LAUNCH_KERNEL_ATTR_BLOCKDIM_OFFSET (numBlocks offset), ACL_RT_LAUNCH_KERNEL_ATTR_BLOCK_TASK_PREFETCH (whether to block hardware from prefetching information of the current task when the task is delivered)

attrValue

Output

Obtained attribute value. For details about the type definition, see aclrtLaunchKernelAttrValue.

Returns

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

Restrictions

This API does not support concurrent calls for the same model running instance.