Build the native-Metal-versus-Mojo parity harness and operation inventory #85
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Create the reproducible Metal correctness and performance framework used by every main Mojo migration issue. DS4 remains the behavioral oracle and DS4Server native Metal is the same-hardware performance oracle.
This work must incorporate #84. It must not switch the normal backend or require CUDA.
Scope
The result schema and operation inventory should be reusable by the later CUDA issue, but no DS4 CUDA adapter, DGX run, Linux support, or CUDA acceptance gate belongs here.
Measurement contract
Correctness contract
Compare shapes, strides, quantization decoding, expert indices, cache positions, context counters, checkpoints, logits, argmax, sampled tokens with identical RNG, and full greedy sequences. Use operation-specific tolerances. Reject NaN, infinity, out-of-bounds behavior, silent precision changes, fallback, or extra token-path transfers.
Performance gate
Critical operations, complete-model prefill, and stable decode require a Mojo-Metal versus native-Metal median ratio of at least 1.00 on the same Mac. The paired 95 percent confidence lower bound must be at least 0.97, but that uncertainty band is not an allowed persistent regression. p95 latency must not reproducibly worsen and peak GPU memory must not exceed native without explicit approval.
Acceptance criteria
Binding outcome from #84 (2026-08-31)
#84 stopped product integration on Mojo 1.0.0 because the open compiler/standard-library environment has no host-side Metal
DeviceContext. The workingmax.gpu.hostpath requires MAX plus AsyncRT/KGEN dylibs whose component-specific redistribution permission could not be established.mojo build --emit shared-libalso links@rpath/libKGENCompilerRTShared.dylibfor a trivial export.The operation inventory, native baseline, fixture schema, and backend-neutral result format may proceed. A Mojo backend, Mojo timing comparison, and completion claim are blocked until every resume condition in
docs/MOJO_SPIKE_84.mdpasses.These constraints are acceptance criteria:
uv.lock; do not use nightly or an older release;max,max-core,max-mojo-libs, AsyncRT, or KGEN to the product/build/package closure without an authoritative redistribution grant naming every shipped component;docs/MOJO_SPIKE_84.md;If the runtime grant or open host API changes, update #84 evidence first so this milestone has one source of truth.
hugo referenced this issue2026-08-31 12:13:27 +00:00
Build the native-versus-Mojo parity harness and operation coverage inventoryto Build the native-Metal-versus-Mojo parity harness and operation inventoryBased on findings in #84, all work on MOJO migration is stopped. Licene-hell.
Project decision: the Mojo backend effort is canceled. All committed spike tooling, dependencies, lockfiles, and documentation were removed in
9a33c61; generated probe state was deleted as well. The independent Apple-silicon/macOS-15 product floor remains. This issue is no longer actionable.