--aicore_num
Applicability
|
Product |
Supported (Yes/No) |
|---|---|
|
Atlas 350 Accelerator Card |
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
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 AI processor.
Atlas 350 Accelerator Card
Atlas A3 training product /Atlas A3 inference product Atlas A2 training product /Atlas A2 inference product - 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 product Atlas inference product Atlas training product
Restrictions:
- For scenario 1:
You can view the maximum number of Cube Cores and Vector Cores contained in different AI processors in the "${INSTALL_DIR}/<arch>-linux/data/platform_config/xxx.ini" file. As shown in the following figure, there are 24 Cube Cores and 48 Vector Cores on 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
- For scenario 2:
You can view the maximum number of AI Cores contained in different AI processors in the "${INSTALL_DIR}/<arch>-linux/data/platform_config/xxx.ini" file. As shown in the following figure, there are 10 AI Cores on the 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 parameter take effect during non-initial compilation, you need to clear the cache of the compilation 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.
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 product .
- 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 product /Atlas A2 inference product .
- In an AI Core, a Cube and a Vector share a Scalar scheduling unit, for example,
- The AI data processing core unit consists of an AI Core and an independent Vector Core. The AI Core and Vector Core both have independent Scalar scheduling units, for example,
Atlas inference product .
Dependencies and Restrictions
None