--disable_reuse_memory
Description
Enables memory reuse.
Memory reuse refers to the practice of utilizing memory multiple times based on its lifecycle and size, ensuring that non-conflicting memory is reused to reduce network memory consumption.
See Also
None
Argument
- 1: disabled If a network model is large and the memory reuse function is disabled, the memory may be insufficient during model conversion. As a result, the model build fails.
- 0: enabled The default value is 0.
Suggestions and Benefits
None
Example
--disable_reuse_memory=0
Applicability
Dependencies and Restrictions
Memory reuse is enabled by default. You can select the operators to skip memory reusing. The operator (or operators separated by commas) specified by OP_NO_REUSE_MEM will use exclusively allocated memory. For details, see Environment Variables.
- Configuration by node name:After the node name is converted to be compatible with the CANN platform, ensure that the node name is correctly configured. You can obtain the node name by setting DUMP_GE_GRAPH and viewing the name field in the exported ge_onnx_xxx_Build.pbtxt graph.
export OP_NO_REUSE_MEM=gradients/logits/semantic/kernel/Regularizer/l2_regularizer_grad/Mul_1,resnet_v1_50/conv1_1/BatchNorm/AssignMovingAvg2
- Configuration by operator type:
export OP_NO_REUSE_MEM=FusedMulAddN,BatchNorm
- Configuration by operator name and operator type:
export OP_NO_REUSE_MEM=FusedMulAddN,resnet_v1_50/conv1_1/BatchNorm/AssignMovingAvg
Parent topic: Model Tuning Options