ASCEND_CACHE_PATH

Function Description

If developers want files generated during compilation and running to be stored in a unified path, they can use this environment variable to set the storage path of shared files. Shareable files generated by each component during compilation and running are stored in the path defined by this environment variable.

  • The path can contain uppercase and lowercase letters (a-z, A-Z), digits (0-9), underscores (_), hyphens (-), periods (.), and Chinese characters.
  • Ensure that the specified path exists and is valid, and that the executing user has read, write, and execute permissions.

Files under ${ASCEND_CACHE_PATH} include:

  • ${ASCEND_CACHE_PATH}/aoe_data: AOE tuning knowledge base files, which support sharing across multiple devices.

    Priority description:

    TUNE_BANK_PATH > ASCEND_CACHE_PATH > Default knowledge base path

  • ${ASCEND_CACHE_PATH}/kernel_cache: operator compilation cache files, which support sharing across multiple devices on a single server.

    The following scenarios provide parameters or APIs for setting the storage path of operator compilation cache files. Their priorities are higher than that of the ASCEND_CACHE_PATH environment variable. The details are as follows:

    • Scenario parameter for offline model compilation using the ATC tool

      --op_compiler_cache_dir > ASCEND_CACHE_PATH > Default path ($HOME/atc_data)

    • Scenario for building or compiling models using AscendCL APIs

      • OP_COMPILER_CACHE_DIR in the graph building API aclgrphBuildInitialize > ASCEND_CACHE_PATH > Default path ($HOME/atc_data)
      • OP_COMPILER_CACHE_DIR in the graph building API aclgrphBuildModel > ASCEND_CACHE_PATH > Default path ($HOME/atc_data)
      • ACL_OP_COMPILER_CACHE_DIR in the application compilation API aclCompileOpt > ASCEND_CACHE_PATH > Default path ($HOME/atc_data)
    • op_compiler_cache_dir in the TF Adapter configuration for TensorFlow network training or online inference > ASCEND_CACHE_PATH > Default path ($HOME/atc_data).

Configuration Example

export ASCEND_CACHE_PATH=/repo/task001/cache

Constraints

  • The shared storage must support Linux file locks (such as NFSv4, OceanStor Pacific 9950, and OceanStor Pacific 9550). For storage that does not support Linux file locks (such as NFSv3), you are advised to store the files in a local directory.
  • In a multi-server scenario, the AI processor model, firmware driver, and CANN software version must be consistent across devices.

Supported Models

Supported on all chips