aclrtLaunchKernelAttrId/aclrtLaunchKernelAttrValue

Data Format

Description

ACL_RT_LAUNCH_KERNEL_ATTR_SCHEM_MODE = 1

Scheduling mode.

The values are as follows:

  • 0: common scheduling mode. If there is an idle core, the operator execution is started. For example, if blockDim is set to 8, the operator kernel function will be executed on eight cores. If the common scheduling mode is specified, the operator execution is started as long as one core is idle.
  • 1: batch scheduling mode. The operator execution is started only when all required cores are idle. For example, if blockDim is set to 8, the operator kernel function will be executed on eight cores. If the batch scheduling mode is specified, the operator execution is started only when all the eight cores are idle.

localMemorySize

Size of the internal UB buffer of the Vector Core required for executing the Single Instruction Multiple Thread (SIMT) operator, in bytes.

Currently, this parameter is not supported.

ACL_RT_LAUNCH_KERNEL_ATTR_ENGINE_TYPE = 3

Operator execution engine. For details about the values, see aclrtEngineType.

Only the Atlas inference products supports this option.

This option does not take effect for the following products:

  • Atlas A3 training products/Atlas A3 inference products
  • Atlas A2 training products/Atlas A2 inference products
  • Atlas 200I/500 A2 inference products
  • Atlas training products

ACL_RT_LAUNCH_KERNEL_ATTR_BLOCKDIM_OFFSET

Block dimension offset.

  • If blockDim ≤ Number of AI Cores, computation on the Vector Core is not required. In this case, set engineType to ACL_RT_ENGINE_TYPE_AIC (indicating computation on the AI Core) and set blockDimOffset to 0.
  • If blockDim > Number of blockDim > AI Core cores, then:
    • Deliver a task in a stream, set engineType to ACL_RT_ENGINE_TYPE_AIC (indicating that the computation is performed on the AI Core), and set blockDimOffset to 0.
    • Deliver a task in another stream, set engineType to ACL_RT_ENGINE_TYPE_AIV (indicating that the computation is performed on the Vector Core), and set blockDimOffset to aicoreblockdim. The formula for calculating aicoreblockdim is as follows:
      • If blockDim ≤ Number of AI Cores + Number of Vector Cores, aicoreblockdim = Number of AI Cores.
      • Otherwise, aicoreblockdim = Roundup (blockDim x Number of AI Cores)/(Number of AI Cores + Number of Vector Cores).

Only the Atlas inference products supports this option.

This option does not take effect for the following products:

  • Atlas A3 training products/Atlas A3 inference products
  • Atlas A2 training products/Atlas A2 inference products
  • Atlas 200I/500 A2 inference products
  • Atlas training products

ACL_RT_LAUNCH_KERNEL_ATTR_BLOCK_TASK_PREFETCH

Whether to block hardware from prefetching the information of the current task when the task is delivered.

The values are as follows:

  • 0: Do not block.
  • 1: Block.

ACL_RT_LAUNCH_KERNEL_ATTR_DATA_DUMP

Whether to enable dump.

The values are as follows:

  • 0: Disable.
  • 1: Enable.

ACL_RT_LAUNCH_KERNEL_ATTR_TIMEOUT

Timeout interval for the task scheduler to wait for task execution. This parameter applies only to the scenario where the AI CPU or AI Core operator is executed.

The values are as follows:

  • 0: Wait forever.
  • > 0: Specific timeout, in seconds.