Script.tcgen05.view¶
- Script.tcgen05.view(tensor, dtype, shape)[source]¶
Reinterpret a tensor memory tensor with a different dtype and shape.
Returns a new
TMemoryTensorthat views the same underlying tensor memory with a different data type and shape. This is a metadata-only operation.- Parameters:
tensor (TMemoryTensor) – The source tensor memory tensor.
dtype (DataType) – The new data type for the view.
shape (Sequence[int]) – The new shape for the view.
- Returns:
ret – A new tensor memory tensor with the specified dtype and shape.
- Return type: