@@ -93,6 +93,36 @@ If you want to run the network tests, you can use the following command:
9393 pytest -m " network"
9494```
9595
96+ ## Matmul backend discovery
97+
98+ The fast ` blosc2.matmul ` path uses platform-specific block kernels:
99+
100+ - macOS: ` Accelerate `
101+ - Linux/Windows: runtime-discovered ` cblas `
102+ - fallback: portable ` naive ` kernel
103+
104+ For the runtime ` cblas ` backend, ` python-blosc2 ` probes the active Python/NumPy
105+ environment rather than linking to one BLAS vendor at build time. Discovery
106+ starts from NumPy's reported BLAS library directory when available, and then
107+ searches common library names in the active environment's ` lib ` directories.
108+
109+ On Linux the current candidates include ` libcblas ` , ` libopenblas ` ,
110+ ` libflexiblas ` , ` libblis ` , ` libmkl_rt ` , and generic ` libblas ` . A candidate is
111+ accepted only if it loads successfully and exports both ` cblas_sgemm ` and
112+ ` cblas_dgemm ` . If no suitable provider is found, the fast path falls back to
113+ the ` naive ` kernel.
114+
115+ Useful runtime helpers:
116+
117+ - ` blosc2.get_matmul_library() ` reports the selected runtime library when available
118+ - ` BLOSC_TRACE=1 ` logs candidate probing, rejection, selection, and backend fallback
119+
120+ Example:
121+
122+ ``` bash
123+ BLOSC_TRACE=1 python -c " import blosc2; print(blosc2.get_matmul_library())"
124+ ```
125+
96126## wasm32 / Pyodide developer workflow
97127
98128For the local wasm32 workflow (uv + pyodide-build + cibuildwheel + test loop),
0 commit comments