--tiling_schedule_optimize

Applicable Products

  • Ascend 950PR/Ascend 950DT: supported
  • Atlas A3 training products/Atlas A3 inference products: supported
  • Atlas A2 training products/Atlas A2 inference products: supported
  • Atlas 200I/500 A2 inference products: not supported
  • Atlas inference products: supported
  • Atlas training products: not supported

Description

Specifies whether to enable optimization for tiling offload scheduling.

When tiling offload is implemented, the tiling computation is performed on the CPU of the device. As internal storage of the AI Cores in the NPU cannot store all the input and output data of operators, the input data is tiled into chunks. One chunk is transferred in, computed, and transferred out, followed by the next chunk. This process is called tiling. Then, a computation program, called tiling implementation, determines tiling parameters (such as chunk size and the total number of iterations) based on operator information such as shape. Since the tiling implementation involves only scalar computations, which AI Cores are not well-suited for, it is generally executed on the host-side CPU. However, it may be offloaded to the device side for execution when the following conditions are met:

  1. The model is static-shape.
  2. Operators in the model, such as the FusedInferAttentionScore and IncreFlashAttention fused operators, support tiling offload.
  3. Operators that support tiling offload have dependency requirements: tiling computation must rely on runtime results produced by the previous operator executing on the device. If the dependent value comes from a Const node, tiling offload is not required, and tiling is completed at build time.

Arguments

  • 0 (default): Disables tiling offload.
  • 1: Enables tiling offload.

Suggestions and Benefits

None

Example

--tiling_schedule_optimize=1