tilus.Script.shared_tensor¶
- Script.shared_tensor(*, dtype, shape=None, layout=None)[source]¶
Allocate a shared tensor.
This instruction allocates a shared tensor with the specified data type, shape, and (optional) layout.
- Parameters:
dtype (DataType) – The data type of the tensor elements.
shape (Sequence[int]) – The shape of the tensor.
layout (SharedLayout, optional) – The layout of the tensor. If not provided, the layout will be inferred based on the operations performed on it.
- Returns:
ret – The allocated shared tensor.
- Return type: