Function: set_kernel_workspace_sizes

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas training product

Atlas inference product

Atlas 200I/500 A2 inference product

Function Usage

Sets the workspace parameters of an operator in dynamic shape scenarios.

Prototype

  • C Prototype
    1
    aclError aclopSetKernelWorkspaceSizes(aclopKernelDesc *kernelDesc, int numWorkspaces, size_t *workspaceSizes)
    
  • Python Function
    1
    ret = acl.op.set_kernel_workspace_sizes(kernel_desc, num_workspaces, workspace_sizes)
    

Parameters

Parameter

Description

kernel_desc

Int, kernel description buffer, pointer address of the aclopKernelDesc type.

num_workspaces

Int, number of workspaces.

workspace_sizes

Int, address of the array of workspace sizes.

Returns

Return Value

Description

ret

Int, error code: 0 on success; else, failure.

Restrictions

This API is optional. Use it as required.