ASCEND_REMAIN_CACHE_SIZE_RATIO

Description

Specifies how much (in percentage) of the build cache space is retained when the build cache space of a specified processor reaches ASCEND_MAX_OP_CACHE_SIZE in the scenario where the operator build cache function is enabled. The default value is 50 (%).

Example

export ASCEND_REMAIN_CACHE_SIZE_RATIO=50

Restrictions

The priority for the system to read the ratio of the reserved cache space is as follows:

Configuration file op_cache.ini in the disk cache directory for operator compilation > Environment variable ASCEND_REMAIN_CACHE_SIZE_RATIO > Default value.

If both the op_cache.ini file and the environment variable are configured, the configuration options in the op_cache.ini file are read first. If neither the op_cache.ini file nor the environment variable are configured, the default system value is read. By default, 50% of the cache space is reserved.

For details about the op_cache.ini configuration file, see op_cache.ini File.

op_cache.ini File

After the operator build cache function is enabled, the op_cache.ini file is automatically generated in the specified disk cache directory for operator build. You can configure the cache disk space in this configuration file. If the op_cache.ini file does not exist, manually create it in the directory.

The method of specifying the disk cache directory for operator build varies depending on the scenario. For example:

The preceding scenarios are only examples. For details, see the user manual of the corresponding scenario.

Add the following information to the op_cache.ini file:

# Configure the file format (required). The automatically generated file contains the following information by default. When manually creating a file, enter the following information:
[op_compiler_cache]
# Limit the disk space of the cache folder on the Ascend AI Processor (unit: MB).
max_op_cache_size=500
# When the disk space is insufficient, set the percentage of cache files to retain. Value range: [1, 100] (%). For example, setting it to 80 means that when disk space becomes insufficient, 80% of the cache files will be retained and the rest will be deleted.
remain_cache_size_ratio=80

Applicability

Atlas training products

Atlas inference products

Atlas A2 training products / Atlas A2 inference products

Atlas A3 training products / Atlas A3 inference products

Atlas 200I/500 A2 inference products