Skip to content

Probe: sub-pel interpolation = a BF16 16×16 tile op (HEVC 8-tap, measured on real AMX)#235

Merged
AdaWorldAPI merged 1 commit into
masterfrom
claude/subpel-tap-tile
Jul 4, 2026
Merged

Probe: sub-pel interpolation = a BF16 16×16 tile op (HEVC 8-tap, measured on real AMX)#235
AdaWorldAPI merged 1 commit into
masterfrom
claude/subpel-tap-tile

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

The next measurement from the HEVC amortization map (#234): HEVC fractional-pel motion compensation applies a separable 8-tap FIR (half-pel luma taps [-1, 4, -11, 40, 40, -11, 4, -1] / 64). An FIR is a linear operator, so filtering a 16×16 block is a matrix product — one bf16_tile_gemm_16x16 per pass. The full separable H+V is Hᵀ·(X·H): the same two-tile "sandwich" shape as the splat covariance projection (Mᵀ·Σ·M, #233) and the codec transform (M·X, #232).

Measured — real AMX

This host: AMX TDPBF16PS, amx_available = true. Checked against a direct 8-tap FIR f64 reference using the same 16×16 band operator (reflected edges), so only BF16 rounding differs:

pass op count Frobenius rel err
horizontal 8-tap X·H 1 tile op 0.157%
separable H+V Hᵀ·(X·H) 2 tile ops 0.215%
throughput 1.22 M tile-ops/s

Both hard asserts pass (rel err < BF16 tolerance).

Why it matters

Fractional-pel motion is "just another tile op" — closing the MC story past integer-pel (M1 handled integer-pel gather; this handles the sub-pel filter). Combined with #230#233, five HEVC DSP stages now measured onto the one BF16 tile primitive.

Honesty / R-5: this shows the equivalence (FIR == tile GEMM), not that the tile path is the right dispatch for a single block. Per the R-5 rule, a per-block 8-tap butterfly wins below the per-arch batch crossover (SPR 64, ICX 32, …); the batched tile GEMM wins above it. Ship both, dispatch on N.

x86-gated via the same #[cfg(target_arch = "x86_64")] mod amx + non-x86 fallback-main pattern as #233; canonical ndarray::simd::* imports; cargo fmt --check + cargo clippy clean, feature-gated required-features = ["std"].

Run: cargo run --release --example subpel_tap_tile --features std

🤖 Generated with Claude Code


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@AdaWorldAPI, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 25 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 38d6bf78-5828-484e-8ba6-c6774419995b

📥 Commits

Reviewing files that changed from the base of the PR and between bbca88e and d6c9e1c.

📒 Files selected for processing (2)
  • Cargo.toml
  • examples/subpel_tap_tile.rs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AdaWorldAPI AdaWorldAPI force-pushed the claude/subpel-tap-tile branch 2 times, most recently from beb7142 to a075a58 Compare July 4, 2026 10:58
…VC 8-tap)

Next probe from the HEVC amortization map: HEVC fractional-pel motion
compensation applies a separable 8-tap FIR (half-pel luma taps
[-1,4,-11,40,40,-11,4,-1]/64). An FIR is a linear operator, so filtering a
16×16 block is a matrix product — one bf16_tile_gemm_16x16 per pass, and the
full separable H+V is Hᵀ·(X·H): the SAME two-tile sandwich shape as the splat
covariance projection (Mᵀ·Σ·M, #233) and the codec transform (M·X, #232).

Measured on real AMX (this host: AMX TDPBF16PS, amx_available = true), vs a
direct 8-tap FIR f64 reference (same 16×16 band operator, reflected edges, so
only BF16 rounding differs):

  (1) horizontal 8-tap  out = X·H       frobenius_rel_err = 0.157%  (one tile op)
  (2) separable H+V     out = Hᵀ·(X·H)  frobenius_rel_err = 0.215%  (two tile ops)
  (3) throughput: 1.22 M sub-pel tile ops/s

Both asserts pass (rel err < BF16 tolerance). Fractional-pel motion is therefore
"just another tile op", closing the MC story past integer-pel. R-5 dispatch noted
(per-block 8-tap butterfly below the batch crossover, batched tile GEMM above).

x86-gated via the same `mod amx` / non-x86 fallback-main pattern as
gridlake_field_tile; canonical ndarray::simd imports; fmt + clippy clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
@AdaWorldAPI AdaWorldAPI force-pushed the claude/subpel-tap-tile branch from a075a58 to d6c9e1c Compare July 4, 2026 11:03
@AdaWorldAPI AdaWorldAPI merged commit 7fc5427 into master Jul 4, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants