GetTaskRatio

Supported Products

Product

Supported/Unsupported

Atlas A3 training products / Atlas A3 inference products

Atlas A2 training products / Atlas A2 inference products

Atlas 200I/500 A2 inference products

x

Atlas inference product 's AI Core

Atlas inference product 's Vector Core

x

Atlas training products

x

Function Usage

In decoupled mode, this API returns the ratio of the number of Cube Cores (AICs) or Vector Cores (AIVs) on an AI Core to the number of AI Cores. In coupled mode, the value 1 is always returned.

Prototype

1
__aicore__ inline int64_t GetTaskRatio()

Parameters

None

Return Value Description

  • In decoupled mode, the return values of this API called on the AIC and AIV vary depending on the kernel type (set by using the Setting the Kernel Type API):
    Table 1 Returned value list

    Kernel Type

    KERNEL_TYPE_AIV_ONLY

    KERNEL_TYPE_AIC_ONLY

    KERNEL_TYPE_MIX_AIC_1_2

    KERNEL_TYPE_MIX_AIC_1_1

    KERNEL_TYPE_MIX_AIC_1_0

    KERNEL_TYPE_MIX_AIV_1_0

    AIV

    1

    -

    2

    1

    -

    1

    AIC

    -

    1

    1

    1

    1

    -

  • In coupled mode, the value 1 is always returned.

Constraints

None

Example

1
2
uint64_t ratio = AscendC::GetTaskRatio();
AscendC::PRINTF("task ratio is %u", ratio);