ACL_PRECISION_MODE |
Sets the operator precision mode. If it is not specified, allow_fp32_to_fp16 is used by default.
- force_fp32: forces float32 for operators supporting both float16 and float32, even if the original precision is float16.
This argument is invalid if your model contains operators not supporting float32, for example, operator Conv2D that supports only float16. In this case, float16 is retained. If the operator does not support float32 and it is configured to the blocklist of precision reduction (by setting precision_reduce to false), the counterpart AI CPU operator supporting float32 is used.
- force_fp16: forces float16 for operators supporting both float16 and float32.
- allow_fp32_to_fp16: preserves the original precision for operators supporting float32; else, forces float16.
- must_keep_origin_dtype: keeps the original precision. If the precision of some operators in the original graph is float16 but these operators in your model support only float32, the high-precision float32 is used automatically. If the precision of some operators in the original graph is float32 but these operators in your model support only float16, this argument is invalid because low precision is not supported.
- allow_mix_precision: allows mixed precision. In this mode, types float16 and float32 are used together to process the neural network.
In this mode, float16 is automatically used for certain float32 operators based on the built-in tiling policies. This will improve system performance and reduce memory footprint with minimal accuracy degradation. If this mode is used, you can view the value of the precision_reduce option in the built-in tiling policy file ${INSTALL_DIR}/opp/built-in/op_impl/ai_core/tbe/config/<soc_version>/aic-<soc_version>-ops-info.json in the OPP installation directory.
- If it is set to true, the operator is on the mixed precision trustlist and its precision will be reduced from float32 to float16.
- If it is set to false, the operator is on the mixed precision blocklist and its precision will not be reduced from float32 to float16.
- If an operator does not have the precision_reduce option configured, the operator is on the graylist and will follow the same precision processing as the upstream operator.
|
ACL_AICORE_NUM |
Sets the number of AI Cores used for model compilation. The setting in the current version is invalid. |
ACL_AUTO_TUNE_MODE |
Do not set this parameter because it will be deprecated. Otherwise, compatibility issues may occur in later versions. If tuning is involved, see AOE Instructions. Sets the operator auto tuning mode.
- GA: genetic algorithm, for tuning Cube operators.
- RL: reinforcement learning, for tuning Vector operators.
|
ACL_OP_SELECT_IMPL_MODE |
Sets the operator implementation mode. If it is not specified, high_precision is used by default.
- high_precision: high-precision mode.
This argument sets the operator implementation mode by using the built-in configuration file, which is stored in ${INSTALL_DIR}/opp/built-in/op_impl/ai_core/tbe/impl_mode/high_precision.ini. To ensure compatibility, this argument takes effect only for the operator list in the high_precision.ini file. This list can be used to control the effective scope of operators and ensure that the network models of earlier versions are not affected.
- high_performance: high-performance mode.
This argument sets the operator implementation mode by using the built-in configuration file, which is stored in ${INSTALL_DIR}/opp/built-in/op_impl/ai_core/tbe/impl_mode/high_performance.ini. To ensure compatibility, this argument takes effect only for the operator list in the high_performance.ini file. This list can be used to control the effective scope of operators and ensure that the network models of earlier versions are not affected.
- high_precision_for_all: high-precision mode.
This argument sets the operator implementation mode by using the built-in configuration file, which is stored in ${INSTALL_DIR}/opp/built-in/op_impl/ai_core/tbe/impl_mode/high_precision_for_all.ini. The list in this file may be updated with the version. This implementation mode may cause incompatibility. If an operator in the new software package sets the implementation mode (that is, an implementation mode is added for a certain operator in the configuration file), the performance of the earlier network model that uses the high_precision_for_all mode may deteriorate.
- high_performance_for_all: high-performance mode.
This argument sets the operator implementation mode by using the built-in configuration file, which is stored in ${INSTALL_DIR}/opp/built-in/op_impl/ai_core/tbe/impl_mode/high_performance_for_all.ini. The list in this file may be updated with the version. This implementation mode may cause incompatibility. If an operator in the new software package sets the implementation mode (that is, an implementation mode is added for a certain operator in the configuration file), the accuracy of the earlier network model that uses the high_performance_for_all mode may deteriorate.
|
ACL_OPTYPELIST_FOR_IMPLMODE |
Sets the operator type list (multiple operators are separated by commas). This option is used in pair with ACL_OP_SELECT_IMPL_MODE. |
ACL_OP_DEBUG_LEVEL |
Enables TBE operator debug during operator compilation.
- 0: disables operator debug. The operator build folder kernel_meta is not generated under the atc command execution directory.
- 1: enables operator debug. TBE instruction mapping files, including an operator CCE file (*.cce) and a Python-CCE mapping file (*_loc.json), are generated in the kernel_meta folder under the atc command execution directory. You can locate AI Core errors by using tools.
- 2: enables operator debug. TBE instruction mapping files, including an operator CCE file (.cce), a Python-CCE mapping file (*_loc.json) and a Python-CCE mapping file (*_loc.json), are generated in the kernel_meta folder under the atc command execution directory. Build optimization is disabled and CCE compiler debug is enabled (by setting -O0-g). You can locate AI Core errors by using AI Core Error Analyzer. For details about how to use the tool, see AI Core Error Analyzer Instructions.
- 3: disables operator debug. The operator binary file (.o) and operator description file (.json) are generated in the kernel_meta folder under the atc command execution directory.
- 4: disables operator debug. The operator binary (.o) and operator description file (.json) are generated, and a TBE instruction mapping file (.cce) and a UB fusion description file ({$kernel_name}_compute.json) are generated in the kernel_meta folder under the atc command execution directory.
|
ACL_DEBUG_DIR |
Sets the debug directory, for saving the files generated during model conversion and network migration, including the .o, .json, and .cce files of operators. The generated files depend on the value of ACL_OP_DEBUG_LEVEL. The path can contain letters, digits, underscores (_), hyphens (-), and periods (.). |
ACL_OP_COMPILER_CACHE_MODE |
Sets the disk cache mode for operator compilation. This option must be used in conjunction with ACL_OP_COMPILER_CACHE_DIR.
- enable: enabled. If it is enabled, operators with the same compilation configurations and operator configurations will not be built repeatedly, thus accelerating the compilation speed.
- force: enabled with cache forcibly refreshed. That is, the existing cache is cleared up before the operator is recompiled and added to the cache. For example, for Python changes, dependency library changes, or repository changes after operator optimization, you need to set this option to force to clear up the existing cache and then change it to enable to prevent the cache from being forcibly refreshed during each compilation.
- disable: disabled.
If this option is used, you can use the environment variable ASCEND_MAX_OP_CACHE_SIZE to limit the disk space of the cache folder of a chip. When the compilation cache space reaches the value of ASCEND_MAX_OP_CACHE_SIZE and the old kernel file needs to be deleted, you can use the environment variable ASCEND_REMAIN_CACHE_SIZE_RATIO to set the space ratio of the cache to be reserved. A configuration example is provided as follows:
# The ASCEND_MAX_OP_CACHE_SIZE environment variable defaults to 500, in MB.
export ASCEND_MAX_OP_CACHE_SIZE=500
# The ASCEND_REMAIN_CACHE_SIZE_RATIO defaults to 50, in percentage.
export ASCEND_REMAIN_CACHE_SIZE_RATIO=50
|
ACL_OP_COMPILER_CACHE_DIR |
Configures the disk cache directory for operator compilation. The default directory is $HOME/atc_data. This option must be used in conjunction with ACL_OP_COMPILER_CACHE_MODE. The path can contain letters, digits, underscores (_), hyphens (-), and periods (.). If the ACL_OP_DEBUG_LEVEL option is set, the build cache function is enabled only when this option is set to 0 or 3. |
ACL_OP_PERFORMANCE_MODE |
Do not set this parameter because it has been deprecated. Otherwise, compatibility issues may occur in later versions. Sets the performance mode for operator compilation in fussy mode. Defaults to normal. Selected from:
- normal: The operator is compiled with the optimal compilation performance.
- high: The operator is compiled with the highest runtime performance using the generalization strategy.
|
ACL_OP_JIT_COMPIL |
Determines whether to compile an operator online or use the binary file of a compiled operator. Reserved.
- enable (default): Operators are compiled online. The system performs tuning based on the obtained operator information to get better performing operators. In the static-shape network scenario, you are advised to set this parameter to enable.
- disable: 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. In the dynamic-shape network scenario, you are advised to set this parameter to disable.
|