This document is relevant for: Trn1, Trn2, Trn3

nki.language.load_transpose2d#

nki.language.load_transpose2d(src, dtype=None)[source]#

Load a tensor from device memory (HBM) and 2D-transpose the data before storing into on-chip memory (SBUF).

Warning

This API is experimental and may change in future releases.

Parameters:
  • src – HBM tensor to load the data from.

  • dtype – (optional) data type to cast the output type to (see Supported Data Types for more information); if not specified, it will default to be the same as the data type of the input tile.

Returns:

a new tile on SBUF with values from src 2D-transposed.

This document is relevant for: Trn1, Trn2, Trn3