Skip to content

Make BLAS optional so a program using lev starts without it - #8

Merged
yogthos merged 2 commits into
mainfrom
optional-blas
Oct 15, 2026
Merged

yogthos merged 2 commits into
mainfrom
optional-blas

Conversation

@yogthos

@yogthos yogthos commented Oct 15, 2026

Copy link
Copy Markdown
Member

A program that uses lev as a library (newsroom, for a TinyDecide pre-filter) refused to start on any linux host without OpenBLAS, since the blas native was required, and on Windows, which has no BLAS, at all.

  • blas is :optional, with libblas.so.3 (reference CBLAS, or OpenBLAS where the alternatives point it there) as the linux fallback.
  • lev_kernels' static archive is declared by platform, so a Windows build links none.
  • lev.tensors/available? says whether the kernels and a BLAS are loaded; tinydecide/load-release refuses with :model-unavailable when they are not.
  • README: the optional BLAS, and that a git dep runs jolt kernels in its gitlib checkout (jolt has no prep step).

Checked with a jolt build binary (jolt 0.8.22) on linux: OpenBLAS 40 ms a question; reference libblas the same probabilities at 520 ms; no BLAS at all starts, available? false, load-release refuses. tinydecide, tokenizer, sequence, lang, clef and llm tests unchanged.

The blas native is optional, with libblas.so.3 as the linux fallback, and
the kernels archive is linked by platform so a Windows build links none.
lev.tensors/available? says whether the kernels and a BLAS are loaded, and
tinydecide/load-release refuses with :model-unavailable when they are not.
@yogthos
yogthos merged commit 5a2038b into main Oct 15, 2026
2 checks passed
@yogthos
yogthos deleted the optional-blas branch October 15, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant