jax.experimental.pallas.mosaic_gpu.find_swizzle#
- jax.experimental.pallas.mosaic_gpu.find_swizzle(minor_dim_bits, what='')[source]#
Returns the largest swizzle that can be applied to a memory region.
Swizzling is usually necessary when dealing with 2D data in SMEM, especially if the reference is used as an MMA operand. The returned swizzle is usually applied as
plgputransform:transforms = ( plgpu.TilingTransform((8, 8 * swizzle // elem_bits)), plgpu.SwizzleTransform(swizzle)) )