AllocTensorMsg

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

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)

Command-Line Options

Parameter

Input/Output

Description

Shape

Input

Shape of a tensor.

dataType

Input

Data type of a tensor.

Returns

Allocated tensor pointer.

Troubleshooting

If no tensor pointer can be allocated, NULL is returned.

Constraints

None