AllocTensorMsg

Applicability

Product

Supported

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

x

Function Description

Allocates a message of the tensor type based on the shape and data type. This function is called by Proc.

Prototype

1
std::shared_ptr<FlowMsg> AllocTensorMsg(const std::vector<int64_t> &shape, TensorDataType dataType)

Parameters

Parameter

Input/Output

Description

Shape

Input

Shape of a tensor.

dataType

Input

Data type of a tensor.

Returns

Pointer to the allocated tensor.

Exception Handling

NULL is returned if the tensor allocation fails.

Constraints

None