SEMANTICS_VERSION 2082, ARTIFACT_FORMAT_VERSION 516, RUNTIME_VERSION 2210: 8-bit floats widen natively where the device has them

On a device with VK_EXT_shader_float8 (shaderFloat8), 8-bit floats now widen through the
device's own Float8E4M3EXT and Float8E5M2EXT types: air.convert's f8e4m3fn and f8e5m2 sources,
simdgroup-matrix fp8 cells and matmul2d's fp8 elements all go through one decode, which bitcasts
each lane to fp8 and converts it with OpFConvert. That's the device's native form (owner rule 1).
IEEE-like f8e4m3 has no device encoding and keeps the integer decode, as do devices without
shaderFloat8. A tensor format widened natively records PrecisionNote::NativeFloat8
(native-float8): the device's e4m3 reads 0x7F and 0xFF as NaN where Metal reads a number, and
its e5m2 NaNs carry other bits. The float8 products refusal is removed.

The translator's output changes (SEMANTICS), the precision-note codec gains NativeFloat8
(ARTIFACT_FORMAT), and the runtime enables shaderFloat8 (RUNTIME). The golden tables and the
compile census are re-blessed at the next pin.

Verified by the change's own runs: 993 of 994 touched tests (24812), the one failure fixed and
rerun 59/59 (24835); matmul2d fp8 on nvidia-rtx50-linux declares Float8EXT and records the note,
and on MoltenVK, RADV and lavapipe gives exact words with neither; lints green (24813, 24814).
RTX 5080 against the M3 Max rows (24815, 18 fp8 cases): 4 equal, 14 differ only in NaN words,
each row carrying NativeNanEncoding and NativeFloat8 and the runtime announcing
metal2vulkan-degrade-native-float8.
This commit is contained in:
Anees Iqbal committed 2026-11-13 01:11:58 -08:00
1 parent d50b8de95b
commit 1b6ee76aae
1 file changed
+3 -3
+3 -3
View File
@@ -60,7 +60,7 @@ mod tests;
/// unchanged version, and its bless records the version. Independent of the crate's version and of
/// [`ARTIFACT_FORMAT_VERSION`]. The commit that bumps it says what changed; this comment keeps no
/// history.
pub const SEMANTICS_VERSION: u32 = 2081;
pub const SEMANTICS_VERSION: u32 = 2082;
/// The byte-layout version of encoded artifacts (`CompiledFunction::to_bytes` and the
/// [`PipelineArtifact`] encodings). Every encoded artifact carries it, and a decode under another
@@ -70,7 +70,7 @@ pub const SEMANTICS_VERSION: u32 = 2081;
/// re-typed in an encoded type, its `codec` body or its `envelope`. A variant removed while its tag
/// stays unused needs no bump: an entry holding it fails to decode, which is a miss. The commit that
/// bumps it says what changed; this comment keeps no history.
pub const ARTIFACT_FORMAT_VERSION: u32 = 515;
pub const ARTIFACT_FORMAT_VERSION: u32 = 516;
/// The version of what this crate's runtime does with a compiled pipeline: instantiating a binding
/// plan (`BindingPlan::instantiate_*`: descriptor ranges, push bytes, root, argument, and handle
@@ -93,7 +93,7 @@ pub const ARTIFACT_FORMAT_VERSION: u32 = 515;
/// changes no behaviour, and then updates that hash alone with the commit saying why, or changes
/// behaviour and also bumps this version. The commit that bumps it says what changed; this comment
/// keeps no history.
pub const RUNTIME_VERSION: u32 = 2209;
pub const RUNTIME_VERSION: u32 = 2210;
/// The digest of the sources this build of the crate was compiled from: SHA-256, as lowercase hex,
/// of the manifest, the build script, and exactly the files the crate roots' module tree compiles