feat(simd): re-export AMX/VNNI int8 GEMM (matmul_i8_to_i32) through simd.rs#216
Conversation
…imd.rs
Surface hpc::amx_matmul::{matmul_i8_to_i32, amx_available} via the canonical
ndarray::simd::* consumer entry (W1a "all SIMD from ndarray::simd"), std-gated.
This lets a consumer reach the full int8 dispatch ladder -- AMX TDPBUSD tile
(byte-asm, 16384 MAC/instr, Sapphire Rapids+) -> AVX-512 VPDPBUSD -> AVX-VNNI ->
scalar, bit-identical across tiers -- without dipping into hpc::amx_matmul
directly. Additive re-export only; no behaviour change.
Consumed by turbovec's ndarray::simd-routed polyfill scan
(lance-graph-turbovec), which scores TurboQuant as a batched int8 GEMM so the
SIMD/AMX backend selection lives in ndarray, not the consumer.
https://claude.ai/code/session_01D2WSmezQBNC3bUdHuGfGmo
|
Warning Review limit reached
More reviews will be available in 24 minutes and 18 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 38122a035c
ℹ️ 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".
| #[cfg(feature = "std")] | ||
| pub use crate::hpc::amx_matmul::{amx_available, matmul_i8_to_i32}; |
There was a problem hiding this comment.
Gate the AMX re-export on x86_64
On any std build for a non-x86_64 target, this import refers to crate::hpc::amx_matmul, but src/hpc/mod.rs only declares amx_matmul under #[cfg(target_arch = "x86_64")]. Since src/lib.rs still compiles pub mod simd for all std targets, default aarch64/wasm/s390x builds now fail with an unresolved import before consumers can use the crate. Please add the same target_arch = "x86_64" gate here or route to a portable wrapper.
Useful? React with 👍 / 👎.
Surface hpc::amx_matmul::{matmul_i8_to_i32, amx_available} via the canonical
ndarray::simd::* consumer entry (W1a "all SIMD from ndarray::simd"), std-gated.
This lets a consumer reach the full int8 dispatch ladder -- AMX TDPBUSD tile
(byte-asm, 16384 MAC/instr, Sapphire Rapids+) -> AVX-512 VPDPBUSD -> AVX-VNNI ->
scalar, bit-identical across tiers -- without dipping into hpc::amx_matmul
directly. Additive re-export only; no behaviour change.
Consumed by turbovec's ndarray::simd-routed polyfill scan
(lance-graph-turbovec), which scores TurboQuant as a batched int8 GEMM so the
SIMD/AMX backend selection lives in ndarray, not the consumer.
https://claude.ai/code/session_01D2WSmezQBNC3bUdHuGfGmo