Data Analytics report

Tile programming: design, implementation and evidence report

Technical design, compiler routes, correctness coverage, MPP cost-model v2 evidence and remaining performance gaps as of September 5, 2026.

Data access issues

The Metal FP32 GEMM cohort is closed; the overall performance goal is not

The execution-first C++ DSL, mutable TileIR, C++ TIRx bridge, limited native Metal MPP path, and direct XIR/SIMD CPU path are concrete. MPP contract v2 selects typed overwriting multiply only after a positive-zero, one-iteration proof. Cost-model v2 then ranks legal rectangles by subgroup critical-path work and whole-device waves. Its independently frozen eight-shape, fourteen-round replay validates all 784 path outputs and beats both eager Torch and direct MPS on 8/8 shapes. At 1024³, TIRx MPP views are 4.87% faster than Torch and 0.62% faster than MPS by paired ratio.

This is one M1 Max, FP32 GEMM and synchronized host-wall timing—not universal library parity. Model regret improved sharply only on its calibration cohort; held-out shapes/operators are absent. The XIR/SIMD CPU realization remains 38–55× slower than Torch in its scalar pilot, production-size LLM performance and low-precision operators are unmeasured, and two known Metal memory-flag test expectations remain. The broader performance goal stays open.

Validation separates measured wins from open work

All 54 balanced XIR pilot outputs passed and were independently reloaded; the MPP-v2 Metal replay adds 784/784 FP64-oracle-valid path outputs. The complete test_tile_* CTest cohort passed 32/34 tests; the two failures are known Metal memory-flag expectations and are not hidden. The Python benchmark suite passed 61/61 separately. These counts scope the evidence—they do not claim the entire repository suite passed.

Valid XIR pilot rows

54Source: Audited XIR validation summaryFile: scripts/benchmark/tile_torch/results/m1-max-20260905-xir-simd/results.json

Balanced automatic/fixed/Torch timing rows whose complete FP32 outputs passed the FP64 oracle.

Balanced automatic/fixed/Torch timing rows whose complete FP32 outputs passed the FP64 oracle.Source: Audited XIR validation summaryFile: scripts/benchmark/tile_torch/results/m1-max-20260905-xir-simd/results.json

Bounded validation snapshot recomputed from all 54 saved benchmark outputs.

Rechecked output elements

754,542Source: Audited XIR validation summaryFile: scripts/benchmark/tile_torch/results/m1-max-20260905-xir-simd/results.json

Elements independently reloaded and rechecked after the benchmark completed.

Elements independently reloaded and rechecked after the benchmark completed.Source: Audited XIR validation summaryFile: scripts/benchmark/tile_torch/results/m1-max-20260905-xir-simd/results.json

Bounded validation snapshot recomputed from all 54 saved benchmark outputs.

Passing selected CTests

32Source: Post-replay Tile regression countsFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/notes.md

Complete test_tile_* CTest cohort; two known Metal memory-flag assertions remain.

Complete test_tile_* CTest cohort; two known Metal memory-flag assertions remain.Source: Post-replay Tile regression countsFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/notes.md

Complete test_tile_* CTest result and retained dual-bridge LLM case count.

Dual-bridge LLM cases

21Source: Post-replay Tile regression countsFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/notes.md

LLM kernel/shape captures checked through both XIR and TIRx against FP64 references.

LLM kernel/shape captures checked through both XIR and TIRx against FP64 references.Source: Post-replay Tile regression countsFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/notes.md

Complete test_tile_* CTest result and retained dual-bridge LLM case count.

Valid Metal path outputs

784Source: MPP cost-v2 Metal validation countsFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json

Complete outputs checked against the FP64 oracle across seven Metal paths, eight shapes and fourteen rounds.

Complete outputs checked against the FP64 oracle across seven Metal paths, eight shapes and fourteen rounds.Source: MPP cost-v2 Metal validation countsFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json

Validation and win counts recomputed from 112 rows and all seven path outputs per row.

Shapes faster than Torch

8Source: MPP cost-v2 Metal validation countsFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json

Shapes where the frozen TIRx MPP-view plan has a lower paired host-wall median than eager Torch MPS.

Shapes where the frozen TIRx MPP-view plan has a lower paired host-wall median than eager Torch MPS.Source: MPP cost-v2 Metal validation countsFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json

Validation and win counts recomputed from 112 rows and all seven path outputs per row.

Shapes faster than MPS

8Source: MPP cost-v2 Metal validation countsFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json

Shapes where the frozen TIRx MPP-view plan has a lower paired host-wall median than direct MPSMatrixMultiplication.

Shapes where the frozen TIRx MPP-view plan has a lower paired host-wall median than direct MPSMatrixMultiplication.Source: MPP cost-v2 Metal validation countsFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json

Validation and win counts recomputed from 112 rows and all seven path outputs per row.

Mean model regret v2

8.8%Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md

Mean top-choice regret inside the same 8-shape, 45-requested-candidate calibration cohort; lower is better and this is not held-out.

v1 baseline 74.2%Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md
Mean top-choice regret inside the same 8-shape, 45-requested-candidate calibration cohort; lower is better and this is not held-out.Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md

Eight-shape finite-candidate model choices and regrets recomputed from the retained v1 and v2 search reports; three 10 ms samples per candidate, explicitly in-cohort. The chart is a long-form unpivot of these rows.

Root mapping is not the missing 50Source: Audited XIR paired-ratio summaryFile: scripts/benchmark/tile_torch/results/m1-max-20260905-xir-simd/results.json× optimization

The automatic plan is 51.85Source: Audited XIR paired-ratio summaryFile: scripts/benchmark/tile_torch/results/m1-max-20260905-xir-simd/results.json×, 54.54Source: Audited XIR paired-ratio summaryFile: scripts/benchmark/tile_torch/results/m1-max-20260905-xir-simd/results.json× and 38.19Source: Audited XIR paired-ratio summaryFile: scripts/benchmark/tile_torch/results/m1-max-20260905-xir-simd/results.json× slower than Torch by paired median on 32³, 128³ and 127Source: Audited XIR paired-ratio summaryFile: scripts/benchmark/tile_torch/results/m1-max-20260905-xir-simd/results.json×193Source: Audited XIR paired-ratio summaryFile: scripts/benchmark/tile_torch/results/m1-max-20260905-xir-simd/results.json×61Source: Audited XIR paired-ratio summaryFile: scripts/benchmark/tile_torch/results/m1-max-20260905-xir-simd/results.json. Automatic versus fixed mapping is small and inconsistent. This points to the absent realization family—Tile/lane distribution, register blocking, cache-aware reuse and a vector/matrix microkernel—before more cost-weight tuning.

Source: Audited XIR paired-ratio summaryFile: scripts/benchmark/tile_torch/results/m1-max-20260905-xir-simd/results.json

Bounded six-round paired medians from the saved XIR pilot.

Automatic XIR/SIMD time relative to Torch
Automatic XIR/SIMD time relative to Torch data
M×N×KPlanned / Torch (×)Planned µsTorch µs
32³51.8550.820.98
128³54.54272.414.98
127×193×6138.19255.716.7

The implementation boundary is explicit

A representable layout is not automatically lowerable on every target. A low cost never grants legality. The current solver preserves every original worker's whole Tile program because splitting it requires dependence and alias proofs; otherwise valid in-place snapshot semantics can become cross-worker races.

Implementation boundary

Source: Tile design and XIR planning documentsFile: docs/source/tile_xir_design.md

Bounded implementation-state table reviewed against the design, planner and source.

Implementation boundary
AreaImplementedRemaining boundary
CPU planningRoot permutations × worker-block widths; exact minimum in finite spaceTile distribution, register/cache plans, calibrated model
Native MetalTyped FP32 MPP subset on ordinary RuntimeGeneral epilogues, K pipelines, dtypes and operators
TileIRMutable typed SSA, regions, effects and layout recordsRealized Machine TileIR and its transform/analysis suite
TIRx Metal MPPTyped v2 modes, immutable-view proof, MPP-specific features and bounded exact solverHeld-out calibration, broader atoms/operators and low precision
XIR/SIMDDirect owned XIR, PHIs/CFG, bounds proof, SIMD JITPacked matrix atom and general resource/layout realization

MPP v2 fixes a structural ranking error, not scheduling in general

v1 added work from subgroups that actually execute concurrently and therefore systematically preferred narrow threadgroups. v2 divides realized issue and independent work by the participating subgroup count, then applies one outer wave factor from program × subgroup demand. On the same 8Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md-shape × 45Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md-requested-candidate calibration cohort, mean regret falls from 74.18%Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md to 8.82%Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md, median from 43.05%Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md to 2.59%Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md, maximum from 239.58%Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md to 34.37%Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md, and exact measured-winner picks rise from 1/8 to 4/8.

These three-sample, 10 ms measurements are deliberately labeled in-cohort. They show the concurrency correction is useful; they do not establish held-out generalization, calibrated time, queried occupancy or a hardware optimum. Hard legality remains independent of score, and correctness-checked Staged/JIT measurement remains authoritative.

Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md

Eight-shape finite-candidate model choices and regrets recomputed from the retained v1 and v2 search reports; three 10 ms samples per candidate, explicitly in-cohort. The chart is a long-form unpivot of these rows.

MPP model regret by calibration-cohort shape
MPP model regret by calibration-cohort shape data
M×N×KTop-choice regret (%)Cost basisModel pickMeasured pick
32³42.05v132×32×32 @ 64t32×32×32 @ 256t
32³5.18v232×32×32 @ 256t32×32×32 @ 128t
128³44.05v132×32×128 @ 64t32×32×128 @ 256t
128³0v232×32×128 @ 256t32×32×128 @ 256t
512³6.28v164×64×512 @ 128t128×32×128 @ 256t
512³13.81v264×64×512 @ 256t32×64×32 @ 128t
1024³0v1128×32×1024 @ 128t128×32×1024 @ 128t
1024³0v2128×32×1024 @ 128t128×32×1024 @ 128t
256×1024×1283.45v164×64×128 @ 128t32×32×32 @ 64t
256×1024×1280v264×64×128 @ 256t64×64×128 @ 256t
1024×128×25684.1v132×64×32 @ 64t32×32×128 @ 64t
1024×128×25617.17v232×32×256 @ 128t32×32×32 @ 128t
127×193×61173.93v132×32×32 @ 64t32×32×32 @ 256t
127×193×610v232×32×32 @ 256t32×32×32 @ 256t
513×257×129239.58v132×64×32 @ 64t32×32×32 @ 256t
513×257×12934.37v232×32×32 @ 128t32×32×32 @ 256t

MPP v1 versus v2 finite-set ranking

Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md

Eight-shape finite-candidate model choices and regrets recomputed from the retained v1 and v2 search reports; three 10 ms samples per candidate, explicitly in-cohort. The chart is a long-form unpivot of these rows.

MPP v1 versus v2 finite-set ranking
M×N×Kv1 model / measuredv1 regret (%)v2 model / measuredv2 regret (%)
513×257×12932×64×32 @ 64t / 32×32×32 @ 256t239.58Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md32×32×32 @ 128t / @ 256t34.37Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md
1024×128×25632×64×32 @ 64t / 32×32×128 @ 64t84.1Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md32×32×256 @ 128t / 32×32×32 @ 128t17.17Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md
512³64×64×512 @ 128t / 128×32×128 @ 256t6.28Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md64×64×512 @ 256t / 32×64×32 @ 128t13.81Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md
32³32×32×32 @ 64t / @ 256t42.05Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md32×32×32 @ 256t / @ 128t5.18Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md
128³32×32×128 @ 64t / @ 256t44.05Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md32×32×128 @ 256t / @ 256t0Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md
1024³128×32×1024 @ 128t / @ 128t0Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md128×32×1024 @ 128t / @ 128t0Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md
256×1024×12864×64×128 @ 128t / 32×32×32 @ 64t3.45Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md64×64×128 @ 256t / @ 256t0Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md
127×193×6132×32×32 @ 64t / @ 256t173.93Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md32×32×32 @ 256t / @ 256t0Source: MPP cost-model v1→v2 calibration-cohort studyFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md

LLM correctness has moved beyond GEMM

Normalization, activations, RoPE, masked softmax, and online causal prefill/decode/GQA run through two independent compiler routes and an FP64 oracle. Shapes include non-packet widths and attention tails. Hidden-size/context-scale performance, low-precision dtypes, paged KV cache, and XIR CNN/Top-K/sort validation remain open.

LLM correctness coverage

Source: Dual-bridge LLM coverageFile: scripts/benchmark/tile_torch/results/m1-max-20260905-xir-validation/notes.md

Bounded final regression and dual-bridge LLM coverage snapshot.

LLM correctness coverage
FamilyCasesShapes / edge cases
Attention3Source: Dual-bridge LLM coverageFile: scripts/benchmark/tile_torch/results/m1-max-20260905-xir-validation/notes.mdCausal prefill, ragged GQA, decode Q=1; online recurrence
Masked softmax3Source: Dual-bridge LLM coverageFile: scripts/benchmark/tile_torch/results/m1-max-20260905-xir-validation/notes.mdRow-dependent masks; widths 7, 32, 65
Nonlinear/fused6Source: Dual-bridge LLM coverageFile: scripts/benchmark/tile_torch/results/m1-max-20260905-xir-validation/notes.mdSwiGLU + GELU/residual; widths 7, 32, 65
Normalization6Source: Dual-bridge LLM coverageFile: scripts/benchmark/tile_torch/results/m1-max-20260905-xir-validation/notes.mdRMSNorm + LayerNorm; widths 7, 32, 65
RoPE3Source: Dual-bridge LLM coverageFile: scripts/benchmark/tile_torch/results/m1-max-20260905-xir-validation/notes.mdSplit-half rotation; widths 6, 32, 66

Frozen MPP-v2 schedules beat Torch and MPS on 8/8 tested GEMMs

The 14Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json-round replay freezes the independently measured schedules and performs no search. At 1024³, TIRx MPP views measure 270.675Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json µs versus Torch at 284.654Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json µs, MPS at 272.572Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json µs and handwritten MPP at 266.105Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json µs. The paired view/Torch and view/MPS ratios are 0.9513Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json× and 0.9938Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json×; the view path is slower than MPS in only 1/14 rounds. Across all eight rows it beats both external baselines.

This closes the tested M1 Max FP32 GEMM cohort, not the whole Tile objective. The seven paths remain separate because native Tile→MPP, ordinary TIRx, handwritten MPP, MPS, Torch, staged TIRx→MPP and forwarded-view TIRx→MPP have different compiler/runtime ownership and cannot be blended into one “Metal” number.

Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json

Eight-shape frozen schedules, medians and paired ratios recomputed from all fourteen balanced rounds.

1024³ Metal path comparison
1024³ Metal path comparison data
PathWarm host-wall µs
Hand MPP266.11
TIRx views270.68
MPS272.57
Torch284.65
Native Tile287.14
TIRx SIMD312.62
TIRx staged320.93

TIRx MPP-view GEMM replay

Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json

Eight-shape frozen schedules, medians and paired ratios recomputed from all fourteen balanced rounds.

TIRx MPP-view GEMM replay
M×N×KFrozen block @ threadsTIRx MPP views (µs)Hand MPP (µs)MPS (µs)Torch (µs)View / MPS (×)View / Torch (×)
1024×1024×1024128×32×1024 @ 128t270.68Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json266.11Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json272.57Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json284.65Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json0.99Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json0.95Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json
512×512×51232×64×32 @ 128t42.41Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json46.8Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json52.43Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json47.75Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json0.83Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json0.89Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json
256×1024×12864×64×128 @ 256t16.03Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json17.29Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json20.35Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json28.67Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json0.82Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json0.56Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json
1024×128×25632×32×32 @ 128t16.5Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json18.51Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json26.27Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json28.66Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json0.59Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json0.56Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json
513×257×12932×32×32 @ 256t20.61Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json24.42Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json35.04Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json34Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json0.59Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json0.61Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json
127×193×6132×32×32 @ 256t8.86Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json7.13Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json16.92Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json27Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json0.52Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json0.33Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json
128×128×12832×32×128 @ 256t5.34Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json5.44Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json16.9Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json27.22Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json0.32Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json0.19Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json
32×32×3232×32×32 @ 128t2.98Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json2.81Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json10.08Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json26.9Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json0.28Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json0.11Source: MPP cost-v2 eight-shape Metal comparisonFile: scripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json

Scope and measurement definitions

Warm timing is synchronized host-wall time per invocation, including each path's dispatch and synchronization but excluding JIT, allocation/upload and cold setup. The Metal replay covers seven paths, eight shapes, fourteen position-balanced rounds and seven samples per row; every complete output is checked against one FP64 oracle before timing is accepted. Ratios are medians of same-round ratios, not ratios of displayed medians or confidence intervals. Runs retain failures and fingerprint binaries and external compiler artifacts. The v2 model table instead uses three 10 ms search samples and is explicitly calibration-cohort evidence. The XIR pilot uses fixed 1×1×8 Tile specialization and therefore diagnoses that realization only.

Limitations that change interpretation

The Metal win is FP32 GEMM on one Apple M1 Max; it does not establish low-precision, fused-epilogue or non-GEMM performance. TVM's Metal runtime uses fast math while native and handwritten MPP controls disable it. MPP-v2 coefficients and the 512-subgroup wave capacity are relative replaceable priors, not nanoseconds, hardware counters or queried occupancy; their regret result is in-cohort rather than held-out. A controlled generic-versus-native CPU target probe did not change the LLVM loop core or structural gap; a packed/cache-aware CPU realization and balanced Torch/BLAS replay after that realization remain absent. The LLM suite is correctness-scale. Two of 34 Tile CTests still fail known Metal memory-flag expectations.

Next: generalize legal realizations, then broaden evidence

  1. Treat MPP v2 as a bootstrap: train on one set, evaluate held-out shape/operator regret and top-K coverage on another, and add cache/layout, edge, barrier and dispatch features without shape tables.
  2. Add dependence-safe CPU Tile distribution, register blocking, cache packing and a vector/matrix microkernel, then compare in one balanced session with Torch and BLAS/Accelerate.
  3. Benchmark realistic LLM hidden/context sizes, FP16/BF16, fused epilogues, normalization, softmax and attention through retained XIR/TIRx/library controls.
  4. Promote realized maps, atoms, resources and protocols into Machine TileIR only when multiple backends or passes need to inspect and transform them.
  5. Keep handwritten MPP, MPS, original TIRx, staged TIRx-MPP and native-MPP controls so each claimed speedup remains attributable. Exact enumeration is sufficient for today's bounded space; ILP, beam search or annealing should follow candidate-space growth, not precede it.

Questions the next evidence must answer

Does MPP v2 retain low regret on held-out shapes and non-GEMM operators? Which cache/layout and edge features explain its remaining 34.37% in-cohort miss? Which dependency-safe CPU distribution and packed microkernel close the large-GEMM library gap first? Do planner features transfer to reductions, softmax, attention and low precision? Which realized decisions must become Machine TileIR rather than backend-local records? Current evidence narrows these experiments; it does not answer them by assertion.

Sources

  1. Audited XIR validation summaryscripts/benchmark/tile_torch/results/m1-max-20260905-xir-simd/results.json · duckdb · 2026-09-05T03:07:43+08:00

    Bounded validation snapshot recomputed from all 54 saved benchmark outputs.

    SQL query
    SELECT 54::INTEGER AS valid_rows, 754542::BIGINT AS checked_elements
  2. Audited XIR paired-ratio summaryscripts/benchmark/tile_torch/results/m1-max-20260905-xir-simd/results.json · duckdb · 2026-09-05T03:07:43+08:00

    Bounded six-round paired medians from the saved XIR pilot.

    SQL query
    SELECT * FROM (VALUES ('32³',51.851,50.822,0.978),('128³',54.543,272.410,4.979),('127×193×61',38.186,255.711,6.696)) AS t(shape, planned_over_torch, planned_us, torch_us)
  3. MPP cost-model v1→v2 calibration-cohort studyscripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-search/notes.md · duckdb · 2026-09-05T04:15:43+08:00

    Eight-shape finite-candidate model choices and regrets recomputed from the retained v1 and v2 search reports; three 10 ms samples per candidate, explicitly in-cohort. The chart is a long-form unpivot of these rows.

    SQL query
    SELECT * FROM (VALUES ('32³','32×32×32 @ 64t','32×32×32 @ 256t',42.0544,'32×32×32 @ 256t','32×32×32 @ 128t',5.1849),('128³','32×32×128 @ 64t','32×32×128 @ 256t',44.0481,'32×32×128 @ 256t','32×32×128 @ 256t',0.0),('512³','64×64×512 @ 128t','128×32×128 @ 256t',6.2800,'64×64×512 @ 256t','32×64×32 @ 128t',13.8131),('1024³','128×32×1024 @ 128t','128×32×1024 @ 128t',0.0,'128×32×1024 @ 128t','128×32×1024 @ 128t',0.0),('256×1024×128','64×64×128 @ 128t','32×32×32 @ 64t',3.4512,'64×64×128 @ 256t','64×64×128 @ 256t',0.0),('1024×128×256','32×64×32 @ 64t','32×32×128 @ 64t',84.1042,'32×32×256 @ 128t','32×32×32 @ 128t',17.1743),('127×193×61','32×32×32 @ 64t','32×32×32 @ 256t',173.9300,'32×32×32 @ 256t','32×32×32 @ 256t',0.0),('513×257×129','32×64×32 @ 64t','32×32×32 @ 256t',239.5807,'32×32×32 @ 128t','32×32×32 @ 256t',34.3686)) AS t(shape,v1_model_pick,v1_measured_pick,v1_regret_pct,v2_model_pick,v2_measured_pick,v2_regret_pct)
  4. MPP cost-v2 1024³ Metal path comparisonscripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json · duckdb · 2026-09-05T04:15:43+08:00

    Bounded 1024³ medians from the fourteen-round frozen MPP-v2 seven-path replay; compact path labels match the chart.

    SQL query
    SELECT * FROM (VALUES ('Hand MPP',266.105),('TIRx views',270.675),('MPS',272.572),('Torch',284.654),('Native Tile',287.137),('TIRx SIMD',312.623),('TIRx staged',320.933)) AS t(path,time_us)
  5. MPP cost-v2 eight-shape Metal comparisonscripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json · duckdb · 2026-09-05T04:15:43+08:00

    Eight-shape frozen schedules, medians and paired ratios recomputed from all fourteen balanced rounds.

    SQL query
    SELECT * FROM (VALUES ('32×32×32','32×32×32 @ 128t',2.982,2.809,10.081,26.899,0.2794,0.1105),('128×128×128','32×32×128 @ 256t',5.335,5.441,16.904,27.218,0.3174,0.1943),('512×512×512','32×64×32 @ 128t',42.413,46.802,52.428,47.745,0.8285,0.8919),('1024×1024×1024','128×32×1024 @ 128t',270.675,266.105,272.572,284.654,0.9938,0.9513),('256×1024×128','64×64×128 @ 256t',16.025,17.286,20.350,28.668,0.8189,0.5554),('1024×128×256','32×32×32 @ 128t',16.500,18.508,26.270,28.655,0.5946,0.5596),('127×193×61','32×32×32 @ 256t',8.861,7.127,16.915,26.997,0.5172,0.3266),('513×257×129','32×32×32 @ 256t',20.607,24.424,35.043,34.002,0.5874,0.6057)) AS t(shape,schedule,tirx_mpp_views_us,hand_mpp_us,mps_us,torch_us,view_over_mps,view_over_torch)
  6. MPP cost-v2 Metal validation countsscripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/results.json · duckdb · 2026-09-05T04:15:43+08:00

    Validation and win counts recomputed from 112 rows and all seven path outputs per row.

    SQL query
    SELECT 784::INTEGER AS metal_validated_outputs, 8::INTEGER AS torch_shapes_won, 8::INTEGER AS mps_shapes_won
  7. Post-replay Tile regression countsscripts/benchmark/tile_torch/results/m1-max-20260905-mpp-cost-v2-replay/notes.md · duckdb · 2026-09-05T04:15:43+08:00

    Complete test_tile_* CTest result and retained dual-bridge LLM case count.

    SQL query
    SELECT 32::INTEGER AS passing_tests, 21::INTEGER AS llm_cases
  8. Dual-bridge LLM coveragescripts/benchmark/tile_torch/results/m1-max-20260905-xir-validation/notes.md · duckdb · 2026-09-05T03:07:43+08:00

    Bounded final regression and dual-bridge LLM coverage snapshot.

    SQL query
    SELECT * FROM (VALUES ('Attention',3,'Causal prefill, ragged GQA, decode Q=1'),('Normalization',6,'RMSNorm + LayerNorm; widths 7, 32, 65'),('Nonlinear/fused',6,'SwiGLU + GELU/residual; widths 7, 32, 65'),('RoPE',3,'Split-half rotation; widths 6, 32, 66'),('Masked softmax',3,'Row-dependent masks; widths 7, 32, 65')) AS t(family,cases,coverage)
  9. Tile design and XIR planning documentsdocs/source/tile_xir_design.md · duckdb · 2026-09-05T04:15:43+08:00

    Bounded implementation-state table reviewed against the design, planner and source.

    SQL query
    SELECT * FROM (VALUES ('CPU planning','Root permutations × worker-block widths','Tile distribution, register/cache plans, calibrated model'),('Native Metal','Typed FP32 MPP subset','General epilogues, K pipelines, dtypes and operators'),('TIRx Metal MPP','Typed v2 modes, view proof, MPP features and bounded exact solver','Held-out calibration, broader atoms/operators and low precision'),('TileIR','Mutable typed SSA, regions, effects and layouts','Realized Machine TileIR and transform suite'),('XIR/SIMD','Direct XIR, PHIs/CFG, bounds proof and JIT','Packed matrix atom and general resource/layout realization')) AS t(area,implemented,remaining)