Skip to content

Refresh pinned Metal artifact contracts after helper linkage changes #1966

Open

Description

@NripeshN

Problem

The exact-output contracts for the pinned external Metal corpus predate private-helper linkage changes. A valid generated artifact now fails its recorded SHA-256 and byte-count assertions before native validation. This is a reference-data problem, not evidence that compilation or numerical parity passed.

Reproduced against MLX revision 846d176227a0ac13d2667e58d2bb68b322109ab0 using the existing project configurations from the complete Metal roundtrip tests. The current development baseline is 2dc24de3cde6957dac1dc174af8993565f2ecc89, with pending precise-arcsine and in-class helper-linkage changes.

Entry Recorded bytes Current bytes Native compilation
g1_copyfloat32float32 576 590 Metal, warnings fatal, passed
g1_Addbfloat16 1022 1105 Metal, warnings fatal, passed

For g1_copyfloat32float32, the recorded SHA-256 is e0cd1ae83ba52f665b21ba06bff02b29c65510b085b98104e33ae7911d96abe3; current output is 18bc382c086b1df0cbbfd288b37216cc6d77dc34a60dbf111ea9c71f48dda8f1. The output-size change comes from retained inline linkage for the instantiated copy function and its index helper. This entry does not use inverse trigonometry or class methods.

For g1_Addbfloat16, the recorded SHA-256 is fa6decc4fbfa51eb152f9faac39dad284e2ceb56f390f4244d9351332f3c46c2; current output is ab3ecd01c094893d623e85c230af23213bb31ff496bedcfea5f5f67040a466e6. This includes the pending private inline class-helper attributes.

Required Work

  • Audit the complete binary, copy, reduction and quantized Metal reference sets after the helper-linkage changes. The unary set is being refreshed separately with the precise-arcsine fix.
  • Regenerate through the public project translation API from the unchanged pinned source. Require successful native compilation before recording a new identity; retain structured failures instead of blessing uncompiled output.
  • Update contract-file hashes, artifact hashes, byte counts, aggregate ranges, dependent tests and documentation together.
  • Preserve all discovered-entry counts, native execution gates, numerical expectations, source hashes and upstream pins.
  • Provide a repeatable refresh/audit command usable across external corpora, rather than requiring manual edits to generated records.

Do not remove exact-output checks or treat a refreshed hash as proof of numerical correctness. Existing native parity and upstream-test gates remain required.

Activity

  1. NripeshN commented on Sep 30, 2026

    @NripeshN
    MemberAuthor

    The copy-family portion is implemented in #1972. All 2,496 entries were regenerated from unchanged MLX revision 846d176227a0ac13d2667e58d2bb68b322109ab0 through the public project API and compiled with xcrun -sdk macosx metal -Werror -c. Every compilation produced nonempty AIR with empty stdout and stderr.

    The audit preserves all 6,566 exact materializations, 8,684 reflected resources and 14 nested complex-to-Boolean specializations. A separate read-only comparison removes only the added helper linkage qualifiers in memory and recovers every previous artifact's exact hash and size. Generated sources were not rewritten for compilation.

    The refreshed contract is 3ec6b3b2e1999aa3534cc0312271fe49ab747eb44098f2bcb1bd67291f7eb316. Its artifactIdentityRefresh record identifies the exhaustive audit, compiler and preserved historical proof scope. The existing 24-shard native CI gate remains required, and dependent hashes and size summaries are updated together.

    This issue remains open for the complete binary, reduction and quantized reference sets: 8,570 entries in total. The 34 completed quantized probes compile, but partial evidence has not been installed as a complete baseline. This refresh does not establish new numerical execution, a newer MLX source pin, or upstream-suite parity.

  2. NripeshN commented on Sep 30, 2026

    @NripeshN
    MemberAuthor

    The binary-family audit has retained 309 of the 4,122 entries at legacy pin 846d176227a0ac13d2667e58d2bb68b322109ab0. Every retained artifact compiles with xcrun -sdk macosx metal -Werror -c, producing nonempty AIR and empty compiler output.

    The independent body/resource audit verifies all 618 exact template materializations and 1,545 reflected resources in this batch. Removing only unused attributes and added function-linkage qualifiers in memory recovers every previous artifact's exact SHA-256 and length. Generated artifacts were not rewritten for compilation.

    The audit also exposed a stale assertion in both binary proof modules: their operator patterns did not recognize the new static inline declarations. Commit bf0049af in #1974 corrects the shared matcher and adds 17 regression cases. It retains the single-selected-implementation requirement and detection of unrelated operator bodies, including temporary adapters. Focused proof/harness/workflow/refresh tests pass 350; all-files hooks pass.

    The full audit was checkpointed, not completed. No candidate or baseline was published, and no numerical execution is claimed for this compiler-only batch. The remaining binary entries, complete reduction family and complete quantized family still need verification before this issue can close.

  3. NripeshN commented on Sep 30, 2026

    @NripeshN
    MemberAuthor

    Completed the current-tree arg-reduce baseline audit in dd420a14, alongside the active MLX pin update to 9c3d35571ac450a8ecf5c17b4d0e3fac52c08bc8.

    All 24 Metal entries compile with warnings fatal. The emitted code is byte-identical between the previous and new MLX pins at the current translator revision. Removing only the introduced helper-linkage qualifiers and unused attributes in memory recovers all 24 previous artifact hashes and sizes exactly. The refreshed contract and its independent test constants preserve the existing entry set and numerical requirements.

    The required Metal gate passes all 30 selected tests, including original-versus-translated arg-reduce execution, complex power, Erf and Expm1. Linux/OpenGL also passes all 30, and DXC compiles all 24 arg-reduce entries. This does not replace Windows execution for the new pin.

    The legacy complete binary audit remains at 309/4,122 entries, with no new candidate installed. Its frozen-snapshot resume initially rejected mismatched installed package metadata (3.0.0 rather than 3.2.0). Including the matching distribution metadata makes the recomputed checkpoint identity match exactly; the checkpoint was not rewritten or bypassed. The full binary, reduction and quantized audits remain outstanding.

  4. NripeshN commented on Sep 30, 2026

    @NripeshN
    MemberAuthor

    The complete binary refresh on the frozen bf0049af translator snapshot has finished successfully for the legacy MLX pin 846d176227a0ac13d2667e58d2bb68b322109ab0.

    • All 4,122 entries translated and compiled with native Metal and warnings treated as errors; the refresh audit reports zero failures.
    • An independent pass checked all 6,026 materializations and 19,106 reflected resources, including selected and pruned operator bodies, source provenance and actual artifact hashes.
    • Removing only helper linkage qualifiers and unused attributes in memory recovers every previous artifact hash and byte length: zero mismatches. Generated artifacts were not modified for compilation.
    • Original contract SHA-256: 5540c68fde6b3b3b39f5bdb7100523a4d45896a78d0c746d5a71cc5754c451c5.
    • Candidate SHA-256: febe2073deebd0ffafe471d7147cbf0ceba4c67f29419cca39bb27dc86a8c22e.

    The candidate has not been installed. This is a full compiler/body/resource audit of that frozen implementation, not a full audit of newer translator commits, numerical execution, or the current MLX pin. The reduction and quantized refreshes remain outstanding. The issue and prerequisite integration stack remain open.

  5. NripeshN commented on Oct 2, 2026

    @NripeshN
    MemberAuthor

    Rechecked 16 selected entries from the legacy binary contract against the current translator implementation, including Boolean, half, bfloat16, float32 and complex arithmetic.

    All 16 translate through the public project API and compile with native Metal and -Werror, producing nonempty compiled artifacts and empty compiler output. The refresh checks preserve the recorded materialization and resource contracts.

    An independent comparison with the completed frozen baseline found 15 byte-identical generated artifacts. g1_Addbool_ differs only in the operator return expression: x + y is now int(x) + int(y), from the explicit Boolean-promotion fix. The current generated SHA-256 is 969078247ec28495ce0889e24d4b7d3ee75af7e868fd710e9c439e159809e021 (1,054 bytes).

    This confirms that the frozen 4,122-entry candidate cannot be treated as a current-implementation baseline without reconciliation. No contract was installed. The refresh tool correctly refuses to publish a candidate for this incomplete selection; the retained 16 compilation records pass. This check is neither exhaustive binary coverage nor numerical execution. The complete current binary, reduction and quantized audits remain outstanding.

  6. NripeshN commented on Oct 2, 2026

    @NripeshN
    MemberAuthor

    Completed the current-implementation audit of all 238 one-dimensional generalized (g1_) entries in the legacy binary contract.

    • Every selected entry translated through the public project API and compiled with native Metal and -Werror, producing nonempty AIR with no compiler diagnostics.
    • An independent pass verified all 476 materializations, 1,190 reflected resources, selected/pruned operator bodies, source provenance and generated/compiled artifact hashes.
    • Compared with the preserved complete frozen baseline, 229 artifacts are byte-identical. Nine Boolean artifacts differ only by explicit integral promotion: Add, Subtract, Multiply, Divide, Remainder, BitwiseAnd, BitwiseOr, BitwiseXor and Power. For Power, the only change is exp & 1 becoming int(exp) & 1 inside the Boolean operator. Exact body comparisons account for each difference; generated files were not rewritten.
    • Translation implementation fingerprint: 269536679f259aa87ea8ab0206fced117164cc61f464c5b9d1c5660a639dff67.
    • Contract SHA-256: 5540c68fde6b3b3b39f5bdb7100523a4d45896a78d0c746d5a71cc5754c451c5.

    This covers 238 of 4,122 entries, not the complete binary contract. The refresh correctly refused to publish an incomplete candidate. No baseline was installed, and this audit does not claim numerical execution. The remaining current binary, reduction and quantized audits are still required.

  7. NripeshN commented on Oct 4, 2026

    @NripeshN
    MemberAuthor

    Binary Metal contract reconciliation

    Commit eb484e2 refreshes the complete binary reference and its exact 238-entry scalar subset without changing the source pin, discovered entries, template materializations or buffer interfaces.

    • All 4,122 entries compiled with xcrun -sdk macosx metal -Werror -c; all AIR outputs are nonempty.
    • The independent audit retained 6,026 exact materializations and 19,106 resources. Compared with the retained prior generation, 2,894 bodies are unchanged and 1,228 differ only in reviewed byte conversions, Boolean integral promotions and typed vector initializers.
    • The current-branch replay passes 112 entries spanning all 18 shapes, 11 templates, 24 operators, 25 semantic families and 25 input/output type pairs. This supplements the complete audit from the frozen checkpoint; it is not a numerical execution claim for all 4,122 kernels.
    • Focused conversion, initialization and Boolean-buffer tests: 760 passed with required native Metal execution. Demo contracts, report records and workflow tests: 328 passed. All-file pre-commit, workflow syntax, support matrix and support-issue dry-run checks passed.

    Compiler-only DirectX report records and documentation now identify their Ubuntu runners. Windows execution requirements are unchanged. Two superseded queued runs containing 168 jobs were cancelled after confirming they had no running jobs; their newer replacements and all active work were preserved.

    The reduction audit also compiled all 2,396 entries and verified their resource/materialization contracts. Ten historical reduction samples reproduce the committed reference hashes and provide body comparisons, but the complete reduction review is not finished. No reduction or quantized hashes are accepted in this commit. Issues #1966, #2071, #2063 and #2066 remain open; this checkpoint does not yet establish full MLX runtime parity.

  8. NripeshN commented on Oct 4, 2026

    @NripeshN
    MemberAuthor

    The reduction Metal contract is refreshed in c2614da after complete body review and strict native compilation.

    • All 2,396 entries compile with warnings fatal. All 9,216 materializations and 25,088 resource records are retained.
    • Reversing only the identified helper-linkage, byte-conversion and shuffle-offset-width changes recovers every previous generated-source hash: 2,396 matches, zero unmatched bodies. Ten historical source replays independently match the old reference. Four mutation controls reject changed arithmetic, loop bounds, bindings and shuffle masks.
    • The current branch passes 82 translate-and-compile cases covering every shape, typed operator, input/output type, template and type pair. Another 367 required native conversion and subgroup controls pass.

    The contract changes only artifact identities, byte sizes and their derived aggregates. This establishes reviewed generated sources and compilation, not numerical parity for the complete reduction family. The separate quantized-family audit remains in progress and its hashes are unchanged.

  9. NripeshN commented on Oct 4, 2026

    @NripeshN
    MemberAuthor

    The copy reference still needs review after the byte-width and typed-vector lowering changes included in #1974. No copy hashes have been updated in this checkpoint.

    At translator baseline ffdd8ba0435741d2bc44db9cbe7c405dbd01d59d, a fresh Linux source-export trial covers 30 shapes, 16 templates and all 13 input/output types: 37 passed and 6 failed. All six failures are the existing exact generated-hash assertion, before export or native compilation:

    • g1_copyint8int8
    • g1_copyuint8uint8
    • ggn2_copycomplex64complex64
    • ggn4large_copycomplex64complex64
    • ggn2_dynamic_copycomplex64complex64
    • ggn4large_dynamic_copycomplex64complex64

    For g1_copyuint8uint8, the expected hash is 46056dc5b0133f5e26dc18d0c85619e7ce456f4b8c6e0b7764991ab6dd4b1d4f; current output is 9b066632ec79366a9442a03b2c47962dfc9e3e2561c2a3e27cb6710e10fd187a. The observed changes retain explicit byte narrowing on reads and conversion results. The complex samples use typed vector list initialization for index helpers. The same byte mismatch reproduces through the default local native-roundtrip path, so this is not an Ubuntu export regression.

    The new macOS bundle consumer separately compiles all 2,496 retained reference shaders with -Werror and non-empty outputs. That proves the consumer, not fresh generation under current lowering. A complete current-output audit is running; accepting a candidate still requires native compilation and source/body review with unchanged materialization and resource contracts. Compiler success alone will not establish numerical parity.

  10. NripeshN commented on Oct 4, 2026

    @NripeshN
    MemberAuthor

    The ongoing copy audit now has an independently reviewed subset of 2,100 of 2,496 generated artifacts. No reference identity has been accepted yet.

    • Every completed artifact's bytes match its checkpoint hash.
    • Exact inverse comparison to the retained previous bodies accounts for all 2,100: 1,492 are unchanged; the others contain 1,096 byte-conversion wrappers and 52 typed vector initializer changes (int2 and long2).
    • The review rejects four altered-body controls covering output indexing, byte width, address arithmetic and loop bounds.
    • This is source-body review, not complete compiler or numerical proof. The current full generation/native compiler audit is still running, and the separate quantized audit remains in progress.

    The source/consumer CI split remains unchanged: all 2,496 source identities and all 2,496 strict native compiles are required before the copy family can pass. No assertion, compiler flag or source pin has been relaxed.

  11. NripeshN commented on Oct 5, 2026

    @NripeshN
    MemberAuthor

    The complete copy Metal reference review is published in 1a724ff, following the demo reference and update-runner repair in 3ca319b.

    For MLX 846d176227a0ac13d2667e58d2bb68b322109ab0, all 2,496 copy entries were freshly translated and compiled with xcrun -sdk macosx metal -Werror -c. The independent audit verifies every generated source and nonempty compiled output by hash, all 6,566 exact materializations, source/default parameter provenance, and 8,684 reflected resources.

    The body review accounts for all entries: 1,760 unchanged and 736 changed. Reversing only the reviewed byte conversions and typed int2/long2 initializer syntax recovers every prior body. Four negative controls reject altered output indexing, byte width, address arithmetic and loop bounds. The new contract hash is 8866a5995152113a283952c5bfb0ad0a0f54c1d1cbe161a194a459eb3e8926a2; source pins, selection, ABI, historical proof metadata and numerical scope are unchanged.

    The current CI bundle consumer independently compiles all 2,496 accepted sources. Focused contract, harness, workflow and compiler-helper checks pass 335 tests, with 4,992 opt-in corpus cases skipped in that invocation; those skips are not native passes. Two fresh public-path replays, unsigned-byte and generalized complex copy, pass strict native compilation separately. All-file hooks, strict documentation and support checks pass.

    The fresh Linux producer replay passes all 43 cases, covering all 30 shapes, 16 templates and 13 input/output types. These include the six byte/generalized-complex cases that failed the previous reference check. No skips or accepted warning other than the explicit unavailable-Metal-compiler diagnostic are introduced.

    This is translation, identity, reflection and compiler evidence, not numerical execution or full MLX host-suite parity. The quantized audit is still running; this does not close the broader issue.

  12. NripeshN commented on Oct 5, 2026

    @NripeshN
    MemberAuthor

    The full generated-body review is complete for the 2,052-entry quantized audit produced at 0f2afaff439401881883a233b57850ed42229738 from the unchanged 846d1762 corpus.

    Every original body was recovered and matched against the checked-in contract's SHA-256 and byte count before comparison. All differences are accounted for by explicit transformations:

    • Private/inline helper linkage and unused annotations.
    • Restoration of upstream short fields and uint8_t value conversions.
    • Typed vector initialization and identity conversions at existing helper calls.
    • Removal of redundant nested bfloat conversions.
    • Folding constant subgroup conditions while retaining every live shuffle and sum.

    The review rejects deliberate changes to stores, quantization arithmetic, subgroup sums, barriers, field widths and lane ordering. The independent contract audit retains all 14,904 specializations, 31,374 resources and 2,052 successful strict Metal compiles.

    A fresh current-head probe at 077f54f1 covers four families across float, half and bfloat, including five-bit matrix and vector paths. All 12 bodies match the reviewed frozen outputs byte-for-byte and compile with Metal 3.1 and warnings fatal. This is representative compatibility evidence, not a complete current-head rerun or numerical execution.

    No quantized reference identity is updated by this review. Complete current-head compatibility and the applicable native execution checks remain necessary before accepting the refresh and merging the checkpoint.

  13. NripeshN commented on Oct 5, 2026

    @NripeshN
    MemberAuthor

    The current checkpoint also has stale historical unary Metal references after the later semantic lowering changes. This needs to remain in the Metal reconciliation scope; the earlier unary refresh is not sufficient for the current output.

    Required shard 3 at 63b81ced completed with 51 failures and 124 passes. The failures are generated-identity assertions before native compilation, not accepted compiler or numerical results.

    For gn1_Signuint16uint16, the recorded identity is 29cff14a74264a0a1a568f7cbb5a49282a177f70320b18ed1ad937ccc37497dc; current generation produces 177af3771ccc4e810dbaed150aa952f68a5534cdb24f1c58eaa4cbb19bd03bd0. Other affected cases include byte conversions, sign operations, trigonometric helpers and FP8 conversions. The source revision remains 846d176227a0ac13d2667e58d2bb68b322109ab0.

    The complete 877-entry Metal family needs the same exact original-body comparison, materialization/resource checks and warning-fatal native compilation used for the other corpus contracts. Required numerical workload identities and execution gates must be preserved. No unary Metal hashes or tolerances were changed in response to this CI result, and the job was not retried as a transient failure.

  14. NripeshN commented on Oct 5, 2026

    @NripeshN
    MemberAuthor

    A fresh complete unary Metal audit is now retained for translator tree 7eb92a100596c8c78637c3d22e62caa5e79cfdb9 (4be0aa85; unchanged by the CI-only commit 3864bc5f). It uses the historical MLX pin 846d176227a0ac13d2667e58d2bb68b322109ab0 and source SHA-256 51af04126d68e1f5baee5f467268408650d24a68db66e8c044f7f0be3f15368b.

    • All 877 selected entries translated and compiled with xcrun -sdk macosx metal -Werror -c; every compiler stream is empty and every AIR output is nonempty.
    • An independent integrity check verifies all 877 source hashes and 877 compiled-module hashes. The candidate preserves every contract field except generated identities and byte-size aggregates.
    • All 877 exact original artifacts were recovered using their checked-in hashes and sizes. Comparison finds 538 byte-identical bodies and 339 changed bodies, grouped into 215 exact function/declaration differences.
    • The complete reflected interfaces match: 3,363 resources across all 877 artifacts. All 1,243 expected materializations match the maintained source-derived assertions.
    • Separate native execution covers 69 changed operator/type selections and 1,863,009 values per original/generated path. Fifty-three selections match exactly; sixteen have bit differences requiring assessment under the existing operation-specific accuracy contracts. The narrowed precise-math findings are recorded in #2068. Readonly buffers and guards remain intact.

    No checked-in unary identity was changed. Compilation and interface equivalence do not complete semantic approval of the 339 changed bodies. The generated candidate is retained separately and is not accepted reference data. This audit does not refresh quantized, HLSL or OpenGL contracts.

    The CI-only increment moves unary source verification to five Ubuntu shards and compiles the complete verified bundle in one macOS job, retaining every source gate and strict compiler check. All 877 previously recorded sources also passed that consumer locally. The revised pipeline does not bypass stale references; its source shards retain reports and JUnit evidence when those assertions fail.

  15. 41 remaining items

  16. NripeshN commented on Oct 11, 2026

    @NripeshN
    MemberAuthor

    Reviewed ArcCosh References

    Commit c25d44f2bd3c2e77f794261e273226cb4f2de1de updates fifteen Metal artifact identities and their three scalar counterparts after the following review:

    • Reconstructed every accepted source byte-for-byte against its recorded SHA-256 and size. The complete delta is function-scoped precision directives and the unused-parameter annotation. Accepted/current sources produce identical compiled Metal libraries under warnings-fatal compilation with fast math disabled.
    • Fresh public project translations at historical pin 846d176227a0ac13d2667e58d2bb68b322109ab0 and current pin 9c3d35571ac450a8ecf5c17b4d0e3fac52c08bc8 preserve interfaces, selected parameters and materializations. The current tree has 878 additional pruned candidates. Two retained vn records used a wildcard workgroup rule; fresh records use an exact entry rule, with the same [1, 1, 1] geometry and independently verified execution identities.
    • Native original/accepted/current historical execution and original/current execution cover all five layouts and three storage types. Each pin verifies 617,565 output values per implementation and initialization, two initializations, unchanged read-only inputs/constants and 64 guard words per entry. Six contiguous half/bfloat16 cases exhaust all 65,536 storage patterns.
    • Independently reopened every readback and source/module identity. Accepted/current output agrees exactly for finite values, infinities and signed zeros; NaNs compare by classification. Narrow output also agrees with original Metal under that comparison.
    • Float32 is not bit-identical to original Metal: there are 11,855 differing output words across the selected layouts at each pin. The accepted and current implementations have the same differences, and original/accepted/current results all remain within two ULP of the 90-digit decimal reference on these inputs. The existing four-ULP accuracy bound is unchanged.

    Validation: all fifteen fresh contract-consumer/strict-Metal cases pass; the complete demo regression passes 11,160 tests with 44,410 explicit platform/opt-in skips. All-file pre-commit, strict documentation, support freshness and issue-plan checks pass. No source pin, entry count, specialization count, native execution gate or numerical policy was changed.

    The remaining unary review count is 152: ArcCos 18, ArcSin 19, ArcTan 19, Cos 19, Cosh 4, Exp 19, Log 19, Log10 4, Log1p 4, Log2 4, Sin 19 and Sinh 4. Other corpus families remain open under this issue. This review does not establish exhaustive float32 accuracy, DirectX/OpenGL qualification of these entries, full host routing or a complete unchanged upstream-suite pass.

  17. NripeshN commented on Oct 11, 2026

    @NripeshN
    MemberAuthor

    Commit 9b2d0d81d5f4ab5bbe406fc551cfe62384a33407 reviews eight complex Cosh/Sinh references across v, v2, gn1 and gn4large, including two scalar counterparts. It leaves 144 unary references outstanding.

    Every accepted source is reproduced exactly by reversing only precision-directive scope and unused-parameter annotations. All sixteen accepted/current sources compile with warnings fatal and fast math disabled. The compiled libraries differ. Fresh public translations at historical 846d176227a0ac13d2667e58d2bb68b322109ab0 and current 9c3d35571ac450a8ecf5c17b4d0e3fac52c08bc8 preserve reflected interfaces and selected materializations.

    Independent retained-readback audits at each pin cover 95,460 complex values per implementation and initialization, four access layouts, two initializations, 512 guard words per path and unchanged read-only inputs/constants. Samples include signed zeros, subnormals, infinities, NaNs, overflow neighbors, random raw pairs and finite-range real components. Accepted and current output agree apart from NaN payloads. Both differ from original Metal in 23,258 finite component words per initialization, by at most four ULP on these samples; zero signs and non-finite classifications agree. This is a measured difference, not a new tolerance or a claim of exhaustive accuracy.

    The first scratch probe used a rounded-up two-dimensional launch for an upstream N=1 entry without a tail guard. Original Metal correctly exposed that invalid launch through the output-guard assertion. The corrected proof uses exactly 23,760 invocations, retains the same logical buffers and checks, and preserves the initial failed evidence separately. No translator issue is inferred from the harness error.

    The prior scalar Sinh artifact used a wildcard workgroup rule; fresh translations use the exact entry. Both select [1, 1, 1] with equal parameters. Their distinct execution identities are recomputed and verified, rather than ignored.

    Validation: eight fresh translation/compiler regressions pass; the demo suite passes 11,160 tests with 44,410 explicit platform/opt-in skips and two existing warnings. All-file pre-commit, warning-fatal documentation and support checks pass. Source pins, entry selection, numerical gates and whole-family parity status are unchanged.

    Full contract SHA-256: e3ea23f8d39b25d3e0553a28d46aef8705a32c8f09bb47f9e2a240ab222e1bf1 (877 entries, 1,952,475 generated bytes). Scalar contract: 26c1ff3a9d3396e38623d83043921dc41c9ccced7f4522b4e2813d3c40b15ac3 (183 entries). This review does not establish DirectX/OpenGL parity or a complete generated MLX backend.

  18. NripeshN commented on Oct 11, 2026

    @NripeshN
    MemberAuthor

    Four complex Log1p Metal artifact references are reviewed in d215ab9e on #1974, including the matching scalar record. The remaining unary reference count is 140.

    The review reconstructs all four previously accepted sources exactly by their recorded SHA-256 and size. Old and current sources pass strict Metal 3.1 compilation with warnings fatal and fast math disabled. Their compiled libraries differ, so compilation is not used as an equivalence claim.

    At both the historical corpus revision 846d176227a0ac13d2667e58d2bb68b322109ab0 and current integration revision 9c3d35571ac450a8ecf5c17b4d0e3fac52c08bc8, native audits cover:

    • v, v2, gn1 and gn4large layouts, with exact rectangular dispatches for v2.
    • 50,610 complex outputs per implementation and initialization, two output initializations, 256 output guard words per implementation, and full read-only input/constant comparisons.
    • Signed zeros, subnormals, infinities, NaNs, boundary neighbors, 16,384 seeded raw pairs and 4,096 finite-range pairs in each contiguous input set.
    • Original/accepted/current equality apart from NaN payloads; current-pin original/current equality under the same checks.
    • Independently verified source identities, compiler receipts, resource reflection, selected template materializations and dispatch identities.

    The patch changes only the four complete-family artifact hashes/sizes, their scalar counterpart, dependent checksums, the aggregate byte count and documentation. All 877 complete-family entries, 183 scalar entries, 1,243 materializations, source pins and numerical policies remain unchanged. The artifact byte total is 1,959,059. No whole-family numerical-parity status is upgraded.

    Validation: four fresh project-translation/strict-Metal contract tests pass; 11,160 demo tests pass with 44,410 explicit platform/opt-in skips. Both selections use -n auto with two workers. All-file pre-commit, warning-fatal documentation, support freshness and the issue-plan dry run pass. These totals do not represent the full upstream MLX suite.

    Separate Log2/Log10 Investigation

    Their eight references remain unchanged. Native controls at both pins show that the default subnormal-preserving atan2 policy differs from the observed source-device policy near zero. Fresh public translations with the existing explicit binary32_atan2_profile = "flush-subnormals" option remove every observed result-sign and classification mismatch. Remaining sampled finite component differences are at most two float32 ULPs at the current pin and three at the historical pin. The current pin uses upstream's scaled complex hypot; the historical pin uses sum-of-squares.

    Each profile comparison covers 101,220 complex outputs per implementation and initialization across the eight entries, two initializations, 512 guard words per implementation and unchanged input/constants. Source/module identities, profile provenance, dispatch metadata and actual raw readbacks are checked independently. These measurements are not a new tolerance, a default-policy change, exhaustive accuracy proof or reference acceptance. The next step is an explicit corpus profile contract and numerical qualification, not unconditional hash replacement.

  19. NripeshN commented on Oct 11, 2026

    @NripeshN
    MemberAuthor

    Eight complex Log2/Log10 Metal corpus references are now qualified with an explicit atan2 underflow policy in ba644b16 on #1974. The remaining unary reference count is 132.

    Scope

    The complete-family and scalar contracts record binary32_atan2_profile = "flush-subnormals" under sourceOptionsByEntryPoint. Only the eight affected Metal entries select this option. Translator defaults, real-valued entries, other target contracts, source pins, entry counts and existing numerical expectations are unchanged.

    Previously accepted sources were reconstructed by exact SHA-256 and size. Strict Metal compilation, source/module identities, reflected resources, selected materializations and dispatch identities are checked separately. The new complete-family byte total is 2,031,779; the largest artifact is gn4large_Log10complex64complex64 at 12,076 bytes. The complete-family/scalar counts remain 877/183 and the materialization total remains 1,243.

    Numerical Evidence

    Retained native comparisons at historical 846d176227a0ac13d2667e58d2bb68b322109ab0 and current 9c3d35571ac450a8ecf5c17b4d0e3fac52c08bc8 cover 101,220 complex outputs per path and initialization across four layouts, two initializations, 512 output guards per path and unchanged inputs/constants. The explicit profile removes all sampled sign/classification mismatches. Finite component differences from original Metal reach two float32 ULPs at the current pin and three at the historical pin. These observations do not establish bit identity or a new ULP tolerance.

    The new permanent regression translates and executes all eight current-pin entries against original Metal. It verifies that the pinned upstream test_log2/test_log10 retain their numpy.allclose defaults (rtol=1e-5, atol=1e-8), then uses that contract componentwise with additional exact sign, zero and non-finite classification checks. It also requires complete read-only buffer equality, intact guards, and original/translated output independence from two initial fills. Independent reopening of its raw readbacks verifies all 101,220 complex outputs per path and initialization and 256 guards per path.

    The existing precise-log and atan2 native controls pass their independent 120-/180-digit Decimal oracles with unchanged four-/six-ULP bounds, including unchanged original-source controls. This does not replace the original-source entry comparison.

    CI

    The new module runs inside the existing unary step. The entire expanded step passes locally: 156 tests in 163.6 seconds under the unchanged 300-second deadline, with all original cases retained. The current-tree checkout also includes python/tests so the tolerance declarations are verified against the pin. No jobs or deadlines were added. The new source comparison is Metal-only; it does not claim DirectX/OpenGL execution or complete MLX host-runtime integration.

    Eight fresh legacy-corpus translation/strict-Metal contract tests pass, and the separate five native helper-oracle checks pass. The full demo regression reports 11,236 passed and 44,412 explicit platform/opt-in skips. All pytest runs use -n auto with two workers. All-file pre-commit, warning-fatal documentation, support freshness and issue-plan dry run pass. Whole-family parity remains false. The checkpoint remains draft pending its other corpus and native conformance blockers.

    Additional current-pin contiguous Log2/Log10 translations with this explicit profile compile and package for both HLSL and GLSL: DXC cs_6_6 -WX, and glslangValidator -G with spirv-val --target-env opengl4.5. The four runs retain reports, compiler receipts, source/module identities and runtime packages. These are local compiler/package checks, not native Windows or OpenGL execution, and the existing target contracts remain unchanged.

  20. NripeshN commented on Oct 11, 2026

    @NripeshN
    MemberAuthor

    Qualified 19 natural-log Metal references and four scalar counterparts in 7bc624d on #1974. There are now 113 unary references still under review; this issue remains open.

    The demo contracts explicitly select binary32_log_profile = "flush-subnormals" for Log and the corresponding atan2 policy for its four complex layouts. Generic translator defaults, other target contracts, pins, existing numerical expectations and whole-family parity claims are unchanged.

    Verification:

    • All 19 accepted sources reconstruct to their recorded SHA-256 identities and compile with warnings fatal. Fresh default/profiled translations at historical 846d1762 and current 9c3d3557 preserve interfaces, materializations and checked dispatch contracts.
    • An independent audit reopens 266 native dispatches. Each pin covers 694,296 output words per implementation and initialization, two initializations, 1,216 guards per implementation and unchanged inputs/constants across five layouts.
    • All contiguous half/bfloat storage patterns are exercised. Profiled results match original Metal apart from NaN payloads. Three half inputs that differed in the accepted artifacts now match the original.
    • Float32 and complex results preserve special-value classifications and satisfy the existing upstream tolerance. Sampled differences reach one and two float32 ULPs respectively; no tolerance was increased.
    • The required regression now covers 15 current-pin logarithm entries. Its independent raw-buffer audit verifies 501,208 output words per path and initialization and 480 guards per path over two initializations. The full unary step passes 163 tests in 188.0 seconds under its unchanged 300-second deadline.
    • All 19 reference-consumer tests, four native helper/oracle controls and 11,239 demo tests pass. All-file pre-commit, warning-fatal documentation and support checks pass.

    The four contiguous Log types also compile and package as HLSL and GLSL. A separate Linux OpenGL package probe executes float32 Log over 28,024 values against the existing Decimal oracle, with at most two ULPs under the established four-ULP bound. Its shader identity matches the independently compiled GLSL, and upload hashes/readback values are audited. This package probe does not retain guards or input-device readbacks; it complements rather than replaces the guarded Metal comparisons. No Windows execution, full-family parity or complete upstream-suite result is claimed.

  21. NripeshN commented on Oct 11, 2026

    @NripeshN
    MemberAuthor

    Completed the review of all 19 ArcTan Metal entries in 92c57728 on #1974. The remaining unary reference backlog is 94 entries: ArcCos (18), and ArcSin, Cos, Exp and Sin (19 each).

    • All accepted sources reproduce exactly from the historical translator. Accepted and current sources compile with warnings fatal and fast math disabled; reflected interfaces remain unchanged.
    • The 15 real-valued entries change only precision-pragma scope and unused-parameter annotations. Their libraries are byte-identical across accepted/current implementations and both source pins, and their non-NaN readbacks agree.
    • The four complex entries have changed square-root, logarithm and atan2 computations. Native comparisons at both pins preserve zero signs and non-finite classifications and satisfy the existing upstream numpy.allclose tolerance. Sampled finite differences reach two float32 ULPs; this does not establish bit identity or exhaustive accuracy.
    • An independent audit reopens all 190 dispatches: 694,296 output words per implementation and initialization at each pin, two initializations, 1,216 guards per implementation, and complete unchanged read-only buffers. Contiguous half/bfloat tests cover all 65,536 storage patterns; float32 samples include all exponent classes. Compiler and execution receipts, source/module identities, materializations and checked execution identities are verified.
    • Original Metal's real-valued zero/underflow differences are unchanged from the accepted artifacts. Its atan can return positive zero for negative zero or flush binary32 subnormals; generated precise results preserve those bits. Normal finite float32 differences reach one ULP. The existing independent precise-atan contract and oracle are unchanged.

    Only the 19 full-family identities, four scalar identities and dependent sizes/checksums are updated. Source pins, options, numerical expectations and whole-family parity status are unchanged. The historical contract is not replaced with current-pin artifacts.

    All 19 fresh corpus-consumer tests and 23 existing precise-atan/original-source/pinned-package tests pass locally. The complete demo suite passes 11,242 tests with 44,417 explicit platform/opt-in skips and two existing warnings. All-file pre-commit, warning-fatal documentation, support freshness and the issue-plan dry run pass. Windows and OpenGL qualification are not inferred from this Metal corpus review; final-head hosted checks remain necessary.

    The preceding 24f3e102 increment separately makes the current-pin float32 Log package/oracle test required on all three native platforms. Local Metal and software-OpenGL execution pass on 28,024 inputs with a maximum observed two-ULP difference inside the existing four-ULP bound. The complete Metal unary step passes 167 tests in 200.8 seconds under the unchanged 300-second limit. This does not replace its stronger guarded original-Metal comparisons or prove full upstream-suite parity.

  22. NripeshN commented on Oct 11, 2026

    @NripeshN
    MemberAuthor

    Inverse-trigonometric reference review

    PR #1974 reconciles 29 real ArcSin/ArcCos references and five scalar counterparts. The remaining unary backlog is 65: four complex ArcSin, four complex ArcCos, and 19 each for Cos, Exp and Sin.

    Every accepted predecessor reproduces to its recorded hash. The 29 real source changes are exactly precision-pragma scope and unused-parameter annotations; accepted and updated Metal libraries are byte-identical. An independent audit reopens 290 dispatches at the historical and current pins: 1,119,742 output words per implementation and initialization at each pin, two initializations, 1,856 guard words per path and unchanged read-only buffers. Contiguous half/bfloat cases cover every storage pattern.

    Accepted and updated non-NaN words match. Original-Metal differences are pre-existing: three half ArcCos inputs differ by one half ULP, and sampled float32 ArcCos/ArcSin results differ by at most two/three ULPs. The pinned upstream inverse-trigonometry dtype tolerances are retained; no new tolerance or whole-family parity claim is introduced. All 29 fresh corpus-consumer translations and warnings-fatal Metal compiles pass.

    The eight complex references were also compiled and executed at both pins but are not updated. Default output preserves some tiny results that original Metal flushes. A separate experiment with the existing explicit binary32_atan2_profile = "flush-subnormals" removes the sign/classification discrepancies on these samples. Independent reopening verifies 64 profiled dispatches, 202,440 component words per path and initialization at each pin, two fills, 512 guard words per path, source/module identities and unchanged input/constants. Sampled finite differences are at most two ULPs, within the existing upstream tolerance. Integrating that policy into the demo configuration, contracts and required regression remains follow-up work; translator defaults are unchanged.

    New required current-pin float32 ArcSin/ArcCos package tests pass locally on Metal and Linux software OpenGL over 4,394 inputs each. Source identities are checked across translation, packaging and execution. The observed errors are two ULPs for ArcSin and one for ArcCos, within the four-ULP gate. The full existing Metal unary step passes 177 tests in 243.9 seconds under its unchanged 300-second limit. Windows execution remains required in CI. These results do not establish full host routing or unchanged upstream-suite parity.

  23. NripeshN commented on Oct 11, 2026

    @NripeshN
    MemberAuthor

    Commit 373e7c2 in #1974 completes the pending source/compiler review across binary, reduction and unary DirectX/OpenGL contracts and the remaining unary and quantized Metal contracts. Nine contracts containing 17,902 entry records were audited against their accepted source identities, with reflection and non-identity contract fields preserved. This also covers the pending contract reviews tracked in #2071 and #2073.

    Fresh public-consumer translations and strict compiles pass for 89 binary, 212 reduction and 133 unary cases. The quantized Metal controls additionally pass 132 bounded cases through 264 original/generated dispatches, with guards, read-only buffers, broadcast layouts and matrix tails. Whole-family numerical parity remains explicitly false.

    The GLSL narrowing-literal defect is fixed separately under #2204. Required hosted corpus and native checks still need to confirm the consolidated revision; the broader tracking issues should remain open until that evidence is reviewed.

  24. NripeshN commented on Oct 13, 2026

    @NripeshN
    MemberAuthor

    The current copy failures include changes from the newer 16-bit conversion handling, not only helper linkage. I reviewed four Metal artifacts against this contract's actual source pin, 846d176227a0ac13d2667e58d2bb68b322109ab0:

    Entry Previous bytes Current bytes Identity
    s_copyfloat32float32 665 665 Unchanged
    s_copyint16int64 677 701 Changed
    s_copyint64int16 673 697 Changed
    v2_copyfloat32uint16 788 816 Changed

    All four pass the existing source, materialization, launch and reflected-resource checks, followed by strict Metal compilation. The three changed bodies retain explicit short/ushort conversions at argument or return boundaries; physical resource types and bindings are unchanged.

    The exact audited artifacts also pass ten native cases against unchanged upstream copy_s/copy_v2 registrations and independent expected results: signed 16-bit endpoints, signed 64-bit values outside the 16-bit range, float controls and a 23-element float-to-ushort tiled tail. Each case checks 32 output guards and two unchanged inputs. Only the unchanged upstream headers require their C++17 compatibility flag; generated compilation remains warning-fatal.

    No contract was updated. The refresh tool correctly refused to produce a full candidate from four selected entries out of 2,496. This is bounded evidence for the next exhaustive refresh, not whole-family numerical qualification, validation of another source pin, or evidence for the other target backends. Current copy/reduction CI fingerprint failures remain outstanding.

  25. NripeshN commented on Oct 13, 2026

    @NripeshN
    MemberAuthor

    The current-head OpenGL failures are not all generated-identity mismatches. I reproduced five translation-stage failures using the existing CI configurations and the same 846d176227a0ac13d2667e58d2bb68b322109ab0 source checkout:

    Entry Diagnostic reason Expression or helper
    ggn2_dynamic_copyuint32uint32 pointer-offset-range-unproven src_offset for src
    ggn4large_dynamic_copyint8int8 pointer-offset-range-unproven src_offset for src
    row_reduce_simple_maxuint16 composed-pointer-index-range-unproven inputs[j][i]
    row_reduce_small_large_1_reduce_sumint32 composed-pointer-index-range-unproven row[j]
    row_reduce_looped_large_5_reduce_sumfloat32 call-backing-unresolved elem_to_loc_int64_t

    These fail before artifact validation. A hash refresh cannot fix them. The legacy configurations still use expression-text index assertions, whereas the current native copy path uses checked uploaded-metadata preconditions and explicit launch regions. Review that configuration difference before classifying a rejection as an emitter defect. The unresolved helper backing needs a separate reduced reproduction; this observation does not establish its root cause or equate it with #2054.

    Current CI examples: copy shard 17 and reduction shard 9. Exact configurations and portability reports are retained locally. No assertions were relaxed, no entries were removed, and no reference hashes were updated. This adds distinct work to the exhaustive contract review rather than treating the four compiled Metal samples as proof that the remaining failures are harmless.

  26. NripeshN commented on Oct 13, 2026

    @NripeshN
    MemberAuthor

    Historical unary audit

    The Metal unary shard failure on 6b720c20 includes generated-artifact fingerprint mismatches. Four representative entries were regenerated against the contract's actual upstream pin, 846d176227a0ac13d2667e58d2bb68b322109ab0, not the newer development corpus pin.

    All four retained their source, entry, materialization, launch and resource-ABI contracts and compiled with metal -Werror -std=metal3.1:

    Entry Previous bytes Current bytes Additional execution evidence
    v_Negativeuint16uint16 1139 1237 Original/generated Metal and independent reference agree for 10 inputs, including 32768 and 65535.
    v_Squareuint16uint16 1124 1222 Original/generated Metal and independent reference agree for 8 inputs up to 46340, avoiding signed 32-bit source multiplication overflow.
    gn4large_Absuint16uint16 1690 1760 Compiler and ABI audit only.
    v_FromFP8uint8bfloat16 1649 1663 Compiler and ABI audit only.

    Both numerical controls checked 32 output guards and two unchanged inputs. They executed the exact audited generated hashes. The original controls instantiated the unmodified upstream headers; only those historical headers suppressed C++17-extension warnings. Generated artifacts remained warning-fatal.

    The changed integer helpers retain explicit narrow conversions; these differences must not be classified solely as helper linkage changes. The audit correctly refused to produce a replacement contract from 4 of 877 entries. No fingerprint, contract, coverage expectation or CI assertion was changed.

    CI source: https://github.com/CrossGL/crosstl/actions/runs/38442910863/job/115453810587

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions