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:
parent
84365eb681
commit
dcafea2d06
1 changed files with 73 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue