aclopCreateHandle

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

√

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas 200I/500 A2 inference products

√

Atlas inference products

√

Atlas training products

√

MC62CM12A AI Processor

×

Function Usage

Creates a handle to an operator.

To destroy a handle, call aclopDestroyHandle.

Prototype

1
2
3
4
5
6
7
aclError aclopCreateHandle(const char *opType,
int numInputs,
const aclTensorDesc *const inputDesc[],
int numOutputs,
const aclTensorDesc *const outputDesc[],
const aclopAttr *opAttr,
aclopHandle **handle)

Parameters

Parameter

Input/Output

Description

opType

Input

Pointer to the operator type name

numInputs

Input

Number of input tensors

inputDesc

Input

Pointer array of the operator input tensor description

numOutputs

Input

Number of output tensors

outputDesc

Input

Pointer array of the operator output tensor description. For details about the type definition, see aclTensorDesc.

opAttr

Input

Pointer to the operator attributes. For details about the type definition, see aclopAttr.

handle

Output

Pointer to the pointer to the aclopHandle data. For details about the type definition, see aclopHandle.

Returns

0 on success; else, failure. For details, see aclError.

Restrictions

If an operator has a constant input but aclSetTensorConst has not been called to set the constant input, call aclSetTensorPlaceMent to set the placement attribute of TensorDesc and set memType to the host memory.