Commit dfa25a6
committed
fix(backend): add missing cfg gate on mkl re-export + CBLAS-compat aliases
The `pub use mkl::{ gemm_f32, ... }` block at line 36 was missing its
`#[cfg(feature = "intel-mkl")]` gate, causing compilation failure when
`intel-mkl` feature was off (the default). Added the gate.
Also:
- Made `native` module public (`pub mod native` instead of `mod native`)
so consumers can reach `ndarray::backend::native::gemm_f32` directly
- Added `cblas_sgemm` / `cblas_dgemm` aliases that always route through
the native SIMD-dispatched kernels — code written against MKL/OpenBLAS
CBLAS can switch to these with zero logic changes
Consumer paths:
- `ndarray::backend::gemm_f32(...)` — auto-dispatched (mkl > openblas > native)
- `ndarray::backend::cblas_sgemm(...)` — always native SIMD (drop-in MKL replacement)
- `ndarray::backend::native::gemm_f32(...)` — explicit native path
https://claude.ai/code/session_01NYGrxVopyszZYgLBxe4hgj1 parent ccf5b77 commit dfa25a6
1 file changed
Lines changed: 40 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
| |||
164 | 171 | | |
165 | 172 | | |
166 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
0 commit comments