acltdtCreateDataItem

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

x

Atlas inference products

x

Atlas training products

Description

Creates data of the acltdtDataItem type as a Tensor.

To destroy data of the acltdtDataItem type, see acltdtDestroyDataItem.

Prototype

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.

dims

Input

Tensor shape.

dimNum

Input

Tensor dimension count.

dataType

Input

Data type of the normal data.

data

Input

Pointer to the data address.

size

Input

Buffer size.

Returns

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