Knowledge: HEVC/H.265 amortization map onto the BF16 16×16 AMX tile substrate#234
Conversation
|
Warning Review limit reached
Next review available in: 30 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a new knowledge document ChangesHEVC Amortization Knowledge Document
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 496bc458e4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| stored per-block (helix principle). Every block pays only: a gather + 1–2 tile | ||
| ops + a residue magnitude. The 64×64 gridlake = 4×4 = **16 tile ops**. |
There was a problem hiding this comment.
Preserve the DCT/GEMM batch crossover
When the transform stage has fewer than 64 contiguous blocks, this unconditional per-block tile-cost claim contradicts the companion plan’s R-5 rule: .claude/knowledge/pr-x12-codec-cognitive-substrate-mapping.md:188-194 says per-block butterflies win and GEMM only wins above the batch crossover, and pr-x12-substrate-canon-resolutions.md:411-418 pins the dispatch at N < 64 butterfly / N >= 64 batched GEMM. Leaving this ledger as “every block pays” 1–2 tile ops can steer small-CTU or low-latency experiments to the BF16 tile path and invalidate the measurements; please carry the R-5 threshold into this summary.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with 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.
Inline comments:
In @.claude/knowledge/hevc-amortization-map.md:
- Around line 6-7: The status ledger in the hevc-amortization-map table uses
inconsistent vocabulary: the legend only defines MEASURED, MECHANISM, and
DOESN'T FIT, but later rows use SHIPPED and MECHANISM — shipped. Update the
taxonomy so it is internally consistent by either adding SHIPPED to the legend
or remapping those rows to one of the existing status symbols, and make the same
fix anywhere the table entries use the inconsistent labels.
- Around line 32-33: The palette-based entropy layer is being presented as if it
is already part of the current codec contract, but the existing
`src/hpc/codec/mod.rs` and `src/hpc/codec/ans.rs` docs still describe the
shipped x265-shaped taxonomy and static per-block rANS path. Update the affected
sections by clearly labeling `ndarray::palette_codec` / `nibble` / `byte_scan`
as proposal or future work, and tighten the wording so it does not claim a fully
parallel end-to-end replacement while later describing a light rANS pass.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 4b2c58f3-8530-4748-8a41-14c3252c7ee9
📒 Files selected for processing (1)
.claude/knowledge/hevc-amortization-map.md
- codex P2 (R-5 crossover): the tile path is NOT unconditional per block. Carry the R-5 dispatch rule — per-block WHT butterflies win below the batch crossover (~400× for a 32×32 DCT), batched BF16 tile GEMM only wins above it; crossover per-arch (SPR=64, ICX=32, Zen4=96, Apple M=256, Graviton=128). Ship both, dispatch on N. Removes the misleading "every block pays a tile op". - coderabbit (status vocab): add SHIPPED + PARTIAL to the legend so the table's tags match the declared taxonomy. - coderabbit (palette proposal vs contract): label the palette-index entropy layer as SHIPPED module / PROPOSED codec wiring — the shipped codec uses hpc::codec::ans static rANS over the 4 CellMode tags today. Fix the "fully parallel end to end" vs "light rANS" tension: the substrate has no context-adaptive serial stage; an optional non-adaptive order-0 rANS over the packed indices is interleavable, not a CABAC dependency chain. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
- codex P2 (R-5 crossover): the tile path is NOT unconditional per block. Carry the R-5 dispatch rule — per-block WHT butterflies win below the batch crossover (~400× for a 32×32 DCT), batched BF16 tile GEMM only wins above it; crossover per-arch (SPR=64, ICX=32, Zen4=96, Apple M=256, Graviton=128). Ship both, dispatch on N. Removes the misleading "every block pays a tile op". - coderabbit (status vocab): add SHIPPED + PARTIAL to the legend so the table's tags match the declared taxonomy. - coderabbit (palette proposal vs contract): label the palette-index entropy layer as SHIPPED module / PROPOSED codec wiring — the shipped codec uses hpc::codec::ans static rANS over the 4 CellMode tags today. Fix the "fully parallel end to end" vs "light rANS" tension: the substrate has no context-adaptive serial stage; an optional non-adaptive order-0 rANS over the packed indices is interleavable, not a CABAC dependency chain. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
a2b5974 to
651e14b
Compare
…ubstrate The durable ledger for the operator's thesis: use the BF16 16×16 AMX GEMM / blasgraph neighborhood / Morton-tile pyramid / perturbation-shader cascade to amortize H.265/HEVC — the per-block cost collapsing to a gather (bit shift) + one TDPBF16PS tile op over a deterministic pyramid built once. Maps every HEVC DSP stage to the substrate primitive, each row tagged MEASURED (#PR) / MECHANISM-unmeasured (probe named) / DOESN'T-FIT: - Motion estimation/compensation → i8/bf16 GEMM + gather [MEASURED #230] - Inverse transform → separable tile GEMM; WHT no-op [MEASURED #232] - Intra prediction / covariance → field-coupling tile op [MEASURED shape #233] - Sub-pel interpolation (8-tap) → separable tile GEMM [MECHANISM — probe] - CTU quad-tree → Morton/HHTL cascade [MECHANISM — shipped] - Deblock/SAO → masked tile op + LUT (the "AMX masking") [PARTIAL — masking] - CABAC entropy → serial arithmetic coding [DOESN'T FIT] Two honest boundaries recorded: (1) CABAC is not a GEMM — the entropy layer is the M2 serial front-end the tile substrate does not amortize; (2) the golden-spiral codec is for directional/sparse data, not dense scalar residuals (#231, measured negative). Cross-repo tie grounded: OGAR's perturbation pyramid IS the Walsh-Hadamard transform of the address tree = the same WHT #232 measured as the codec transform. Includes a probe queue (subpel_tap_tile, intra_angular_tile, deblock_masked_tile, CTU routing parity, M2 CABAC). Anchors: PRs #230–#233; hpc::bf16_tile_gemm, splat3d::spd3, cascade, codec; blasgraph HHTL; OGAR perturbation pyramid. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
…utes around CABAC) The Pumpkin/Minecraft palette ops (ndarray::palette_codec / nibble / byte_scan, 69 tests) complete the amortization: the substrate quantises to a small palette (≤256 basin/centroid indices), so its native entropy layer is variable-width SIMD palette packing (unpack_indices_simd, VPSHUFB, 16 idx/cycle; transcode = per-block bit-width adaptivity) — fully parallel, not a serial arithmetic coder. Refines the CABAC boundary: CABAC is still needed to decode an EXISTING .265 stream (M2 serial front-end), but a substrate-NATIVE codec doesn't need it — the whole native encode+decode pipeline is parallel end to end: gather + tile op + palette-pack, no serial stage. The boundary is .265 compatibility, not the substrate's own entropy needs. (Palette pack is a rate/parallelism trade; a light rANS on the packed indices recovers the rest.) Adds an entropy row to the stage map + the three-layer table, and updates the honest-boundaries + anchors sections. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
- codex P2 (R-5 crossover): the tile path is NOT unconditional per block. Carry the R-5 dispatch rule — per-block WHT butterflies win below the batch crossover (~400× for a 32×32 DCT), batched BF16 tile GEMM only wins above it; crossover per-arch (SPR=64, ICX=32, Zen4=96, Apple M=256, Graviton=128). Ship both, dispatch on N. Removes the misleading "every block pays a tile op". - coderabbit (status vocab): add SHIPPED + PARTIAL to the legend so the table's tags match the declared taxonomy. - coderabbit (palette proposal vs contract): label the palette-index entropy layer as SHIPPED module / PROPOSED codec wiring — the shipped codec uses hpc::codec::ans static rANS over the 4 CellMode tags today. Fix the "fully parallel end to end" vs "light rANS" tension: the substrate has no context-adaptive serial stage; an optional non-adaptive order-0 rANS over the packed indices is interleavable, not a CABAC dependency chain. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
651e14b to
af72945
Compare
What
The durable ledger for the thesis — use the BF16 16×16 AMX GEMM / blasgraph neighborhood / Morton-tile pyramid / perturbation-shader cascade to amortize H.265/HEVC. It maps every HEVC DSP stage to the substrate primitive (gather + one
TDPBF16PStile op over a deterministic pyramid built once), with every row tagged MEASURED / MECHANISM-unmeasured / DOESN'T-FIT — no unmarked conjecture.The map
subpel_tap_tileTwo honest boundaries (recorded, not glossed)
Grounding
Cross-repo tie confirmed in code: OGAR's perturbation pyramid is the Walsh–Hadamard transform of the address tree (
OGAR/CLAUDE.md, Bipolar-phase pyramid) = the same WHT #232 measured as the codec transform. The perturbation-shader cascade and the codec transform are one object.Anchors: PRs #230–#233 (all measured, #233 on real
TDPBF16PS);hpc::bf16_tile_gemm,hpc::splat3d::spd3,hpc::cascade,hpc::codec; lance-graph blasgraph HHTL. Includes a probe queue for the unmeasured stages.Docs-only; no code change.
🤖 Generated with Claude Code
Generated by Claude Code
Summary by CodeRabbit