OP_NO_REUSE_MEM

Description

By default, memory reuse is enabled during graph build on the Ascend platform. In fault locating scenarios, if developers suspect that the computation result is abnormal due to memory reuse errors, they can use this environment variable to allocate memory to an operator separately.

This environment variable can be set to the network node name or operator type (hybrid configuration is supported). If multiple nodes are configured, separate them with commas (,).

Examples

  • 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

Restrictions

None

Applicability

Atlas 200/300/500 Inference Product

Atlas Training Series Product