Constructor and Destructor
Supported Products
Product |
Supported/Unsupported |
|---|---|
x |
|
√ |
|
x |
|
x |
|
x |
|
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
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); |