Observation: the RTX 3090 run of the authored case b315adcc
(float-operations-decided-by-a-bound-constant-fast, fixture sfold_fast.ll, job m3-max-66255)
differs from Metal at words 16-19 and 68-71. That is f[4] = fma(float4(k_snan), x, x) with
k_snan bound to the signalling NaN 0x7f800321: Metal stores 0x7f800321 and the 3090 stores
0x7fc00321. The module recorded no precision note, so validation counted it as a mismatch.
Cause: no fma reaches the module. canon::sccp's float_fold folds an fadd, fsub, fmul, fdiv or
air.fma with a NaN operand beside operands only the run knows to that operand, unquieted, as
Metal's compiler does once the constants are bound. So the module stores a float4 constant
0x7f800321, and the device's move of it as a float quiets it. No Vulkan rule forbids that, so
the stored NaN's bits are the device's. AGENTS rule 1 counts a NaN's bits among the device's own
answers and asks for a static note.
Fix: nan::holds_signalling_float, called from the arith family's finish(), records
PrecisionNote::NativeNanEncoding where the entry's module holds an f32 constant whose bits are a
signalling NaN: every exponent bit set, the quiet bit clear and a nonzero payload
(nan::signalling_f32).
- The rule is decided from the constant's bits alone, never from a name or a case.
- An entry's module holds exactly the constants its function reaches (canon::prune), so the note
follows the entry, not its library.
- It covers every operation of the fold family, because it keys on the stored constant, not on
the operation, and it covers a signalling NaN the program wrote itself.
- f32 only. A half constant moves as its bits (narrow::constant_bits): h[2] of the same case
matches Metal. double is not measured and not claimed.
- The scan ticks the meter once for the table's length.
Validation reads the note from the module: the candidate takes the pipeline state's precision
notes (candidate/platform/runtime.rs), and the comparison class is derived from them
(observation_contract::comparison: NativeNanEncoding is Allowance::Unbounded). b315adcc's
difference is therefore expected to count as a noted difference instead of a mismatch. That is
expected, not yet run.
Docs: docs/API.md's NativeNanEncoding entry and the note's doc comment gain the case. They claim
only what was seen: the 3090 quiets an f32 constant on the move, the other cards in the runs so
far kept its bits, half constants move as bits, and double is not measured.
Test: engine_float_call_notes::a_signalling_float_nan_constant_records_the_devices_nan_encoding.
A kernel storing the f32 constant 0x7f800321 records the note. One storing the quiet 0x7fc00321
does not, and neither does one storing the half 0x7c01. Without the finish() call the first
assert fails.
Bless class at the next pin, expected and not audited: authored compile-census rows of cases
whose module keeps a bound signalling f32 NaN beside a run value (the sfold cases binding k_snan,
b315adcc among them) gain NativeNanEncoding. The golden tables compile with function constants
unbound and hold no NaN literal (no public fixture spells one), so they are expected unchanged.
No SEMANTICS bump: the batch's last commit carries it.