--buffer_optimize

Description

Enables or disables buffer optimization.

See Also

If --buffer_optimize is set to l1_optimize, this option cannot be used together with --virtual_type. Otherwise, an error is reported, indicating that L1 fusion is not performed in virtualization scenarios. This prevents scheduling exceptions caused by large operators.

Argument

Argument:

  • l1_optimize: Enables L1 optimization. Invalid in the current version. Equivalent to off_optimize.
  • l2_optimize: Enables L2 optimization. The default value is l2_optimize.
  • off_optimize: Disables buffer optimization.

l1 indicates L1 buffer, which is a general internal storage. The L1 Buffer offers a large data buffer in the AI Core. It can temporarily store data that needs to be repeatedly used in the AI Core, thereby reducing the frequency of data reads from or writes to the bus. l2 indicates L2_buffer, which is an external storage. The AI Core loads external data to the internal storage for computation.

Suggestions and Benefits

You are advised to enable buffer optimization as this function can improve compute efficiency and performance. However, it is possible that your model contains an operator that is not yet covered by the current implementation. If the inference accuracy degradation is eliminated after the buffer optimization function is disabled, locate the fishy operator and submit it to Huawei technical support, who will add buffer optimization support to your operator as soon as possible.

Example

--buffer_optimize=l2_optimize

Applicability

Atlas 200/300/500 Inference Product

Atlas Training Series Product

Dependencies and Restrictions

None