aclprofSetConfig

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Description

Sets profile data collection parameters. This API functions as an extended API of aclprofCreateConfig.

This API can be called for multiple times. You need to ensure data consistency and accuracy.

Prototype

aclError aclprofSetConfig(aclprofConfigType configType, const char *config, size_t configLength)

Parameters

Parameter

Input/Output

Description

configType

Input

It is used as the value of the configType parameter. Each enumerated value indicates a different collection configuration. To collect multiple types of profile data, you need to call this API for multiple times. The details are as follows:

  • ACL_PROF_STORAGE_LIMIT: maximum size of files that can be stored in a specified disk directory. The valid value range is [200, 4294967295], in MB.
  • ACL_PROF_SYS_HARDWARE_MEM_FREQ: collection frequency of on-chip memory read/write rate, QoS transmission bandwidth, LLC L3 cache bandwidth, accelerator bandwidth, SoC transmission bandwidth, component memory usage, and other related indicators. The value range is [1,100], in Hz. The collected content varies depending on the product. The actual result prevails.

    Sampling memory data in the environment where glibc (2.34 or an earlier version) is installed may trigger a known Bug 19329. This problem can be solved by upgrading the glibc version.

  • ACL_PROF_LLC_MODE: LLC Profiling event. ACL_PROF_SYS_HARDWARE_MEM_FREQ must be set at the same time. The options are as follows:
    • read: read events, that is, the L3 cache read rate.
    • write: write events, that is, the L3 cache write rate. Defaults to read.
  • ACL_PROF_SYS_IO_FREQ: NIC, ROCE collection frequency. The value range is [1,100], in Hz.
    • Atlas 200I/500 A2 inference products: supports NIC collection only in RC scenarios. This option does not take effect in container scenarios.
    • Atlas inference products: not supported.
    • Atlas training products: support NIC and RoCE collection.
    • Atlas A2 training products/Atlas A2 inference products: support NIC and RoCE collection.
    • Atlas A3 training products/Atlas A3 inference products: support NIC and RoCE collection.
  • ACL_PROF_SYS_INTERCONNECTION_FREQ: HCCS bandwidth, PCIe data collection switch, inter-chip transmission bandwidth data collection frequency, and SIO data collection switch. The value range is [1,50], in Hz.
    • Atlas 200I/500 A2 inference products: not supported.
    • Atlas inference products: support PCIe data collection.
    • Atlas training products: support HCCS and PCIe data collection.
    • Atlas A2 training products/Atlas A2 inference products: support HCCS, PCIe data, and inter-chip transmission bandwidth information collection.
    • Atlas A3 training products/Atlas A3 inference products: support HCCS, PCIe data, inter-chip transmission bandwidth, and SIO data collection.
  • ACL_PROF_DVPP_FREQ: DVPP data collection frequency. The value range is [1, 100].

    Atlas inference products: support profile data collection but not data parsing.

  • ACL_PROF_HOST_SYS: host-side process-level profile data collection option, selected from cpu and mem.
  • ACL_PROF_HOST_SYS_USAGE: host-side system- and process-level profile data collection option, selected from cpu and mem.
  • ACL_PROF_HOST_SYS_USAGE_FREQ: CPU and memory usage collection frequency. The value range is [1, 50].

config

Input

Configuration parameter value.

configLength

Input

Length of the config, in bytes. The maximum length is 256 bytes.

Returns

0 on success; else, failure. For details, see aclError.

Restrictions

Call aclprofSetConfig and then aclprofStart. You can call this API as required.