IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Mojo function

smallm_preshuffle_b

def smallm_preshuffle_b[b_type: DType, *, k_static: Int, warps_per_block: Int = Int(8)](dst: MutPointer[Scalar[b_type], MutAnyOrigin], src: ImmPointer[Scalar[b_type], ImmutAnyOrigin], n: Int, ctx: DeviceContext)

Launches the one-shot weight preshuffle that defines the B layout.

The graph op builds the same bytes with preshuffle_block_scaled_b.

Constraints:

n % 16 == 0 and k_static % (warps_per_block * 32) == 0; both also bind the paired matmul.

Was this page helpful?