Profiling options Parameter Description

  • output: Path for saving Profiling collection result files. You can configure an absolute path or a relative path (relative to the current path when the command is executed). The path cannot contain the following special characters: "\n", "\f", "\r", "\b", "\t", "\v", "\u007F".

    • An absolute path starts with "/", for example, /home/output.
    • A relative path starts directly with a directory name, for example, output.
    • This parameter has a higher priority than ASCEND_WORK_PATH.
    • This path does not need to be created by the user in advance. It is created automatically during collection.
  • storage_limit: Specifies the maximum file capacity allowed in the directory where data is written to disk. When the Profiling data files on the disk are about to occupy the maximum storage space set by this parameter, or the remaining total disk space is about to be fully occupied (remaining total space <= 20 MB), the earliest files on the disk are aged out and deleted.

    Range: [200, 4294967295], in MB. When setting this parameter, you must specify the unit, for example, 200MB.

    If this parameter is not configured, before collection, if the available disk space is less than 20 MB, data is not written to disk.

  • training_trace: Switch for collecting iteration trace data, that is, the software information of the training task and the AI software stack, to implement performance analysis of the training task, focusing on data such as forward and backward computation and gradient aggregation and update. When collecting forward and backward operator data, this parameter must be set to on.

  • task_trace, task_time: switches that control the collection of operator dispatch latency, operator execution latency, and iteration trace data. The related latency data is output to files such as task_time, op_summary, and op_statistic. Values:

    • on: enabled, the default value, with the same effect as l1.

    • off: disabled.

    • l0: collects operator dispatch latency and operator execution latency data. Compared with l1, because basic operator information data is not collected, the performance overhead during collection is lower, allowing more accurate statistics of the related latency data.

    • l1: collects operator dispatch latency, operator execution latency, and basic operator information data, providing more comprehensive performance analysis data.

      When training profiling mode is enabled, that is, when training Profiling data is collected, task_trace must be set to on, and training_trace must also be set to on.

  • ge_api: collects the latency data of dynamic shape operators during the Host scheduling phase. Values:

    • off: disabled, the default value.
    • l0: collects the latency data of dynamic shape operators in the main phases of Host scheduling, allowing more accurate statistics of the related latency data.
    • l1: collects more fine-grained latency data of dynamic shape operators during the Host scheduling phase, providing more comprehensive performance analysis data.
  • hccl: Controls the switch for communication data collection. The value can be on or off, and the default is off.

    This switch will be deprecated in later versions. Use the task_time switch to control the collection of related data.

  • aicpu: Collects detailed information about AICPU operators, such as operator execution time and data copy time. The value can be on or off, and the default is off.

  • fp_point: Specifies the start position of the forward operator in the training network iteration trace, and is used to record the start timestamp of forward computation. The configured value is the name of the first forward operator. In the training script, you can save the graph as a .pbtxt file through tf.io.write_graph, obtain the name from the file, and fill it in. You can also leave it empty so that the system automatically identifies the start position of the forward operator, for example, "fp_point":"".

  • bp_point: Specifies the end position of the backward operator in the training network iteration trace, and records the end timestamp of backward computation. bp_point and fp_point can be used to calculate the forward and backward time. The configured value is the name of the last backward operator. In the training script, you can save the graph as a .pbtxt file through tf.io.write_graph, obtain the name from the file, and fill it in. You can also leave it empty so that the system automatically identifies the end position of the backward operator, for example, "bp_point":"".

  • aic_metrics: AI Core performance metric collection item. The values are as follows:

    • ArithmeticUtilization: Statistics on the proportion of various computation metrics.

    • PipeUtilization: Proportion of time consumed by the compute unit and the transfer unit. This is the default value.

    • Memory: Proportion of external memory read/write instructions.

    • MemoryL0: Proportion of internal L0 memory read/write instructions.

    • MemoryUB: proportion of internal UB memory read/write instructions.

    • ResourceConflictRatio: proportion of pipeline queue instructions.

    • L2Cache: number of L2 cache read/write hits and reallocation count after misses.

      • This parameter is not supported by Atlas inference products.
      • This parameter is not supported by Atlas training products.
    • MemoryAccess: bandwidth data volume of operator memory access on the core.

      • This parameter is not supported by Atlas inference products.
      • This parameter is not supported by Atlas training products.
      • Ascend 950PR&950DT product series: this parameter is not supported.

      Custom collection of registers is supported, for example: "aic_metrics":"Custom:0x49,0x8,0x15,0x1b,0x64,0x10".

      • The Custom field indicates a custom type, configured as a specific register value, in the range [0x1, 0x6E].
      • A maximum of eight registers can be configured, separated by commas (,).
      • Register values support hexadecimal or decimal format.
  • l2: switch that controls the hit rate of L2 Cache and TLB page table cache. The value can be on or off, and the default value is off. If Profiling is enabled during the model execution phase in the aclgraph scenario, this collection item does not take effect.

    • Atlas inference products: support collection of the L2 Cache hit rate.
    • Atlas training products: support collection of the L2 Cache hit rate.
    • Atlas A2 products: support collection of the hit rate of L2 Cache and TLB page table cache. To analyze the number of AI Core hits on L2, aic-metrics=L2Cache is recommended.
    • Atlas A3 products: support collection of the hit rate of L2 Cache and TLB page table cache. To analyze the number of AI Core hits on L2, aic-metrics=L2Cache is recommended.
    • Ascend 950PR&950DT products: support collection of the hit rate of L2 Cache and TLB page table cache. To analyze the number of AI Core hits on L2, aic-metrics=L2Cache is recommended.
  • msproftx: switch that controls the output of performance data by msproftx users and upper-layer framework programs. The value can be on or off, and the default value is off.

    You need to first add the following mstx API or msproftx API to the application script. The mstx API is recommended.

  • runtime_api: switch that controls runtime API performance data collection. The value can be on or off, and the default value is off. It can collect runtime API performance data, including the latency of synchronous and asynchronous memory copy between the Host and Device and between Devices.

  • sys_hardware_mem_freq: collection switch for on-chip memory, QoS transmission bandwidth, LLC L3 cache bandwidth, accelerator bandwidth, SoC transmission bandwidth, and component memory usage. The collection content varies slightly by product. The actual result prevails. The range is [1,100], and the unit is Hz.

    For Ascend 950PR&950DT product series, the maximum collection frequency supported by Qos and SoC can be configured to 10000, while the maximum collection frequency supported by other collection items remains 100. If the configured value exceeds the range, other collection items are collected at the maximum collection frequency of 100.

    It is known that collecting memory data in an environment with glibc earlier than 2.34 may trigger a known glibc Bug 19329. This issue can be resolved by upgrading the glibc version of the environment.

    For the following models, after a collection task ends, it is not recommended to increase the collection frequency. Otherwise, the SoC transmission bandwidth data may be lost.

    • Atlas 200I/500 A2 inference product
    • Atlas A2 product series
    • Atlas A3 product series
  • llc_profiling: LLC Profiling collection event. It can be set to:

    • read: read event, L3 cache read rate. The default value is read.
    • write: write event, L3 cache write rate.
  • sys_io_sampling_freq: collection frequency of NIC, ROCE, and UB bandwidth data. Range [1,100], in Hz.

    • Atlas inference series: This parameter is not supported.
    • Atlas A2 series: Supports collection of NIC and ROCE.
    • Atlas A3 series: Supports collection of NIC and ROCE.
    • Ascend 950PR&950DT series: Supports collection of UB bandwidth data.
  • sys_interconnection_freq: Collection frequency of collective communication bandwidth data (HCCS), collective communication hardware acceleration unit (CCU) bandwidth data, SIO data, PCIe data, and UB bandwidth data, as well as inter-chip transmission bandwidth information collection frequency. Range [1,50], unit: Hz.

    • Atlas training series: Supports collection of HCCS and PCIe data.
    • Atlas A2 series: Supports collection of HCCS, PCIe data, and inter-chip transmission bandwidth information.
    • Atlas A3 series: Supports collection of HCCS, PCIe data, inter-chip transmission bandwidth information, and SIO data.
    • Ascend 950PR&950DT series: Supports collection of PCIe data, inter-chip transmission bandwidth information, CCU bandwidth data, SIO data, and UB bandwidth data.
  • dvpp_freq: DVPP collection frequency. Range [1,100], unit: Hz.

  • instr_profiling: Switch for collecting the bandwidth and latency of AI Core and AI Vector. Supported only in single-operator scenarios. The value can be on or off, and the default value is off.

    • Atlas training products: This function is not supported.
    • Atlas A2 products: This switch is not supported. This function is controlled by instr_profiling_freq.
    • Atlas A3 products: This switch is not supported. This function is controlled by instr_profiling_freq.
    • Ascend 950PR&950DT products: Supported. However, the statistics may be inaccurate because the statistical time of the last instruction segment may be excessively long. It is recommended to use the msprof op method for collection.
  • instr_profiling_freq: Switch for collecting the bandwidth and latency of AI Core and AI Vector. Once the collection frequency is configured, the related collection capability is enabled. Supported only in single-operator scenarios. The range is [300,30000], in Hz.

    • Atlas training products: This function is not supported.
    • Atlas A2 products: Supported.
    • Atlas A3 products: Supported.
    • Ascend 950PR&950DT products: This switch is not supported. This function is controlled by instr_profiling.
  • host_sys: switch for collecting Host-side performance data. The value can be one or more of the following, separated by commas when multiple values are selected, for example, "host_sys": "cpu,mem".

    • cpu: CPU utilization at the process level.
    • mem: memory utilization at the process level.
    • disk: disk I/O utilization at the process level. To collect Host-side disk performance data, the third-party open-source tool iotop must be installed. To collect osrt performance data, the third-party open-source tools perf and ltrace must be installed.
    • network: network I/O utilization at the system level.
    • osrt: syscall and pthreadcall at the process level.
  • host_sys_usage: collects CPU and memory data of the Host-side system and all processes. The value can be cpu and/or mem, separated by commas when multiple values are selected.

  • host_sys_usage_freq: configures the collection frequency of CPU and memory data of the Host-side system and all processes. The value range is [1,50], and the default value is 50, in Hz.