Function: set_kernel_workspace_sizes

Applicability

Product

Supported (√/x)

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas training products

Atlas inference products

Atlas 200I/500 A2 inference products

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)
    

Parameter Description

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.

Return Value Description

Return Value

Description

ret

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

Restrictions

This is an optional interface and can be selected as required.