Repository navigation
Patch ndarray to AdaWorldAPI fork for SIMD polyfill access - #2
Conversation
…yfill Adds a [patch.crates-io] entry pointing ndarray at the AdaWorldAPI fork (git, master branch, so it resolves in any checkout including CI). The fork is API-compatible (same 0.17.2) but carries an additional simd/hpc module (crate::simd::F32x16, AVX-512/AVX2/NEON/scalar tier dispatch) that tract's own linalg kernels can be wired to later. This patch alone changes no behavior; tract's element-wise/reduce kernels still use their existing intrinsics path until a follow-up adds a parallel, non-overlapping kernel registration that calls into it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012wrzeZAdwGYTCKoxamwQht
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_6306fdc6-ea06-4c80-84bd-8a3ae8756af9) |
|
CI is red on the
I can't resolve this unilaterally in either direction: lowering the fork's MSRV is out of scope here (it's a deliberate cross-repo pin), and raising Leaving this PR in draft, blocked on that decision, until directed how to proceed (bump tract's MSRV to 1.97, or hold this patch until the fork exposes a lower-MSRV-compatible path). Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ed00742961
ℹ️ 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".
CI was failing across the whole 1.91 matrix because the ndarray fork patched in by the previous commit requires rustc 1.97 (its rust-toolchain.toml is permanently pinned there for AdaWorldAPI-stack alignment). CI derives its tested toolchain straight from Cargo.toml's rust-version, so bumping that one field re-targets every job at once; updated the README rustc badge to match per the comment above that field. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012wrzeZAdwGYTCKoxamwQht
Both api/rs/deny.toml and cli/deny.toml gate git dependencies with an allow-git list that only permitted rustformers/llm; the ndarray patch resolves ndarray/fractal/p64 from AdaWorldAPI/ndarray, which the cargo-deny CI job would otherwise reject. Also trimmed the patch.crates-io comment to the current constraint (why the git pin exists) instead of narrating a follow-up change that hasn't happened. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012wrzeZAdwGYTCKoxamwQht
Points
ndarrayat the AdaWorldAPI fork (git,masterbranch) via[patch.crates-io], so tract resolves against the fork instead of upstream crates.io ndarray 0.17.The fork is API-compatible (same
0.17.2) but adds asimd/hpcmodule (crate::simd::F32x16etc.) behind aLazyLock-cached AVX-512 → AVX2 → NEON → scalar dispatch tier. This PR only wires the dependency — it changes no runtime behavior, since none of tract's existing linalg kernels call into the new module yet. tract's own SIMD is two distinct layers: hand-written assembly GEMM microkernels (linalg/x86_64/**/*.S.j2), out of scope here, and intrinsics-based element-wise/reduce/activation kernels (linalg/src/frame/*,linalg/src/x86_64/*), which are the actual candidate for a follow-up that registers a second, non-overlapping kernel implementation callingndarray::simd::*alongside (never replacing) the existing hand-tuned ones.Verified with
cargo check -p tract-data -p tract-coreagainst the patched dependency;cargo fmt --allclean.🍍
Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
https://claude.ai/code/session_012wrzeZAdwGYTCKoxamwQht
Generated by Claude Code