Files
metal2vulkan/docs
Anees Iqbal efa911bc00 Arith: the Metal arithmetic deviations and the profile's float-function and NaN-encoding fields go
DriverDeviation::MetalFloatFunctions, MetalCanonicalNans, MetalFloatDenormals,
MetalUnaryDenormals, MetalMinMax, MetalHalfFma, MetalPackConversions, MetalHalfArithmetic,
MetalNanMoves and MetalHalfConversion, with their VkProperty values and codec tags, were never
taken: Device::from_queries enables no Metal* property, and no committed profile carries one.
Their forms go, and so do the two profile fields each left with one reachable value:
- ProfileFields::float_functions and FloatFunctions (only Native was reachable): the device's
  functions are never Metal's own. Gone with it: pipeline::EntryMath (public), the entry-math
  argument of PrecisionNote::of_float_operator and of_math_call, libm's Mode and its
  device_answers and device_near_equivalent, spirv's ProductForm (a product is an OpFMul, its
  negative-zero Fma form gone), and arith's OpNotes, MetalOwn and metal_functions_in (a call's
  notes are a BTreeSet<PrecisionNote>).
- ProfileFields::nan_encoding and NanEncoding (only Native was reachable): NanAnswer's
  device_answers and nan::encoding go; every NaN Metal answers is noted NativeNanEncoding.
- Denormals: denormal.rs keeps covered() alone (Covered, device_flushes, unary_kept and
  moves_sign go); every f32 denormal left to the device is noted DeviceDenormals.
- MinMax: Metal's minimum and maximum family is the device's NMin, NMax and NClamp, noted
  NativeMinMax (device_min_max goes).
- MetalHalfFma: its arm and test go.
- Pack conversions: every air.pack and air.unpack is noted DevicePackConversion
  (pack::measured and ArithPlan::metal_packs go).
- Half arithmetic: the device's 16-bit half + - * is taken only under the 16-bit float controls;
  F16Basis goes (f16_arithmetic answers a bool), and so do ArithPlan::f16_arith and the
  FastMathRewrites note of the measured form left to the device's compiler.
- NaN moves: a widening's, a negation's and a magnitude's NaN is the device's, noted (moved_nan,
  moves_nan, nan::moves_answered, FloatFacts::nan_moves and ArithPlan's nan_moves and
  held_nan_moves go). A half texel's write to a 32-bit float format notes DeviceNanEncoding on
  every device (texture::half_write_nans' Wide class goes; HeapNanFamilies' NAN_WIDE family
  now holds no deviation).
- Half conversion: every half the module rounds through the device's conversion is noted
  NativeHalfConversion; texture::half_texels (a sample of a 32-bit float texel) and
  half_texel_nans (a 32-bit float or packed small float class) lose their MetalHalfConversion
  exceptions, so both note those classes on every profile. Gone with it, the analyses only the
  measured facts read: narrow::round_measured (round serves) with the
  measured roundings the builder and the IR carried, narrow::rounds_unmeasured,
  narrow::moves_unfolded with the merges module, and the stored texels the texture writes
  recorded for it.
compile.rs's half-rounding block keeps converts, widens, the controlled and fused roundings and
their three notes; the MetalNanMoves, MetalHalfConversion, MetalPackConversions and
MetalHalfArithmetic requirements go.

Notes: the precision-note catalogue loses no entry. Every note the deleted forms withheld is
still raised, now on every device (NativeNanEncoding, DeviceDenormals, NativeMinMax,
DevicePackConversion, NativeHalfConversion, HalfTexelConversion, DeviceNanEncoding, NativeDot,
NativeMix); their docs and docs/HOWTO.md lose the measured exceptions, and the docs of a device
whose functions are Metal's own go from math.rs, arith and artifact.rs.

Validation: c3/bound.rs asks the product's notes of an operation (AirOp::product_notes), part of
how C3 decides a near-equivalent; it passed an EntryMath the product read only for the
unreachable form, so it drops the argument and its answers are unchanged.
fast_trig_within_apples_bound's doc loses the MoltenVK clause.

Tests: each deleted form's tests go with it (the_maths_functions_are_the_device_s, the member
format version 486 round trip, a_measured_half_sum_requires_the_arithmetic_fact_alone,
a_merge_of_a_select_is_followed_through_struct_members, the device_answers asserts), with the
hand-set profile fields only they used (FloatFacts' nans, device_denormals, unary_denormals,
native_min_max, nan_moves). The rest assert the note on every profile: engine_arith,
engine_float_call_notes (its note class is the fma route alone), engine_native_half,
engine_metal_denormals, engine_tiny_products, engine_rate_map, engine_opencl_mode,
engine_texture, engine_extended_range's heap test, from_queries, arith's and narrow's tests.

SEMANTICS_VERSION 2238, ARTIFACT_FORMAT_VERSION 576 (placeholders; main renumbers). SEMANTICS:
the notes and keys of the same input change form. ARTIFACT: the codec loses ten DriverDeviation
and eight VkProperty tags and EntryMath. RUNTIME_VERSION stays: the pinned sources' edits
(device/profile.rs, device/derive.rs, device/requirements.rs, lower/arith/pack.rs and a doc in
bind/heap.rs) remove forms no profile reached, so no run changes; runtime-sources.sha256 takes
the new hash. api_signatures is blessed; docs/REFUSALS.md and the coverage are unchanged.

Consumer check (consumer-uses.sh, consumer development c8407fb6fc, 58 refs): EntryMath,
of_float_operator, of_math_call, MetalCanonicalNans, MetalFloatDenormals, MetalFloatFunctions,
MetalHalfArithmetic, MetalHalfFma, MetalMinMax, MetalNanMoves, MetalPackConversions,
MetalUnaryDenormals, FloatFunctions and NanEncoding 0 hits (code). MetalHalfConversion: 0 on
development; used in crates/reims-vgpu-vulkan/src/gpu/rgbx.rs on three of the consumer's
steelbrain/* branches (gaugetick, recnil-r4, refdump), a crate its development no longer has.

Verified: m3-max-61298 at this tree (WIP arith 10, msi-laptop): fmt, clippy (all features,
--cfg m2v_gpu and --cfg m2v_cpu_icd) and Rustdoc rc 0 (61293, on the tree before, failed clippy
on three unused imports, which this tree removes); nextest over metal2vulkan,
metal2vulkan-conformance, metal2vulkan-validation and metal2vulkan-runtime, 5876 run, 5874
passed, 25 skipped, 2 failed: the render key test
(the_old_render_descriptor_key_keeps_its_value), left unpinned until the next named pin, and
golden_hashes_match_the_table, whose 29536 stale cells are all under a changed profile
fingerprint (0 new, 0 gone, 0 under a changed fixture source): the profile lost two fields, so
every key changed and the table is re-blessed on development.

Rebased onto development d10a14d5af: the SEMANTICS placeholder is one above its 2235 in stack order
(ARTIFACT_FORMAT_VERSION is already above its 574). The checks above ran at the old base acc706ca47;
the rebased stack's tip is checked by m3-max-61756 (msi-laptop), at the stack rebased on d6d56b8a7c
(tip 5c74fad38d, whose diff from its base is this stack's diff from d10a14d5af): fmt, clippy (all
features, --cfg m2v_gpu, --cfg m2v_cpu_icd) and Rustdoc green; nextest of metal2vulkan,
metal2vulkan-validation, metal2vulkan-conformance and metal2vulkan-runtime ran 5877 tests, 5870
passed. Of the 7 failures, the old render descriptor key's test is unpinned; golden_hashes and
engine inventory parts 4, 5, 7 and 8 are bless due (the profiles' fingerprints changed); and
metal::state's encoder_raster_state_needs_its_features fails the same way at development d10a14d5af
itself (m3-max-61802, where runtime-floor gained depthBiasClamp in a529fb658e), as inventory parts
3, 4, 5 and 8 do there. The stack as rebased on 72e1754218 (tip 090d544208: the same product
changes, without the test-only push sweep fix) played 36 distinct streams over 61 runs on five nodes
with 0 refused (player m3-max-61537; plays m3-max-61548, 61549, 61550, 61559 and 61569).
2026-11-20 22:07:19 -08:00
..