ttnn.untilize
- ttnn.untilize(input_tensor: ttnn.Tensor, *, memory_config: ttnn.MemoryConfig = None, use_multicore: bool = True, use_pack_untilize: bool = True, sub_core_grids: ttnn.CoreRangeSet = None) List of ttnn.Tensor
-
Changes data layout of input tensor to ROW_MAJOR.
Input tensor must be on TT accelerator device, in TILE layout, and have BFLOAT16 data type.
Output tensor will be on TT accelerator device, in ROW_MAJOR layout, and have BFLOAT16 data type.
- Parameters:
-
input_tensor (ttnn.Tensor) – the input tensor.
- Keyword Arguments:
-
memory_config (ttnn.MemoryConfig, optional) – Memory configuration for the operation. Defaults to None.
use_multicore (bool, optional) – Whether to use multicore. Defaults to True.
use_pack_untilize (bool, optional) – Whether to use pack untilize. Defaults to True.
sub_core_grids (ttnn.CoreRangeSet, optional) – Sub core grids. Defaults to None.
- Returns:
-
List of ttnn.Tensor – the output tensor.
Example
# Create a tilized tensor tilized_tensor = ttnn.rand((1, 1, 64, 32), dtype=ttnn.bfloat16, layout=ttnn.Layout.TILE, device=device) # Untilize the tensor untilized_tensor = ttnn.untilize(tilized_tensor) logger.info("Untilized Tensor Shape:", untilized_tensor.shape)