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
block_scales_interleave
def block_scales_interleave[scales_dtype: DType, //, *, SF_VECTOR_SIZE: Int](output_scales_device: TileTensor[scales_dtype, Engine=output_scales_device.Engine, linear_idx_type=output_scales_device.linear_idx_type], input_scales_device: TileTensor[scales_dtype, Engine=input_scales_device.Engine, linear_idx_type=input_scales_device.linear_idx_type], ctx: DeviceContext)
Reinterleaves rank-2 scale factors into the 5D TCGEN layout on SM100 hardware.
Delegates to block_scales_interleave_fp4 after validating that the
output scales are rank-5 and the input scales are rank-2.
Parameters:
- scales_dtype (
DType): Element type of the block scale-factor tensors (inferred). - SF_VECTOR_SIZE (
Int): Number of elements covered by each block scale factor: 16 for NVFP4 or 32 for MXFP4.
Args:
- output_scales_device (
TileTensor[scales_dtype, Engine=output_scales_device.Engine, linear_idx_type=output_scales_device.linear_idx_type]): Output rank-5 scale-factor tensor in the 5D TCGEN interleaved layout. - input_scales_device (
TileTensor[scales_dtype, Engine=input_scales_device.Engine, linear_idx_type=input_scales_device.linear_idx_type]): Input rank-2 scale-factor tensor in the flat row-major layout. - ctx (
DeviceContext): Device context used to enqueue kernels.