Skip to content

Document array_windows/array_chunks' role in the GEMM numbers - #298

Merged
AdaWorldAPI merged 1 commit into
masterfrom
claude/ndarray-simd-tract-o3jfrn
Sep 4, 2026
Merged

Document array_windows/array_chunks' role in the GEMM numbers#298
AdaWorldAPI merged 1 commit into
masterfrom
claude/ndarray-simd-tract-o3jfrn

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Sep 4, 2026

Copy link
Copy Markdown
Owner

What

Documents on the public README that the 512x512/1024x1024 GEMM Performance table rows depend on simd_ops::array_windows/array_windows_checked + array_chunks (paired with the polyfilled mul_add/add_mul_* FMA primitives), not just Goto-algorithm cache blocking alone.

Why

This was previously only documented internally (.claude/knowledge/agnostic-surface-cpu-matrix.md), not on the public README. It's real, measured functionality: array_windows was benchmarked per-call against both the original C blasgraph kernel and an actual Cranelift JIT — roughly 7 ns (original C blasgraph) vs 12 ns (Cranelift JIT) vs 17 ns (static array_windows microkernel) — landing close to the JIT's throughput without paying for a JIT (compile latency, codegen complexity, dependency).

What this is not

Documentation-only — no code changes.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_012wrzeZAdwGYTCKoxamwQht

🤖 Generated with Claude Code

https://claude.ai/code/session_012wrzeZAdwGYTCKoxamwQht


Generated by Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated the GEMM performance documentation with benchmark requirements for supported Rust features and FMA primitives.
    • Added per-call timing comparisons against the original C BLAS implementation and a Cranelift JIT loop.
    • Documented how removing the relevant windowing support could affect performance and cache behavior.

The 512x512/1024x1024 GEMM Performance table rows were previously
attributed only to the Goto-algorithm cache blocking, but the actual
microkernel also depends on simd_ops::array_windows/array_chunks
paired with the polyfilled mul_add/add_mul_* FMA primitives -- the
same blocking/window discipline the original C blasgraph kernels used
for cache-line-exact reuse at these sizes. Measured per-call against
both alternatives: ~7 ns original C blasgraph, ~12 ns Cranelift JIT,
~17 ns static array_windows microkernel -- close to the JIT without
paying for one. Not previously called out on the public README.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wrzeZAdwGYTCKoxamwQht
@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Pull request is closed - (🔄 Check again to try again)

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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

@cursor

cursor Bot commented Sep 4, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_87570fad-c663-4d9f-9e22-4d28d6a0731f)

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review September 4, 2026 14:08
@AdaWorldAPI
AdaWorldAPI merged commit f7a4566 into master Sep 4, 2026
19 of 20 checks passed
AdaWorldAPI pushed a commit that referenced this pull request Sep 4, 2026
PR #298 claimed the 512x512/1024x1024 GEMM numbers depend on
simd_ops::array_windows/array_chunks. Tracing the actual call graph
(backend::native::gemm_f32 -> matrixmultiply crate's Goto algorithm;
simd_ops::gemm_f64_tiled -> fixed TILE=64 blocking with F64x8
register accumulation) shows neither path calls array_windows or
array_chunks at all -- their only production call site is
hpc::blake3's 64-byte block chunking. Corrected the README to
describe the GEMM kernels' real mechanism and to attribute
array_windows/array_chunks to where they're actually used, without
losing the real (separately verified) array_windows-vs-JIT latency
finding.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wrzeZAdwGYTCKoxamwQht
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