--buffer_optimize
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Enables or disables buffer optimization.
See Also
None
Argument
Argument:
- l1_optimize: Enables L1 optimization. This argument is invalid in the current version and equivalent to off_optimize.
- l2_optimize (default): Enables L2 optimization.
- off_optimize: Disables buffer optimization.
l1 indicates L1 buffer, which is general internal storage. L1 buffer offers a large data transfer area 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 external storage. An AI Core loads data from the external storage 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
Dependencies and Restrictions
None