simd: surface the runtime-dispatch trampolines through ndarray::simd::* (W1a polyfill conformance)#238
Conversation
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
|
Warning Review limit reached
Next review available in: 48 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. 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 |
Bugbot couldn't run - usage limit reachedBugbot 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) |
The W1a consumer invariant is "all SIMD from
ndarray::simd" — but thesimd_runtimetrampolines (matmul_bf16_to_f32,matmul_f32,gemm_u8_i8,vnni_dot_u8_i8,matmul_i8_to_i32) were only reachable asndarray::simd_runtime::*, forcing consumers (the tesseract-rs recognizer's int8 GEMM among them) off the canonical polyfill import path.ndarray::simd::*behind theruntime-dispatchfeature.matmul_i8_to_i32handled carefully: onx86_64 + stdthe name already exists insimd::(thehpc::amx_matmulre-export — the IDENTICAL function thesimd_runtimewrapper#[inline(always)]-aliases), so the trampoline re-export is gatednot(target_arch = "x86_64")— arch-uniform import path, no name collision.pub fnin anysimd_*.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