Float6
For conceptual model usage and type mapping, see:
- class pyrogue.Float6(bitSize)[source]
Model class for 6-bit E3M2 floating point numbers (NVIDIA Blackwell FP6).
- Parameters:
bitSize (
int) – Number of bits being represented. Must be 8 (stored in 1-byte word).args (Any)
kwargs (Any)
- Return type:
Any
Notes
Format: 1 sign bit, 3 exponent bits, 2 mantissa bits (E3M2). Bias = 3. No infinity representation. No NaN representation. All 64 bit patterns are finite values or zero. Maximum representable value is 28.0. Stored in lower 6 bits of a uint8_t byte. Supported by NVIDIA Blackwell GPUs.
- toBytes(value)[source]
Convert float to 1-byte E3M2 encoding (6 active bits in uint8).
NaN and infinity inputs are clamped to max finite value (+/-28.0) since E3M2 has no NaN or infinity encodings.
- fromBytes(ba)[source]
Decode 1-byte E3M2 encoding to float.
All 64 bit patterns decode to finite values or zero (no NaN/Inf).