Attribute Name List

This section provides the attribute names that can be set by calling the SetAttr API. The attributes are at the operator level. The header file is located in include/ge/ge_api_types.h in the CANN component directory.

_enable_inner_parallel

Sets whether to allow operators in _user_stream_label to be distributed based on the original GE concurrency policy.

Parameter values:

  • true: Operators in _user_stream_label are distributed based on the original GE concurrency policy.
  • false: All operators in _user_stream_label are merged into the same DataFlow for execution, regardless of the original concurrency policy.

Restrictions:

This attribute must be used together with _user_stream_label. When _enable_inner_parallel is set to true, operators in _user_stream_label are distributed based on the original GE concurrency policy (for example, CMO operators are distributed separately).

Applicable products:

All processors

_op_aicore_num

Sets the number of Cube Cores in the AI Core used for operator build.

Its value is an integer greater than 0 and less than or equal to the maximum numbers of Cube Cores included in the AI processor.

You can view the maximum number of Cube Cores contained in different AI processors in the ${INSTALL_DIR}/<arch>-linux/data/platform_config/xxx.ini file. The following information indicates that there are 24 Cube Cores in the AI processor:
[SoCInfo]
# Use the default parameter values, which are the maximum values.
ai_core_cnt=24
cube_core_cnt=24
vector_core_cnt=48

Replace ${INSTALL_DIR} with the CANN component directory. For example, if the installation is performed by the root user, the default file storage path is /usr/local/Ascend/cann.<arch> indicates the OS architecture, and xxx varies depending on the product.

Applicable products:

  • Ascend 950PR / Ascend 950DT : supported
  • Atlas A3 training products / Atlas A3 inference products : supported
  • Atlas A2 training products / Atlas A2 inference products : supported
  • Atlas inference products : not supported
  • Atlas training products : not supported
  • Atlas 200I/500 A2 inference products : not supported

_op_vectorcore_num

Sets the number of Vector Cores in the AI Core used for operator build.

Its value is an integer greater than 0 and less than or equal to the maximum numbers of Vector Cores included in the AI processor.

You can view the maximum number of Vector Cores contained in different AI processors in the ${INSTALL_DIR}/<arch>-linux/data/platform_config/xxx.ini file. The following information indicates that there are 48 Vector Cores in the AI processor:

[SoCInfo]
# Use the default parameter values, which are the maximum values.
ai_core_cnt=24
cube_core_cnt=24
vector_core_cnt=48

Replace ${INSTALL_DIR} with the CANN component directory. For example, if the installation is performed by the root user, the default file storage path is /usr/local/Ascend/cann.<arch> indicates the OS architecture, and xxx varies depending on the product.

Applicable products:

  • Ascend 950PR / Ascend 950DT : supported
  • Atlas A3 training products / Atlas A3 inference products : supported
  • Atlas A2 training products / Atlas A2 inference products : supported
  • Atlas inference products : not supported
  • Atlas training products : not supported
  • Atlas 200I/500 A2 inference products : not supported

_op_exec_never_timeout

Sets whether the execution of AI Core operators in a static graph is limited by the timeout.

Parameter values:

  • true: The operator execution is not limited by timeout and never times out.
  • false: The operator execution is limited by timeout.

You can use the aclrtSetOpExecuteTimeOutV2 API to set the timeout duration for operator execution.

Restrictions:

If the tiling feature is enabled for AI Core operators, that is, the function controlled by ge.tiling_schedule_optimize in Performance Tuning is enabled for an operator, the operator does not support the never-timeout attribute.

Applicable products:

All processors

_user_stream_label

Sets the label of the target stream (label of the stream to be switched to) for operator execution. Identical labels represent the same stream. The value is of the character string type. The function is controlled by the user.

If the intra-graph multi-stream expression function needs to be enabled during graph execution, you can use _user_stream_label and _user_stream_priority to distribute multiple operators in the graph to different streams for parallel computing, improving resource utilization.

Applicable products:

All processors

_user_stream_priority

Sets the priority for switching to the stream indicated by _user_stream_label, meaning that at runtime, higher-priority streams are allocated core resources first during concurrency. In the current version, this is a reserved parameter. The default value 0 is recommended. The value is of the int type.

If the intra-graph multi-stream expression function needs to be enabled during graph execution, you can use _user_stream_label and _user_stream_priority to distribute multiple operators in the graph to different streams for parallel computing, improving resource utilization.

Applicable products:

All processors