mixle.engines.build_kernels moduleΒΆ

Optionally compile the FMA double-double kernels (mixle.engines._dd_kernels).

mixle imports and runs fine WITHOUT any compiled extension (mixle.engines.extended falls back to the pure-numpy double-double path). Calling compile_dd_kernels() builds the optional accelerator in place; afterwards dd_dot automatically uses it (~3x via hardware FMA). Requires Cython + a C compiler. A future pyproject build-system hook can build this on pip install; keeping it on-demand avoids a hard compiler dependency.

compile_dd_kernels(force=False)[source]

Cythonize + compile _dd_kernels.pyx in place; returns the built extension path.

Raises ImportError if Cython/numpy build tooling is missing, or a build error otherwise.

Parameters:

force (bool)

Return type:

str

dd_kernels_available()[source]

True if the compiled FMA double-double kernels are importable.

Return type:

bool

compile_bitpacked_kernels(force=False)[source]

Cythonize + compile _bitpacked.pyx (popcount binary/ternary GEMM) in place; uses hardware popcount.

Parameters:

force (bool)

Return type:

str

bitpacked_kernels_available()[source]

True if the compiled popcount binary/ternary kernels are importable.

Return type:

bool

compile_lns_kernel(force=False)[source]

Cythonize + compile _lns_kernel.pyx (the integer log-sum-exp tree fold) in place.

Parameters:

force (bool)

Return type:

str

lns_kernel_available()[source]

True if the compiled integer log-sum-exp kernel is importable.

Return type:

bool