Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions guides/API-INDEX.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# API & symbol index

**1206 symbols referenced across the series, by framework — with where each is covered and whether it exists in the captured 26.5 / 27.0 beta SDK interfaces.**
**1205 symbols referenced across the series, by framework — with where each is covered and whether it exists in the captured 26.5 / 27.0 beta SDK interfaces.**

> `26.5` / `27.0` = the bare symbol name appears in the corresponding captured `.swiftinterface` in `notes/sdk-interfaces/` (a presence check, not a full signature match — the guides carry the signature-level citations). Package types (MLX, `ChatCompletionsLanguageModel`, …) and C/ObjC-only API legitimately show neither. Generated 2026-08-02; regenerate rather than hand-edit.
> `26.5` / `27.0` = the bare symbol name appears in the corresponding captured `.swiftinterface` in `notes/sdk-interfaces/` (a presence check, not a full signature match — the guides carry the signature-level citations). Package types (MLX, `ChatCompletionsLanguageModel`, …) and C/ObjC-only API legitimately show neither. Generated 2026-08-03; regenerate rather than hand-edit.


## FoundationModels <sub>163 symbols</sub>
Expand Down Expand Up @@ -141,7 +141,7 @@
| `Tool.Output` | ✓ | ✓ | [2.3](part-02-foundation-models-everyday-api/references/03-tools-and-tool-calling.md), [3.3](part-03-context-profiles-agentic/references/03-skills-and-history-modifiers.md), [3.4](part-03-context-profiles-agentic/references/04-agentic-orchestration.md), [5.2](part-05-prototyping-profiling-non-swift/references/02-fm-cli-and-python-sdk.md) +1 more |
| `Tool.parameters` | ✓ | ✓ | [2.2](part-02-foundation-models-everyday-api/references/02-guided-generation-and-streaming.md), [2.README](part-02-foundation-models-everyday-api/README.md), [5.1](part-05-prototyping-profiling-non-swift/references/01-playground-and-instruments.md), [17.1](part-17-migration-from-pre-ios-27/references/01-what-changed-checklist.md) |
| `Tool.SessionProperty` | ✓ | ✓ | [2.3](part-02-foundation-models-everyday-api/references/03-tools-and-tool-calling.md) |
| `Transcript` | ✓ | ✓ | [2.1](part-02-foundation-models-everyday-api/references/01-sessions-and-prompting.md), [3.1](part-03-context-profiles-agentic/references/01-context-window-and-kv-cache.md), [3.2](part-03-context-profiles-agentic/references/02-dynamic-profiles-and-session-state.md), [17.1](part-17-migration-from-pre-ios-27/references/01-what-changed-checklist.md) +21 more |
| `Transcript` | ✓ | ✓ | [2.1](part-02-foundation-models-everyday-api/references/01-sessions-and-prompting.md), [3.1](part-03-context-profiles-agentic/references/01-context-window-and-kv-cache.md), [3.2](part-03-context-profiles-agentic/references/02-dynamic-profiles-and-session-state.md), [2.3](part-02-foundation-models-everyday-api/references/03-tools-and-tool-calling.md) +21 more |
| `Transcript.Attachment` | ✓ | ✓ | [2.5](part-02-foundation-models-everyday-api/references/05-image-input-and-attachments.md) |
| `Transcript.AttachmentSegment` | ✓ | ✓ | [4.3](part-04-beyond-the-built-in-model/references/03-authoring-a-languagemodel-provider.md), [1.2](part-01-orientation-and-gating/references/02-platform-and-version-gating.md), [2.5](part-02-foundation-models-everyday-api/references/05-image-input-and-attachments.md) |
| `Transcript.CustomSegment` | ✓ | ✓ | [4.3](part-04-beyond-the-built-in-model/references/03-authoring-a-languagemodel-provider.md), [3.1](part-03-context-profiles-agentic/references/01-context-window-and-kv-cache.md), [4.README](part-04-beyond-the-built-in-model/README.md) |
Expand Down Expand Up @@ -173,7 +173,7 @@
| `TranscriptRecorder` | | | [3.4](part-03-context-profiles-agentic/references/04-agentic-orchestration.md), [5.README](part-05-prototyping-profiling-non-swift/README.md) |
| `UnavailableReason` | ✓ | ✓ | [2.6](part-02-foundation-models-everyday-api/references/06-availability-errors-and-guardrails.md), [1.1](part-01-orientation-and-gating/references/01-apple-ai-stack-2026-map.md), [1.2](part-01-orientation-and-gating/references/02-platform-and-version-gating.md) |

## CoreAI <sub>74 symbols</sub>
## CoreAI <sub>73 symbols</sub>

| Symbol | 26.5 | 27.0 | Covered in |
|---|:-:|:-:|---|
Expand All @@ -193,9 +193,8 @@
| `AIModelAssetMetadata` | | | [17.6](part-17-migration-from-pre-ios-27/references/06-toolchain-and-asset-compatibility.md), [7.4](part-07-coreai-swift-runtime/references/04-bundles-engines-and-guided-decoding.md) |
| `AIModelCache` | | ✓ | [7.2](part-07-coreai-swift-runtime/references/02-specialization-caching-and-aot.md), [15.1](part-15-shipping-and-operating/references/01-model-distribution-and-updates.md), [17.5](part-17-migration-from-pre-ios-27/references/05-coreml-to-coreai.md), [17.6](part-17-migration-from-pre-ios-27/references/06-toolchain-and-asset-compatibility.md) +10 more |
| `AIModelCache.default` | | ✓ | [7.2](part-07-coreai-swift-runtime/references/02-specialization-caching-and-aot.md), [10.3](part-10-coreai-hardware-authoring-debugging/references/03-llm-export-end-to-end.md), [17.5](part-17-migration-from-pre-ios-27/references/05-coreml-to-coreai.md) |
| `AIModelCache.default.deleteEntries(for:)` | | ✓ | [7.3](part-07-coreai-swift-runtime/references/03-states-and-pipelined-execution.md), [15.1](part-15-shipping-and-operating/references/01-model-distribution-and-updates.md) |
| `AIModelCache.default.deleteEntries(for:)` | | ✓ | [7.2](part-07-coreai-swift-runtime/references/02-specialization-caching-and-aot.md), [7.3](part-07-coreai-swift-runtime/references/03-states-and-pipelined-execution.md), [15.1](part-15-shipping-and-operating/references/01-model-distribution-and-updates.md) |
| `AIModelCache.default.model(for:options:)` | | ✓ | [10.2](part-10-coreai-hardware-authoring-debugging/references/02-debugging-and-profiling.md), [17.1](part-17-migration-from-pre-ios-27/references/01-what-changed-checklist.md), [17.5](part-17-migration-from-pre-ios-27/references/05-coreml-to-coreai.md) |
| `AIModelCache.deleteEntries(for:)` | | ✓ | [7.2](part-07-coreai-swift-runtime/references/02-specialization-caching-and-aot.md) |
| `AIModelCache.model(for:options:)` | | ✓ | [7.1](part-07-coreai-swift-runtime/references/01-runtime-and-ndarray.md), [17.6](part-17-migration-from-pre-ios-27/references/06-toolchain-and-asset-compatibility.md), [7.README](part-07-coreai-swift-runtime/README.md), [7.5](part-07-coreai-swift-runtime/references/05-non-llm-engines-bundles-warmup-and-caching.md) +1 more |
| `AIModelCache.Policy` | | ✓ | [17.6](part-17-migration-from-pre-ios-27/references/06-toolchain-and-asset-compatibility.md), [7.1](part-07-coreai-swift-runtime/references/01-runtime-and-ndarray.md), [7.2](part-07-coreai-swift-runtime/references/02-specialization-caching-and-aot.md), [17.5](part-17-migration-from-pre-ios-27/references/05-coreml-to-coreai.md) |
| `AIModelError` | | | [15.1](part-15-shipping-and-operating/references/01-model-distribution-and-updates.md), [7.1](part-07-coreai-swift-runtime/references/01-runtime-and-ndarray.md), [7.README](part-07-coreai-swift-runtime/README.md), [7.2](part-07-coreai-swift-runtime/references/02-specialization-caching-and-aot.md) +2 more |
Expand Down
4 changes: 2 additions & 2 deletions guides/SILENT-FAILURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

The defining property of this stack is that most defects *do not throw*. Each entry below links to the guide section that documents the failure, its trigger, and the safe default. Entries are classified by **what you see** (or fail to see), not by which API is at fault, because the symptom is what you start from at 2 a.m.

> Generated from the guides on 2026-08-02 by `scripts/` tooling; regenerate after editing guides rather than editing this file by hand.
> Generated from the guides on 2026-08-03 by `scripts/` tooling; regenerate after editing guides rather than editing this file by hand.


## How to use this page
Expand Down Expand Up @@ -1158,7 +1158,7 @@ Start from the symptom column that matches what you observe. Within each section
- [64-bit types are narrowed on the way in: int64 to int32 and fp64 to fp32, silently](part-09-coreai-compression-numerics/references/03-numeric-formats-across-the-stack.md#35-️-64-bit-types-are-narrowed-on-the-way-in) — 9.3
- [The converter narrows int64/fp64 to 32-bit silently — NDArray has 64-bit ScalarTypes the converter never produces](part-09-coreai-compression-numerics/references/03-numeric-formats-across-the-stack.md#35-️-64-bit-types-are-narrowed-on-the-way-in) — 9.3
- [MLX's own caveat: mxfp8 results differ on <1% of elements and can exceed 1 ULP for small values; nvfp4 matches exactly](part-09-coreai-compression-numerics/references/03-numeric-formats-across-the-stack.md#63-python-signatures) — 9.3
- [MLX float32 matmuls silently run at TF32 on the NAX path — PR #3883 exists because users keep being surprised](part-09-coreai-compression-numerics/references/03-numeric-formats-across-the-stack.md#65-the-four-gates-on-mlxs-accelerated-quantized-path) — 9.3
- [MLX float32 matmuls silently run at TF32 on the NAX path — the warn-once PR (#3883) was closed unmerged, so nothing announces it](part-09-coreai-compression-numerics/references/03-numeric-formats-across-the-stack.md#65-the-four-gates-on-mlxs-accelerated-quantized-path) — 9.3
- [Failure #12: MLX fp32 matmul at default env runs TF32 relaxed precision — set MLX_ENABLE_TF32=0 and diff](part-09-coreai-compression-numerics/references/03-numeric-formats-across-the-stack.md#71-the-lookup-table) — 9.3
- [Failure #15: int64 index tensors are narrowed to int32 — values above INT32_MAX overflow, mostly unclamped](part-09-coreai-compression-numerics/references/03-numeric-formats-across-the-stack.md#71-the-lookup-table) — 9.3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1016,9 +1016,9 @@ Three things to take from it:

1. **`clearCache(at:)` returns the asset URLs it discovered and processed**, and the tool prints
that count. The implementation computes `modelAssetURLs(at:)`, calls
`AIModelCache.deleteEntries(for:)` for each resolved URL, and returns the original URL array.
The count therefore does **not** prove that those cache entries existed or that that many entries
were removed. Probe cache state separately if the distinction matters.
`AIModelCache.default.deleteEntries(for:)` for each resolved URL, and returns the original URL
array. The count therefore does **not** prove that those cache entries existed or that that many
entries were removed. Probe cache state separately if the distinction matters.
2. **`isCached(at:)` is a pure query.** The comment says so explicitly: *"This only inspects the
cache; it never triggers specialization."* That is the gating primitive §3 is about, in its
read-only form, and it is the honest way to label a timing number as cold or warm.
Expand All @@ -1031,9 +1031,9 @@ Three things to take from it:
> ⚠️ **`PreparedModel.clearCache(at:)` is `coreai-models` API, not `CoreAI` framework API.** It is a
> helper in Apple's open-source sample package, keyed on a **bundle path**, and it is not one of
> the four `AIModelCache` deletion methods documented above. Do not reach for it in app code
> expecting a framework guarantee — use `AIModelCache.deleteEntries(for:)`. The value of the flag
> is as evidence of *how Apple measures*, and as a ready-made escape hatch if you are already
> building on `coreai-models`.
> expecting a framework guarantee — use `AIModelCache.default.deleteEntries(for:)`. The value of
> the flag is as evidence of *how Apple measures*, and as a ready-made escape hatch if you are
> already building on `coreai-models`.
>
> 🔴 **GAP — this does not settle the deletion contradiction below.** The tools clear the cache
> *before* any `AIModel` exists, so they never exercise the disputed case: deleting an entry that a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ PyTorch's naïve decomposition, and some of those decompositions are numerically
> `replace_log_softmax` in `_aten_to_core.py`.
>
> **Status:** PR #22 proposes stable forms (`max(x,0) + log(1+exp(-|x|))` etc.) and adds the three ops
> to `_COMPOSITE_OPS`. **Not merged as of 2026-07-29.** On shipped `coreai-torch 0.4.1`, softplus,
> to `_COMPOSITE_OPS`. **Not merged as of 2026-08-03.** On shipped `coreai-torch 0.4.1`, softplus,
> mish, logsumexp and logcumsumexp are fp16-unsafe on the ANE.
>
> **Safe default meanwhile:** substitute in your PyTorch source before export —
Expand Down Expand Up @@ -1628,7 +1628,7 @@ is an open bug with a precise trigger:
>
> Internals named: `_dim_for_sym` in `_utils.py` reads `var_to_range` when reconstructing the `Dim`
> for the submodule re-export; a `torch._check(key.size(-2) <= cap)` in the **parent** forward does
> **not** propagate into that re-export. Open PR `coreai-torch#7` targets it; unmerged.
> **not** propagate into that re-export. PR `coreai-torch#7` targeted it; closed unmerged 2026-07-29.
>
> **Workaround:** drop `SDPA` from the externalize list so it decomposes to primitive ops — you lose
> the composite (and its fast path) but the conversion completes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1747,10 +1747,10 @@ four must pass.
> out of the whole NAX path** — the only precision control available, and it is all-or-nothing.
> Complex dtypes are excluded outright.
>
> ⚠️ Upstream PR #3883 ("Warn once when float32 ops silently run at TF32 precision", open as of
> 2026-07-29) exists because users are being surprised by this. **This is the MLX analogue of the
> Core AI silent-fallback problem**: a precision reduction that produces correct-looking numbers and
> announces itself nowhere.
> ⚠️ Upstream PR #3883 ("Warn once when float32 ops silently run at TF32 precision") existed
> because users are being surprised by this — it was **closed unmerged 2026-08-03**, so no runtime
> warning is coming. **This is the MLX analogue of the Core AI silent-fallback problem**: a
> precision reduction that produces correct-looking numbers and announces itself nowhere.
Comment on lines +1750 to +1753

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

sed -n '1738,1760p' guides/part-09-coreai-compression-numerics/references/03-numeric-formats-across-the-stack.md
printf '\nRepository references to PR `#3883`:\n'
rg -n -C 3 '3883|no runtime warning|closed unmerged|August 3, 2026' .

Repository: hbmartin/Foundation-Models-and-Core-AI-and-MLX-skills

Length of output: 50411


🏁 Script executed:

printf '%s\n' 'Tracked candidate files:'
git ls-files | rg '(^|/)(guides|skills)/.*part-09-coreai-compression-numerics/references/03-numeric-formats-across-the-stack\.md$'

printf '\nExact target lines by tracked file:\n'
while IFS= read -r f; do
  printf '\n--- %s ---\n' "$f"
  rg -n -C 2 'Upstream PR `#3883`|no runtime|warn-once PR \(`#3883`\)' "$f" || true
done < <(git ls-files | rg '(^|/)(guides|skills)/.*part-09-coreai-compression-numerics/references/03-numeric-formats-across-the-stack\.md$')

printf '\nRepository metadata near the dated re-check:\n'
sed -n '14,26p' notes/README.md
sed -n '760,776p' guides/part-12-mlx-python/references/02-numerics-hardware-gating-and-custom-kernels.md

Repository: hbmartin/Foundation-Models-and-Core-AI-and-MLX-skills

Length of output: 2935


🏁 Script executed:

for f in \
  guides/part-09-coreai-compression-numerics/references/03-numeric-formats-across-the-stack.md \
  skills/apple-core-ai/references/part-09-coreai-compression-numerics/references/03-numeric-formats-across-the-stack.md
do
  printf '\n--- %s ---\n' "$f"
  sed -n '1746,1755p' "$f"
done

printf '\nUpstream PR `#3883`:\n'
curl -fsSL https://api.github.com/repos/ml-explore/mlx/pulls/3883 |
  jq '{state, merged, merged_at, closed_at, updated_at, title, html_url}'

Repository: hbmartin/Foundation-Models-and-Core-AI-and-MLX-skills

Length of output: 1909


Scope the warning claim to the August 3, 2026 upstream snapshot.

Replace “so no runtime warning is coming” with “so no runtime warning was present in the inspected upstream state as of August 3, 2026.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@guides/part-09-coreai-compression-numerics/references/03-numeric-formats-across-the-stack.md`
around lines 1750 - 1753, Update the warning claim in the upstream PR `#3883` note
to state that no runtime warning was present in the inspected upstream state as
of August 3, 2026, rather than implying no runtime warning will ever arrive;
preserve the surrounding MLX silent-fallback context.


⚠️ NAX is also **not a drop-in accelerator** — it changes which *algorithm* is selected, not just
which kernel implements it. ✅ VERIFIED, `matmul.cpp:924`: the old split-K path is taken only when
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2048,8 +2048,8 @@ gates the whole accelerated path on `MLX_ENABLE_TF32` for float32 inputs
(`mlx/utils.h:195-197`, `matmul.cpp:916-918`). One feature, two halves. If you set
`relaxed_precision = true` in your own kernel, you are opting into the same trade and you should
expose the same escape hatch to your callers. Upstream PR **#3883** ("Warn once when float32 ops
silently run at TF32 precision", still open as of 2026-07-29) exists because MLX's users were surprised by
it — which is a good reason to make yours explicit.
silently run at TF32 precision", closed unmerged 2026-08-03) was opened because MLX's users were
surprised by it — which is a good reason to make yours explicit.

---

Expand Down Expand Up @@ -3119,8 +3119,8 @@ No error, no assertion, no NaN — just wrong output for certain tile shapes. Th
*are* present check only that the M, N and K dimensions agree between operands
(`steel/gemm/nax.h:834,838,842`), not that the shape is one the dispatch handles.

PR #3924's title — *"Add a tile-shape `static_assert` to `tile_matmad_nax`"* — is the
acknowledgement that this is a real defect, still open as of 2026-07-29.
PR #3924's title — *"Add a tile-shape `static_assert` to `tile_matmad_nax`"* — acknowledged a
real defect. It was closed unmerged 2026-08-02 (maintainer declined); the hazard remains at HEAD.

### 13.3 What to do about it

Expand All @@ -3132,7 +3132,7 @@ acknowledgement that this is a real defect, still open as of 2026-07-29.
handles.
3. **Assume the same class of gap exists in code you write from this guide.** The §9 kernel has
fixed `TILE_M` / `TILE_N` / `HEAD_DIM` for exactly this reason; if you template them, add the
assert #3924 is adding.
assert #3924 proposed.
4. **Check the PR list yourself before writing.** The table above is a snapshot dated 2026-07-27 and
will be stale by the time you read it.

Expand Down
8 changes: 4 additions & 4 deletions guides/part-12-mlx-python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ returns the graft boundary (`ca60290`), not the introducing commit.

**So: pin `mlx==0.32.*` and `mlx-lm==0.31.3`, read the shipped `mlx/version.h` rather than trusting any date
including these guides', and re-run your own numerics after every bump.** Not boilerplate — **four NAX
correctness fix PRs opened in the 72 hours before 2026-07-27** (PRs #3912, #3922, #3924 — all three still open,
unmerged, per a 2026-07-31 `gh` re-check, so no release or checkout contains them), one a *missing
correctness fix PRs opened in the 72 hours before 2026-07-27** (PRs #3912, #3922 still open and #3924 closed
unmerged 2026-08-02, per a 2026-08-03 `gh` re-check — so no release or checkout contains them), one a *missing
Comment on lines +31 to +32

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -u

printf '%s\n' '--- repository state ---'
git rev-parse HEAD
git status --short

printf '%s\n' '--- requested passages ---'
sed -n '20,40p' guides/part-12-mlx-python/README.md
sed -n '112,132p' guides/part-12-mlx-python/references/01-core-fundamentals.md
sed -n '92,112p' guides/part-12-mlx-python/references/02-numerics-hardware-gating-and-custom-kernels.md

printf '%s\n' '--- all references to candidate PRs and date/count claims ---'
rg -n -C 2 '`#3912`|`#3922`|`#3924`|correctness PR|three days|72 hours|2026-07-27|2026-08-02|2026-08-03' .

printf '%s\n' '--- GitHub PR metadata ---'
for n in 3912 3922 3924; do
  gh api "repos/ml-explore/mlx/pulls/$n" --jq '"#\(.number)\tstate=\(.state)\tmerged=\(.merged)\tclosed_at=\(.closed_at)\tmerged_at=\(.merged_at)\ttitle=\(.title)"' || true
done

Repository: hbmartin/Foundation-Models-and-Core-AI-and-MLX-skills

Length of output: 50412


🏁 Script executed:

#!/bin/bash
set -u
log=/tmp/coderabbit-shell-logs/shell-output-uDfvAY

printf '%s\n' '--- state and requested passages from prior run ---'
sed -n '1,180p' "$log"

printf '%s\n' '--- exact NAX references in the relevant guide and research note ---'
rg -n -C 3 --no-heading '`#3912`|`#3922`|`#3924`|correctness PR|72 hours|three days|2026-07-27|2026-08-02|2026-08-03' \
  guides/part-12-mlx-python notes/repos/issues-mlx-stack.md

printf '%s\n' '--- PR metadata, including repository and merge commits ---'
for n in 3912 3922 3924; do
  gh api "repos/ml-explore/mlx/pulls/$n" \
    --jq '"#\(.number)\tstate=\(.state)\tmerged=\(.merged)\tclosed_at=\(.closed_at)\tmerged_at=\(.merged_at)\tmerge_commit=\(.merge_commit_sha)\ttitle=\(.title)"' || true
done

Repository: hbmartin/Foundation-Models-and-Core-AI-and-MLX-skills

Length of output: 50411


🏁 Script executed:

#!/bin/bash
set -u

printf '%s\n' '--- NAX source note ---'
rg -n -C 12 'NAX|3912|3922|3924|correctness|three days|four' notes/repos/mlx-tensorops-kernels.md

printf '%s\n' '--- PRs opened in the stated window ---'
gh api --paginate \
  'search/issues?q=repo%3Aml-explore%2Fmlx+is%3Apr+created%3A2026-07-24..2026-07-27&per_page=100' \
  --jq '.items[] | "#\(.number)\t\(.created_at)\t\(.state)\t\(.title)"' 2>&1 || true

printf '%s\n' '--- exact status for the three cited PRs ---'
for n in 3912 3922 3924; do
  gh api "repos/ml-explore/mlx/pulls/$n" \
    --jq "#\(.number)\tcreated=\(.created_at)\tstate=\(.state)\tmerged=\(.merged)\tclosed_at=\(.closed_at)\tmerged_at=\(.merged_at)\ttitle=\(.title)" 2>&1 || true
done

printf '%s\n' '--- checkout references ---'
git ls-files | rg '(^|/)(README|01-core-fundamentals|02-numerics-hardware-gating-and-custom-kernels)\.md$|mlx-tensorops-kernels'
rg -n -C 2 '973e27f|no release|no runtime|no release or checkout|none is in this checkout' \
  guides/part-12-mlx-python notes/repos/mlx-tensorops-kernels.md

Repository: hbmartin/Foundation-Models-and-Core-AI-and-MLX-skills

Length of output: 50411


🏁 Script executed:

#!/bin/bash
set -u

printf '%s\n' '--- candidate PR metadata and descriptions ---'
for n in 3912 3913 3918 3919 3920 3922 3924; do
  printf '\nPR #%s\n' "$n"
  gh api "repos/ml-explore/mlx/pulls/$n" \
    --jq '{number,created_at,state,merged,closed_at,merged_at,merge_commit_sha,title,labels:[.labels[].name],body}' \
    2>&1 || true
done

printf '%s\n' '--- changed paths for likely candidates ---'
for n in 3918 3922 3924; do
  printf '\nPR #%s files\n' "$n"
  gh api --paginate "repos/ml-explore/mlx/pulls/$n/files?per_page=100" \
    --jq '.[] | .filename' 2>&1 || true
done

Repository: hbmartin/Foundation-Models-and-Core-AI-and-MLX-skills

Length of output: 23781


Change the NAX count to three and narrow the absence claim.

The cited correctness PRs are #3912, #3922, and #3924. Do not count #3918; it is a performance change. Replace “four” with “three” in all three passages. State only that these PRs are absent from MLX checkout 973e27f; release absence is not established.

📍 Affects 3 files
  • guides/part-12-mlx-python/README.md#L31-L32 (this comment)
  • guides/part-12-mlx-python/references/01-core-fundamentals.md#L122-L123
  • guides/part-12-mlx-python/references/02-numerics-hardware-gating-and-custom-kernels.md#L101-L104
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@guides/part-12-mlx-python/README.md` around lines 31 - 32, Update all three
passages to count only correctness PRs `#3912`, `#3922`, and `#3924`, changing “four”
to “three” and excluding performance PR `#3918`. In
guides/part-12-mlx-python/README.md lines 31-32,
guides/part-12-mlx-python/references/01-core-fundamentals.md lines 122-123, and
guides/part-12-mlx-python/references/02-numerics-hardware-gating-and-custom-kernels.md
lines 101-104, state only that these PRs are absent from MLX checkout 973e27f;
remove any claim about release absence.

`else`* in `tile_matmad_nax` that compiles odd tile shapes to nothing and produces garbage. Second version axis:
**PyPI mlx-lm 0.31.3 is dated 2026-04-22 and `main` has moved substantially past it**, so several fixes here are
unreleased — and **0.31.0 was pulled from practical use** for a `BatchKVCache` cross-contamination bug.
Expand Down Expand Up @@ -104,8 +104,8 @@ hardcoded in MLX's NAX matmul kernel while the host gates `float32` on `MLX_ENAB
> ⚠️ **SILENT FAILURE — TF32 you did not choose (§3.3).** Community measurements in mlx#3860 put M5 `float32`
> matmul error at **2^-10.4** versus **2^-19.8** with `MLX_ENABLE_TF32=0`; `x.dtype` still says `float32`,
> because it is — only the multiply-accumulate is relaxed. **Set `MLX_ENABLE_TF32=0` before importing mlx in any
> test suite**, which is exactly what MLX's own harness does. A warn-once PR (#3883) and a docs PR (#3894) were
> both open as of 2026-07-29.
> test suite**, which is exactly what MLX's own harness does. A docs PR (#3894) remains open as of 2026-08-03;
> the warn-once PR (#3883) was closed unmerged 2026-08-03.
>
> ⚠️ **SILENT FAILURE — fused attention silently becomes unfused (§5).**
> `mx.fast.scaled_dot_product_attention` returns the mathematically correct answer via `matmul → softmax →
Expand Down
4 changes: 2 additions & 2 deletions guides/part-12-mlx-python/references/01-core-fundamentals.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ Two markers you will see constantly:

The clone's HEAD is `973e27f` ("[CUDA] Fix grid overflow in gemm conv unfold kernels…", PR #3893).
**Four NAX correctness fix PRs opened in the three days before 2026-07-27, and none is in
this checkout — nor in any other: all three were still open, unmerged, on a 2026-07-31 `gh`
re-check:** PRs **#3912** (fp quantized matmul corruption when the quantized dimension is not a
this checkout — nor in any other: #3912/#3922 still open, #3924 closed unmerged, on a 2026-08-03
`gh` re-check:** PRs **#3912** (fp quantized matmul corruption when the quantized dimension is not a
multiple of 32), **#3922** (sorted `gather_qmm` NAX boundary handling), and **#3924** — one of which
is a *missing `else`* in `tile_matmad_nax` that silently miscompiles odd tile shapes. We grepped:
`tile_matmad_nax` is present at `mlx/backend/metal/kernels/steel/gemm/nax.h:825` and called from
Expand Down
Loading