jax.pallas.tpu.unpack_fp6

Contents

jax.pallas.tpu.unpack_fp6#

jax.pallas.tpu.unpack_fp6(two_bits, four_bits)[source]#

Unpacks 2b and 4b split layout arrays into a 6b-in-8b container array.

Places four_bits into bits [3:0] (LSB) and two_bits into bits [5:4] (MSB) of each byte in the 8-bit container, with upper bits [7:6] zero-filled.

Parameters:
  • two_bits (Array) – A 2-bit array (int2 or uint2).

  • four_bits (Array) – A 4-bit array (int4 or uint4).

Returns:

An 8-bit container array (int8) of the same shape.

Return type:

Array