acltdtCreateDataItem

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

√

Function

Creates data of the acltdtDataItem type as a tensor of a service.

To destroy data of the acltdtDataItem type, call acltdtDestroyDataItem.

Prototype

1
2
3
4
5
6
acltdtDataItem *acltdtCreateDataItem(acltdtTensorType tdtType,
const int64_t *dims,
size_t dimNum,
aclDataType dataType,
void *data,
size_t size)

Parameters

Parameter

Input/Output

Description

tdtType

Input

Tensor type. For details about the type definition, see acltdtTensorType.

dims

Input

Tensor shape.

dimNum

Input

Dimension count in the tensor shape.

dataType

Input

Data type of normal data. For details about the type definition, see aclDataType.

data

Input

Pointer to the data address.

size

Input

Data length.

Returns

  • Success: a pointer to data of the acltdtDataItem type
  • Failure: nullptr