--aicore_num
Applicability
|
Product |
Supported |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Description
Sets the number of AI Cores used for model build.
See Also
None
Argument
Argument: "integer 1|integer 2", separated by a vertical bar (|).
- Scenario 1: For the following products, integer 1 indicates the number of Cube Cores in the AI Core used for operator build, and integer 2 indicates the number of Vector Cores in the AI Core used for operator build. Both integer 1 and integer 2 must be greater than 0 and less than or equal to the maximum numbers of Cube Cores and Vector Cores included in the Ascend AI Processor.
Atlas A3 training products /Atlas A3 inference products Atlas A2 training products /Atlas A2 inference products - Scenario 2: For the following products, only integer 1 needs to be configured in the format of "integer 1|", indicating the number of AI Cores used for operator build. If integer 2 is configured, it does not take effect.
Atlas 200I/500 A2 inference products Atlas inference products Atlas training products
Restrictions:
- For scenario 1 of the argument:
You can view the maximum numbers of Cube Cores and Vector Cores of different Ascend AI Processors in the ${INSTALL_DIR}/<arch>-linux/data/platform_config/xxx.ini file. The following information indicates that there are 24 Cube Cores and 48 Vector Cores on the Ascend 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
- For scenario 2 of the argument:
You can view the maximum number of AI Cores contained in different Ascend AI Processors in the ${INSTALL_DIR}/<arch>-linux/data/platform_config/xxx.ini file. The following information indicates that there are 10 AI Cores on the Ascend AI Processor:
[SoCInfo] # Use the default parameter value, which indicates the maximum number of AI Cores. ai_core_cnt=10 vector_core_cnt=8
- If the operator build cache function is enabled (by setting --op_compiler_cache_mode to enable or force) when this option is configured, this option takes effect only during the initial build. To make this option take effect during non-initial build, you need to clear the cache of the build disk.
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.
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.
Suggestions and Benefits
None
Example
- Configuration example for scenario 1:
--aicore_num="24|48"
- Configuration example for scenario 2:
--aicore_num="10|" Or --aicore_num="10"
Relationships Between AI Cores, Cube Cores, and Vector Cores
The definition of a Core helps you better understand the relationships between AI Cores, Cube Cores, and Vector Cores. A Core is a compute core with an independent Scalar compute unit. Generally, the Scalar compute unit provides multiple functions for the compute core, such as the single instruction multiple data (SIMD) instruction dispatch. Therefore, the Scalar compute unit is also called the intra-core scheduling unit. The AI data processing core unit varies with products. Currently, there are the following types:
- The AI data processing core unit is an AI Core:
- In an AI Core, a Cube and a Vector share a Scalar scheduling unit, for example,
Atlas training products .
- In an AI Core, a Cube and a Vector have their own Scalar scheduling units, which are also called a Cube Core and a Vector Core. In this case, a Cube Core and a group of Vector Cores are defined as an AI Core. The number of AI Cores is usually calculated based on the number of Cube Cores, for example,
Atlas A2 training products /Atlas A2 inference products .
- In an AI Core, a Cube and a Vector share a Scalar scheduling unit, for example,
- The AI data processing core units are AI Cores and independent Vector Cores. The AI Cores and Vector Cores have independent Scalar scheduling units, for example,
Atlas inference products .
Dependencies and Restrictions
None