alloc_tensor_msg
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
Function Description
Allocates FlowMsg of the tensor type based on the shape, data type, and alignment size.
Prototype
1 | alloc_tensor_msg(self, shape: Union[List[int], Tuple[int]], dtype, align:Optional[int] = 64) -> FlowMsg |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
shape |
Input |
Shape of a tensor. |
dtype |
Input |
Data type of a tensor. |
align |
Input |
Size of the allocated memory address alignment. Values: [32, 64, 128, 256, 512, 1024]. Default value: 64. |
Returns
Instance of FlowMsg
Exception Handling
If no tensor pointer can be allocated, None is returned.
Constraints
None
Parent topic: Class MetaRunContext