jax.pallas.tpu_sc.bitcast

Contents

jax.pallas.tpu_sc.bitcast#

jax.pallas.tpu_sc.bitcast(x, dtype)[source]#

Bitcasts an array to a different dtype along the minormost dimension.

Equivalent to pltpu.bitcast(x, dtype, dim=-1).

Parameters:
  • x (Array) – The array to bitcast.

  • dtype (str | type[Any] | dtype | SupportsDType) – The target dtype.

Returns:

The bitcast array.

Return type:

Array