Experiment Parameters
ge.autoMultistreamParallelMode
Extended parameter for debugging. It cannot be used in the production environment and will be released as a formal function in later versions.
This parameter applies only to static-shape graph scenarios. Developers can configure this parameter to control the automatic allocation strategy of multi-stream parallel mode, thereby improving graph execution performance.
Parameter values:
- cv: Parallel execution of Cube and Vector operators is enabled.
- LoadBalance: The load balancing algorithm distributes all operators evenly across eight streams for execution.
- LoadBalance:N: The load balancing algorithm distributes all operators evenly across N streams for execution. N is the maximum number of streams, a positive integer in the range [1,64]. If N exceeds the actual number of available cores, performance may degrade.
- MainStream:N: The main stream algorithm distributes serial operators on the main stream for execution, and other parallel operators on other streams for execution. N is the maximum number of streams, a positive integer in the range [1,64]. If N exceeds the actual number of available cores, performance may degrade.
- None (default): No multi-stream parallel optimization is enabled.
- This parameter is used only in the training scenario of the recommendation network types.
- The operator's parallel execution function cannot be used simultaneously with the multi-stream parallel execution function (enabled through ENABLE_DYNAMIC_SHAPE_MULTI_STREAM).
For details about the environment variables, see Environment Variables.
{"ge.autoMultistreamParallelMode", "cv"};
Mandatory/Optional: optional
Effective level: session and graph
ge.build_inner_model
Not supported in the current version.
ge.deterministicLevel
Extended parameter for debugging. It cannot be used in the production environment and will be released as a formal function in later versions.
Specifies the deterministic computing level.
By default, the deterministic level is 0. That is, deterministic computing is disabled. The value of ge.deterministic must also be 0. To enable deterministic computing, set the deterministic level to 1 and the deterministic computing option ge.deterministic to 1. To enable strong consistency computing, set the level to 2 and the deterministic computing option ge.deterministic to 1.
If strong consistency computing is enabled (ge.deterministicLevel=2), the computing result is deterministic, meaning that multiple executions will generate the same result. In addition, the computation result is irrelevant to the data location. For example, when performing matrix multiplication, the order of accumulation across different rows may vary, which can lead to slight differences in results for the same data in different rows. However, when strong consistency computing is enabled, the computing results will be consistent as long as the inputs are the same, even if they are in different rows.
By default, the strong consistency computing function is disabled. In this default mode, the computing results may be inconsistent when the same data appears in different rows.
For performance considerations, you are advised not to enable strong consistency computing because it slows down the computing speed of operators and affects the overall efficiency. You are advised to enable this function only when the computing result is required to be strictly consistent for the same data in different locations or the model precision is being adjusted and debugged to optimize the overall performance.
Parameter values:
- 0 (default): Disables deterministic computation.
- 1: Enables deterministic computation.
- 2: Enables strong consistency computation.
Configuration example:
{"ge.deterministic", "0"};
{"ge.deterministicLevel", "0"};
Restrictions:
This configuration item must be used together with ge.deterministic.
Mandatory/Optional: optional
Effective level: global
ge.disableOptimizations
This parameter is a debugging parameter and cannot be used in the production environment. It will be released as a formal feature in later versions.
This parameter applies only to the following products:
It specifies one or more compilation and optimization passes to be disabled.
Currently, only the following passes can be disabled:
"RemoveSameConstPass","ConstantFoldingPass","TransOpWithoutReshapeFusionPass"
Note:
- Separate multiple passes with commas (,).
- If other passes are disabled, only warning logs are printed during graph build.
- If ConstantFoldingPass is disabled, graph build or running may fail.
- If other compilation optimization options, such as ge.oo.constantFolding, are configured, ge.disableOptimizations has a higher priority.
Configuration example:
- Disabling a single pass
std::map <AscendString, AscendString> session_options = { {"ge.disableOptimizations", "RemoveSameConstPass"} }; - Disabling multiple passes
std::map <AscendString, AscendString> session_options = { {"ge.disableOptimizations", "RemoveSameConstPass, ConstantFoldingPass"} };
Mandatory/Optional: optional
Effective level: global, session, and graph
ge.jit_compile
Extended parameter for debugging. It cannot be used in the production environment and will be released as a formal function in later versions.
Determines whether to compile the operator online or use the compiled operator binary file.
Parameter values:
- 0: The compiled operator binary file in the system is preferentially searched. If the file can be found, operators are not compiled anymore, which produces better compilation performance. If the file cannot be found, operators will be compiled.
- 1 (default): Operators are compiled online. The system performs fusion and tuning based on the obtained graph information to get better performing operators.
- 2: For a static shape network, compile the operator online. For a dynamic shape network, search for the compiled operator binary file in the system first. If the corresponding binary file is not available, compile the operator.
Configuration example:
{"ge.jit_compile", "1"};
Mandatory/Optional: optional
Effective level: global and session
ge.oo.constantFolding
Extended parameter for debugging. It cannot be used in the production environment and will be released as a formal function in later versions.
Sets whether to enable constant folding optimization.
Constant folding is the process of replacing nodes that can be evaluated to a constant output value in a computational graph with that constant, and simplifying the structure of the computational graph accordingly.
Parameter values:
- true (default): enabled
- false: disabled
Configuration example:
{"ge.oo.constantFolding", "true"};
Restrictions:
If other compilation optimization options, such as ge.disableOptimizations, are configured, ge.disableOptimizations has a higher priority.
Mandatory/Optional: optional
Effective level: global, session, and graph
ge.oo.deadCodeElimination
Extended parameter for debugging. It cannot be used in the production environment and will be released as a formal function in later versions.
Sets whether to enable dead-edge elimination optimization.
Dead-edge elimination (switch dead-edge elimination): When pred (input 1) of a switch statement is a constant node, one of the branches can be eliminated based on the value of const. If const is true, the false branch is eliminated; if const is false, the true branch is eliminated.
Parameter values:
- true (default): enabled
- false: disabled
Configuration example:
{"ge.oo.deadCodeElimination", "true"};
Mandatory/Optional: optional
Effective level: global, session, and graph
ge.oo.level
Extended parameter for debugging. It cannot be used in the production environment and will be released as a formal function in later versions.
Sets multi-level optimization options for graph build, including subgraph optimization, entire graph optimization, and static shape model offloading.
Static shape model offloading: In this approach, the input and output shapes of all operators in a static shape model can be determined at build time, allowing for model-level memory orchestration and operator tiling computation to be completed on the host. These computations are then batched and sent to the device stream when the model is loaded, but they are not executed immediately. Instead, the execution of all tasks within the model is triggered by the delivery of model execution tasks.
Parameter values:
- O1: Disables all graph fusion and UB fusion passes, and performs only optimizations related to static offloading, such as InferShape (output tensor shape inference), constant folding, dead-edge elimination, and other optimizations.
The
Ascend 950PR /Ascend 950DT does not support UB fusion. Only the graph fusion pass is disabled. - O3 (default): Enables all optimizations.
Restrictions:
If the value is O1, all graph fusion and UB fusion passes are disabled, and only passes related to static offloading are enabled. However, the graph fusion passes in the following files are enabled by default because function problems may occur if they are disabled:
All graph fusion passes under the ExceptionalPassOfO1Level field in the ${INSTALL_DIR}/x86_64-linux/lib64/plugin/opskernel/fusion_pass/config/fusion_config.json file
Replace ${INSTALL_DIR} with the CANN component directory. For example, if the installation is performed by the root user, the default file storage path is /usr/local/Ascend/cann.
Configuration example:
{"ge.oo.level", "O3"};
Mandatory/Optional: optional
Effective level: global, session, and graph