GetUserWorkspace

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas 200I/500 A2 inference product

x

Atlas inference product AI Core

Atlas inference product Vector Core

x

Atlas training product

Function Usage

Obtains the workspace pointer used by the user. For details about the workspace, see How to Use Workspace. In development processes based on the kernel launch mode, if HAVE_WORKSPACE 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 API parameters

Parameter

Input/Output

Description

workspace

Input

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

Constraints

None

Returns

The user uses the workspace pointer.