GetUserWorkspace

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

Function Usage

Obtains the workspace pointer used by the user. For details about the workspace, see How do I use workspace?. In the kernel direct scheduling development mode, if the HAVE_WORKSPACE compilation option is not enabled, the framework does not automatically set the system workspace. If high-level APIs that require the system workspace, such as Matmul Kernel APIs, are used, the kernel needs to set the system workspace through SetSysWorkSpace. In this case, the user workspace needs to be obtained through this API.

Prototype

1
__aicore__ inline GM_ADDR GetUserWorkspace(GM_ADDR workspace)

Parameters

Table 1 Parameters

Parameter

Input/Output

Description

Workspace

Input

Pointer to the passed workspace, including the system workspace and the workspace used by the user.

Restrictions

None

Return Value Description

The user uses the workspace pointer.