clio-ml trains classic and neural models directly on data held in the CTE. Every algorithm is the same shape: per-row math over pages, block-private partial results, and an ordered reduction, wrapped in a runtime module so a fit can run on every node at once.
Algorithms
about 30
Backends
GPU or CPU, same math
Unit of work
one page
A fit is broadcast to every node, runs over local pages, and reduces in a fixed order.
Datasets are pages
A dataset is a page-aligned, row-major table of 32-bit floats stored in a memory-expansion vector. A page is the unit of work, and no row may straddle a page boundary, so the page must hold a whole number of rows; the dataset refuses a page size that does not. The vector is one CTE tag with one blob per page, named by the page's index. Data gets there through a host preload that writes every page, which is what the Python front end does, or through the CAE, which can serve page numbers over data it has ingested.
How a dataset is laid out
A worked example: a million 8-column rows become 1954 page blobs of one tag, and each of the 4 GPU blocks owns one contiguous run of them. The GPU holds only a 64-frame cache, far smaller than the 30 MiB dataset, so every pass is out of core. A page's cache set depends on the page, not on the block that asks for it, so the whole grid shares one copy.
One code path for GPU and CPU
The backend selects the GPU vector by default, or the CPU vector on host threads when the code is built with CLIO_ML_CPU=1. Both run the same per-row math in the same order, so a CPU fit and a GPU fit of one dataset agree to the bit wherever the host and device math libraries agree (operations that need it use exact exp/log routines).
One pass through the page cache
Each block walks its own pages through the shared cache: fetch and pin, hold, fold into a block-private partial, unpin. A block does not wait out a miss on the GPU: it parks, the runtime copies the page blob into its frame, and the host relaunches the block when that transfer completes. The host then sums the block partials in a fixed order, which is why eviction never changes the answer.
Deterministic reductions
Each GPU block computes its own partial result (sums, counts, gradients). Partials are combined in a fixed order instead of with global atomic adds. That is slightly more work, but it makes every run reproducible. A paged kernel that hits the yield driver's round cap throws instead of returning the result of a partly executed pass.
Each algorithm is a runtime module
Every algorithm (k-means, random forests, gradient boosting, PCA, LSTMs and more) is packaged as its own runtime module named clio_ml_<algo>_chimod. The modules share one container template; each algorithm adds only a short adapter that calls its fit function. Besides the standard create, destroy and monitor methods, each has a compute method that the client sends to every container at once with a broadcast query. Because it is an ordinary module, an algorithm is installed, composed and monitored like any other.
Training across a cluster
Each container opens its own shard of the dataset, named <tag>_n<container id>. Per-block partials are gathered from all nodes in node order, so a fit across N nodes is bit-identical to a single-node fit with N times as many blocks. When results come back, one model is kept and any replica that disagrees is flagged, which catches nondeterminism bugs.
Tradeoffs
Choice
Gain
Cost
Ordered reductions
Reproducible, bit-identical results across CPU, GPU and node counts
Slower than atomic accumulation
Page-aligned float32 rows
Simple, cache-friendly work units
Data must be float32, with a page size that holds whole rows