ASCEND_WORK_PATH

Description

If you want the build and run files to be flushed to a unified directory, you can set this environment variable to set the storage path of files shared exclusively on a server.
  • The path specified by this environment variable can contain only uppercase letters, lowercase letters, digits, underscores (_), hyphens (-), and periods (.).
  • Ensure that the specified path exists and is valid. The execution user must have the read, write, and execute permissions.

The following table lists the files flushed each component to ${ASCEND_WORK_PATH}.

Table 1 Paths for exclusive files of each component process

Component

Path

File Content

Priority Specification

AOE

${ASCEND_WORK_PATH}/aoe_data

Information related to AOE tuning, including the tuning task name, tuning duration, model execution time/operator execution time before and after tuning, and repository hit information.

ASCEND_WORK_PATH > Default AOE tuning working directory.

The default AOE tuning working directory is as follows:

Value of WORK_PATH in ${install_path}/latest/tools/aoe/conf/aoe.ini.

LOG

${ASCEND_WORK_PATH}/log

Log file.

ASCEND_PROCESS_LOG_PATH > ASCEND_WORK_PATH > Default path for storing logs ($HOME/ascend/log)

TRACE

${ASCEND_WORK_PATH}/atrace

Trace log file.

ASCEND_WORK_PATH > Default path for storing trace logs ($HOME/ascend/atrace)

ATC

${ASCEND_WORK_PATH}/kernel_meta

Debugging-related process files generated during operator build, including the operator binary files (.o), operator description files (.json), and CCE files.

Parameter debug_dir > ASCEND_WORK_PATH > Default path (./Current execution path)

${ASCEND_WORK_PATH}/

Precheck result file check_result.json.

Parameter check_report > ASCEND_WORK_PATH > Default path (./Current execution path)

$ASCEND_WORK_PATH/FE/${Process ID}/fusion_result.json

Fusion patterns except for those disabled in the fusion_switch.cfg file.

ASCEND_WORK_PATH > Default path (./Current execution path)

${ASCEND_WORK_PATH}/

Dump graph files flushed to disks after the function of printing dump graph description is enabled (that is, the environment variable DUMP_GE_GRAPH is configured).

DUMP_GRAPH_PATH > ASCEND_WORK_PATH > Default path (./Current execution path)

TF Adapter

${ASCEND_WORK_PATH}/kernel_meta

Debugging-related process files generated during operator build, including the operator binary files (.o), operator description files (.json), and CCE files.

TF Adapter configuration parameter debug_dir > ASCEND_WORK_PATH > Default path (./Current execution path)

For details about the TF Adapter configuration parameter debug_dir, see:

${ASCEND_WORK_PATH}_<pid>_<sessionid>

Weight files of the Const/Constant node after developers enable the external weight function by setting the external_weight parameter.

ASCEND_WORK_PATH > Default path (./Current execution path)

${ASCEND_WORK_PATH}/

Dump graph files flushed to disks after the function of printing dump graph description is enabled (that is, the environment variable DUMP_GE_GRAPH is configured).

DUMP_GRAPH_PATH > ASCEND_WORK_PATH > Default path (./Current execution path)

${ASCEND_WORK_PATH}/extra-info/data-dump/<device_id>

Input data of the abnormal operators when enable_exception_dump is set to 2 and the environment variable NPU_COLLECT_PATH is not configured.

ASCEND_WORK_PATH > Default storage path (current execution path)

$ASCEND_WORK_PATH/FE/${Process ID}/fusion_result.json

Fusion patterns except for those disabled in the fusion_switch.cfg file.

ASCEND_WORK_PATH > Default path (./Current execution path)

AscendCL

${ASCEND_WORK_PATH}/kernel_meta

Debugging-related process files generated during operator build, including the operator binary files (.o), operator description files (.json), and CCE files.

  • Parameter DEBUG_DIR in the graph construction API aclgrphBuildInitialize > ASCEND_WORK_PATH > Default path (./Current execution path)
  • Parameter DEBUG_DIR in the graph construction API aclgrphBuildModel > ASCEND_WORK_PATH > Default path (./Current execution path)
  • Parameter ACL_DEBUG_DIR in the application build API aclCompileOpt > ASCEND_WORK_PATH > Default path (./Current execution path)

${ASCEND_WORK_PATH}_<pid>_<sessionid>

Weight files of the Const/Constant node after developers enable the external weight function by setting the external_weight parameter.

ASCEND_WORK_PATH > Default path (./Current execution path)

Profiling

${ASCEND_WORK_PATH}/profiling_data

Profile data collected by the Profiling tool.

Offline inference scenario:

  • If you run the msprof command to collect profile data, the priority is as follows:

    Parameter --output > ASCEND_WORK_PATH > Default path (path for storing the inference model file)

  • If the acl.json configuration file is used to collect profile data, the priority is as follows:

    Parameter output > ASCEND_WORK_PATH > Default path (path for the executable file of the application project)

TensorFlow training/online inference scenario:

Parameter output in the environment variable PROFILING_OPTIONS, parameter output in profiling_options of the training script, and parameter output_path configured when the training script calls the Profiler class have a higher priority than ASCEND_WORK_PATH.

In the training or online inference scenario, either output/output_path or ASCEND_WORK_PATH must be configured. Otherwise, an error will be reported when profile data is collected.

PyTorch training/online inference scenario:

Profile data path specified by the on_trace_ready=tensorboard_trace_handler function > ASCEND_WORK_PATH > Default path

If no path is specified after the tensorboard_trace_handler function is configured, you can use the environment variable ASCEND_WORK_PATH to set the path. In this case, the profile data flushed to disks is automatically parsed. If the on_trace_ready=torch_npu.profiler.tensorboard_trace_handler function is not used in the code, the profile data that is set and flushed to disks using the environment variable ASCEND_WORK_PATH is the original data.

Example

export ASCEND_WORK_PATH=/repo/task001/172.16.1.12_01_03

The path must exist, and the execution user must have the read, write, and execute permissions on the path. The last field of the path must uniquely identify the current host.

It is recommended that the unique ID should consist of machine ID, VM ID, and Docker ID, for example, machineID_vmID_dockerID.
  • machineID: IP address of the current host.
  • vmID: VM ID.
  • dockerID: Docker container ID.

If you use a physical machine, you only need to use the IP address to identify the physical machine.

Restrictions

In the multi-server scenario, the AI processor model, firmware, driver, and CANN software version on each server must be the same.

Applicability

Atlas 200/300/500 Inference Product

Atlas Training Series Product