Function: create_handle_for_cast

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

Creates a handle to data type casting.

After the handle is created, call acl.op.execute_with_handle to execute the operator.

Prototype

  • C Prototype
    1
    aclError aclopCreateHandleForCast(const aclTensorDesc *srcDesc, const aclTensorDesc *dstDesc, uint8_t truncate, aclopHandle **handle)
    
  • Python Function
    1
    handle, ret = acl.op.create_handle_for_cast(src_desc, dst_desc, truncate)
    

Parameter Description

Parameter

Description

src_desc

Int, pointer address of the input tensor description.

dst_desc

Int, pointer address of the output tensor description.

truncate

truncate: int, reserved.

Return Value Description

Return Value

Description

handle

Int, pointer address of the output handle.

ret

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