aclopSetKernelWorkspaceSizes

Description

Sets the workspace parameters of an operator in dynamic shape scenarios. This API is optional. Use it as required.

Prototype

aclError aclopSetKernelWorkspaceSizes(aclopKernelDesc *kernelDesc, int numWorkspaces, size_t *workspaceSizes)

Parameters

Parameter

Input/Output

Description

kernelDesc

Input

Kernel description buffer, which is a pointer to the aclopKernelDesc type.

typedef struct aclopKernelDesc aclopKernelDesc

numWorkspaces

Input

Number of workspaces.

workspaceSizes

Input

Pointer to the address of the array of workspace sizes.

Returns

The value 0 indicates success, and other values indicate failure. For details, see aclError.