File size: 3,443 Bytes
3da88e3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{
  "schema_version": 1,
  "id": "minimax-h3-r3-exact-qk-fc2",
  "title": "Native reduction matching gives exact M5 QK fusion; whole-image memory still decides",
  "tags": [
    "rmsnorm",
    "rope",
    "bf16",
    "m5",
    "gemm",
    "physical-footprint",
    "operator-to-pipeline"
  ],
  "decision": "accepted",
  "evidence_level": "observed",
  "mechanism": "Four contiguous BF16 reads per SIMD lane and precise rsqrt reproduce installed MLX RMSNorm before the affine/partial-RoPE BF16 boundaries. M5 FC2 benefits from a 64x128x512 TensorOps tile with four SIMD groups and an eight-row tile walk.",
  "recommendation": "Use the measured M5 Pro/MLX 0.32.4 QK producer and shape-qualified FC2 tile, with native full-width norms and native fallback outside the qualified scope. Require bitwise trajectories and paired full-image receipts; do not infer a deployment win from a kernel ratio.",
  "counterexample": "The 1024-thread full-width fusion was exact and faster in a block, but the complete timed population used 1.04094% more physical memory and missed its 1% gate. BK2048 improved an operator but regressed the block by 0.19%. A 512MiB allocator cache was 1.65% slower in the block screen and did not reduce sampled physical peak.",
  "retest_when": "Retest after MLX reduction/dispatch changes, a new GPU/Metal driver, different projection shapes, or changes to opaque-kernel buffer lifetimes. Wider norm fusion and larger K panels may deserve new pipeline tests under those changed mechanisms.",
  "scope": {
    "projects": [
      "minimax-h3-image-mlx"
    ],
    "hardware": [
      "Apple M5 Pro, 16 GPU cores, 64GiB unified memory"
    ],
    "runtime": [
      "MLX/MLX Metal 0.32.4; macOS 27.0.1; AC Automatic power"
    ],
    "workloads": [
      "Two 2048-square timing cases, three paired repeats each; four exact full-image/trajectory quality cases including a detail prompt and one edit. Dense BF16 storage in this lesson; not a new packed-storage qualification."
    ]
  },
  "evidence": [
    {
      "project": "minimax-h3-image-mlx",
      "path": "reports/optimization-r3/qk-deployment/comparison.json",
      "sha256": "346409df254b31a692f4d031c1363efd35ba9638db494e4bf5f13afe3b6d31ad"
    },
    {
      "project": "minimax-h3-image-mlx",
      "path": "reports/optimization-r3/qk-deployment/quality-audit.json",
      "sha256": "3d242d63e283fa6dc645adee2c3a1dfda59b5d9ae4ac56cf04e15a5486816a2e"
    },
    {
      "project": "minimax-h3-image-mlx",
      "path": "reports/optimization-r3/deployment/comparison.json",
      "sha256": "5438ce89ced53d19913534af51cb1e20d6d11e98794a5b7a986ba07480a393d8"
    },
    {
      "project": "minimax-h3-image-mlx",
      "path": "reports/optimization-r3/norm.json",
      "sha256": "473e30d475788737cf7e45349ef94c0330f527a5011d9a8d3c8590822a87e3e7"
    },
    {
      "project": "minimax-h3-image-mlx",
      "path": "reports/optimization-r3/panel.json",
      "sha256": "7c1d64f439912eccdf0b959b3c3e460046b5737aec04959642a9ec90a76c9ce8"
    },
    {
      "project": "minimax-h3-image-mlx",
      "path": "reports/optimization-r3/cache-screen.json",
      "sha256": "568b51938cf5f02a94c14d47298fa225d98b5ae384200dac0e4b55a1e91c6009"
    },
    {
      "project": "minimax-h3-image-mlx",
      "path": "reports/optimization-r3/embedding/summary.json",
      "sha256": "dabdba5b4d3b9cebbccfc43671014971ba26216c96e52d50054e050c2ff676d9"
    }
  ],
  "supersedes": []
}