TUNE_BANK_PATH

Description

Sets the path of the custom repository generated after Auto Tune.

The path must be an absolute path or a relative path (relative to the directory where the AOE tuning engine is executed). The path must exist and the user must have the read, write, and execute permissions on it. If the path specified by TUNE_BANK_PATH does not exist or the user does not have the required permissions on the path, the tuning process will report an error and exit.

  • Custom subgraph repository
    • If this environment variable is not configured, run the env command to check whether ASCEND_CACHE_PATH exists. If it exists, the custom repository is stored in ${ASCEND_CACHE_PATH}/aoe_data. If it does not exist, the custom repository is stored in ${HOME}/Ascend/latest/data/aoe/custom/graph/${soc_version} by default.
    • If this environment variable is configured, the custom repository is stored in the path specified by this environment variable.
  • Custom operator repository
    • If this environment variable is not configured, run the env command to check whether ASCEND_CACHE_PATH exists. If it exists, the custom repository is stored in ${ASCEND_CACHE_PATH}/aoe_data/${soc_version}. If it does not exist, the custom repository is stored in ${HOME}/Ascend/latest/data/aoe/custom/op/${soc_version} by default.
    • If this environment variable is configured, the optimal policy after tuning is stored in ${soc_version} in the configured path.

If multiple users share the repository, the users must set TUNE_BANK_PATH to the same path and have the read and write permissions on the path.

If the repository path is customized before tuning, you also need to configure this environment variable if you want to use the custom repository during model conversion.

Example

export TUNE_BANK_PATH=/home/HwHiAiUser/custom_tune_bank

Set this environment variable before tuning to specify a storage path for the custom knowledge base. After the setting, the following directories and files are generated in the directory specified by TUNE_BANK_PATH.

Set this environment variable after tuning to use the existing custom knowledge base. Ensure that the directory structure specified by TUNE_BANK_PATH is as follows:

├──Ascendxxx  // Ascendxxx indicates the SoC version. Replace it with the actual name. This folder stores the operator knowledge base.
│   ├── cube
│   │   ├── op1.bin // op1, op2, and op3 indicate the names of the generated operator knowledge bases. Replace them with the actual file names.
│   │   ├── op1.json
│   │   ├── op2.bin
│   │   └── op2.json
│   └── unified_bank
│       └── op3.json
└── subgraph.json // subgraph indicates the name of the generated subgraph knowledge base. Replace it with the actual file name.

Constraints

None

Applicability

Atlas training product

Atlas inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas A3 training product/Atlas A3 inference product