Function: create_handle

C Prototype

aclError aclopCreateHandle(const char *opType, int numInputs,int numInputs, const aclTensorDesc *const inputDesc[], int numOutputs, const aclTensorDesc *const outputDesc[], const aclopAttr *opAttr, aclopHandle **handle);

Python Function

handle, ret = acl.op.create_handle(op_type, input_desc, output_desc, op_attr)

Function Usage

Creates a handle to an execution operator.

To destroy a handle, call acl.op.destroy_handle.

Input Description

op_type: str, operator type name.

input_desc: int list, description of the operator input tensor.

output_desc: int list, description of the operator output tensor.

op_attr: int, pointer address of an operator attribute. This object is created by calling acl.op.create_attr.

Return Value

handle: int, operator handle address object.

ret: int, error code.

Restrictions

If an operator has a constant input but acl.set_tensor_const has not been called to set the constant input, call acl.set_tensor_place_ment to set the placement attribute of TensorDesc and set mem_type to the host memory.