0
Fork 0
mirror of https://github.com/zml/zml.git synced 2026-11-16 19:11:09 +00:00

zml/io: add Source.bitCast

bitCast reinterprets bits like Tensor.bitCast. To a narrower type, each
element becomes the elements of a new last axis .bitcast. To a wider
type, the last axis must hold one element of the new type, and its bits
must be one contiguous run in the checkpoint, which panics otherwise.
Sub-byte types that land inside a byte fail at lowering with
SubBytePosition. FP8 and NVFP4 block scales, including the 128x4
swizzle, are laid out as sources this way: the swizzle case pads, splits,
transposes and merges, checked against Tensor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Benjamin Rabier 2026-11-03 12:57:54 +01:00
commit dcafea2d06