Constructor and Destructor

Supported Products

Product

Supported/Unsupported

Atlas A3 training products/Atlas A3 inference products

x

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

x

Atlas inference product's AI Core

x

Atlas inference product's Vector Core

x

Atlas training products

x

Function Usage

Creates a KfcWorkspace object (Kfc stands for kernel function call), which indicates inter-core communication calling.

Prototype

1
2
3
class KfcWorkspace;
__aicore__ inline KfcWorkspace(GM_ADDR workspace)
__aicore__ inline ~KfcWorkspace()

Parameters

Table 1 KfcWorkspace constructor parameters

Parameter

Input/Output

Description

workspace

Input

Address of the message space in the global memory. You need to ensure address alignment and clearing

Returns

A KfcWorkspace object instance

Constraints

This API cannot be used together with REGIST_MATMUL_OBJ. The resource management API is used by users to manage the inter-core communication between the AIC and AIV. In REGIST_MATMUL_OBJ, the framework manages the inter-core communication between the AIC and AIV. If they are used at the same time, exceptions such as communication message errors may occur.

Example

1
AscendC::KfcWorkspace desc(workspaceGM);