acltdtCreateDataItem

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

x

Atlas inference product

x

Atlas training product

Description

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