Function: create_handle_for_cast

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

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)
    

Parameters

Parameter

Description

src_desc

Int, pointer address of the input tensor description.

dst_desc

Int, pointer address of the output tensor description.

truncate

Int, reserved.

Returns

Return Value

Description

handle

Int, pointer address of the output handle.

ret

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