Skip to content

simd: surface the runtime-dispatch trampolines through ndarray::simd::* (W1a polyfill conformance)#238

Merged
AdaWorldAPI merged 1 commit into
masterfrom
claude/happy-hamilton-0azlw4
Jul 7, 2026
Merged

simd: surface the runtime-dispatch trampolines through ndarray::simd::* (W1a polyfill conformance)#238
AdaWorldAPI merged 1 commit into
masterfrom
claude/happy-hamilton-0azlw4

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

The W1a consumer invariant is "all SIMD from ndarray::simd" — but the simd_runtime trampolines (matmul_bf16_to_f32, matmul_f32, gemm_u8_i8, vnni_dot_u8_i8, matmul_i8_to_i32) were only reachable as ndarray::simd_runtime::*, forcing consumers (the tesseract-rs recognizer's int8 GEMM among them) off the canonical polyfill import path.

  • Re-exports the trampolines under ndarray::simd::* behind the runtime-dispatch feature.
  • matmul_i8_to_i32 handled carefully: on x86_64 + std the name already exists in simd:: (the hpc::amx_matmul re-export — the IDENTICAL function the simd_runtime wrapper #[inline(always)]-aliases), so the trampoline re-export is gated not(target_arch = "x86_64") — arch-uniform import path, no name collision.
  • Pure re-exports of the same tier ladders — bit-identical by construction; no new pub fn in any simd_*.rs, so the W1a three-backend ceremony is not triggered (contract doc consulted).

Verified: builds with and without runtime-dispatch; 233 simd lib tests green; clippy -D warnings + fmt clean; the companion tesseract-rs consumer flip reproduces its byte-parity E2E regression (qLLiy,,) unchanged through the new path.

Companion: the tesseract-rs PR flipping the recognizer import.

🤖 Generated with Claude Code

https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1


Generated by Claude Code

The W1a consumer invariant is "all SIMD from ndarray::simd", but the
simd_runtime trampolines (matmul_bf16_to_f32, matmul_f32, gemm_u8_i8,
vnni_dot_u8_i8, matmul_i8_to_i32) were only reachable as
ndarray::simd_runtime::* -- forcing consumers (the tesseract-rs
recognizer's int8 GEMM among them) off the canonical polyfill import
path. Re-export them under simd:: behind the runtime-dispatch feature.

matmul_i8_to_i32 needs care: on x86_64+std the name already exists in
simd:: (the hpc::amx_matmul re-export -- the IDENTICAL function the
simd_runtime wrapper #[inline(always)]-aliases), so the trampoline
re-export is gated not(target_arch = "x86_64") to make the import path
arch-uniform without a name collision. Pure re-exports of the same
tier ladders -- bit-identical by construction, no new pub fn in any
simd_*.rs, so the W1a three-backend ceremony is not triggered.

Verified: builds with and without runtime-dispatch; 233 simd lib tests
green; clippy -D warnings + fmt clean; the tesseract-rs consumer flip
reproduces its byte-parity E2E regression ("qLLiy,,") through the new
path unchanged.

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

coderabbitai Bot commented Jul 7, 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: 48 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: b97db160-4b08-4bbc-80c8-5e8f5a0a44f9

📥 Commits

Reviewing files that changed from the base of the PR and between 8368ca5 and 07a7a03.

📒 Files selected for processing (1)
  • src/simd.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.

@cursor

cursor Bot commented Jul 7, 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_51b8d912-82f3-4532-8fab-5ff54c5dcc60)

@AdaWorldAPI AdaWorldAPI merged commit 83d4895 into master Jul 7, 2026
18 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