Decisions#
This log is the historical engineering record, kept for reference and for agents working in the codebase. The curated design pages live in the Design section.
Append-only log. Order = decision order. Caveman style. New entries at bottom.
1. Binning: quantile, with low-cardinality fallback#
BinMapper::fit per feature.
- Equal-frequency cuts at
k/max_bin-th quantiles.max_bin = 255default (uint8indices). - If
n_distinct < max_bin: one cut between each pair of consecutive distinct values. Bucket count =n_distinct. - Dedupe cut collisions (sentinel values like
0.0). Actual count<= max_bin, never exact. - Sampling from the start. Default sample 200K rows uniform random, fixed seed. Configurable. If column has
<= sample_sizerows, use full column. - Bin 0 reserved for missing. NaN + user-configured sentinel short-circuit to bin 0. Real values bins
1..n_bins-1. Quantile skips NaNs. BinMapperserializable. Round-trip through model file. Predict on new data reuses train boundaries exact.
Rejected: equal-width (skew kills it). Quantile sketch (overkill, swap in later). xgb per-node default direction (complicates split scoring).
Knock-on: bin count varies per feature, histogram reads n_bins[fid]. Bin 0 special, split scoring skips it for real-valued cuts. BinMapper ownership vs Dataset is next decision.
Defer: min_data_in_bin knob.
2. BinMapper independent of Dataset. Two-stage API.#
auto mappers = BinMappers::fit(train_source, cfg);
auto train = Dataset::bin(train_source, mappers, cfg);
auto val = Dataset::bin(val_source, mappers, cfg);
auto test = Dataset::bin(test_source, mappers, cfg);
BinMappersisstd::vector<BinMapper>plus minimal wrapper (count, serialize). Built once on train, immutable thereafter.Dataset::binis pure transform: takes source + mappers, returns binned column-major storage. No "training Dataset" vs "val Dataset" distinction.- Model file serializes
BinMappers. Predict-timeDatasetbuilds fresh from them.
Rejected: lgbm-style Dataset::from_csv(..., reference=train_ds). Couples mapper lifetime to a Dataset, awkward serialization, "training Dataset" becomes special.
Knock-on: train path is two calls instead of one. Trivial. bin is single-pass; fit does its own sampling + sort internally.
3. Trees store raw float thresholds, not bin indices#
Tree node split = (feature_id, threshold: float). Predict reads raw float from input row, compares directly. No binning at predict time.
TreeGrower finds the best split as (fid, bin_idx) during training, then converts to threshold = cuts[bin_idx] when writing the node. Conversion is one lookup per finalized split, free.
xgb + catboost do this. lgbm stores bin indices in tree nodes (and re-bins at predict, which is why lgbm forces the reference-Dataset dance).
Knock-on:
- Predict path doesn't need BinMappers. Single tree walk over raw floats.
- Model file: trees serialize directly, BinMappers optional in model file (kept for diagnostics + reproducibility, not load-bearing for predict).
- Training-time histogram code unchanged: still bins, still works on bin indices internally.
- Float threshold means tree comparison is < on float, not <= on int. Watch for off-by-one when comparing parity vs lgbm (different convention).
4. Dataset storage layout#
Column-major. Per-feature std::vector<uint16_t> (uniform width). Labels + weights owned by Dataset (weights empty if uniform). BinMappers held by value (not shared_ptr); ~30KB copy is trivial, no shared mutable state.
class Dataset {
std::vector<std::vector<uint16_t>> features_;
std::vector<float> labels_, weights_;
BinMappers mappers_;
std::vector<bool> is_categorical_; // Phase 4 placeholder
// n_rows, n_features
};
Public API: n_rows(), n_features(), labels(), weights(), mappers(), n_bins(fid), is_categorical(fid), feature_bins(fid) -> span<bin_id_t const>.
Rejected: std::variant<vector<uint8_t>, vector<uint16_t>> per feature to save ~50% on binned column memory. Saves ~45MB on YearPredictionMSD, ~308MB on Higgs. Neither pressure-tests modern hardware. Cost was variant dispatch complexity at every column scan via a visit_column wrapper. Rejected for MVP; reversible if a future dataset makes memory the bottleneck.
Group columns (ranking) deferred (non-goal).
5. (reserved)#
Originally visit_column for variant-aware column access. Dropped when decision 4 collapsed to uniform uint16_t storage. Renumbering decisions breaks references; left as a placeholder.
6. Readers: free function per format, returning Dataset#
Dataset read_csv (const std::string& path, const DataConfig&, const BinMappers&);
Dataset read_parquet(const std::string& path, const DataConfig&, const BinMappers&); // Phase 4+
Dataset read_libsvm (const std::string& path, const DataConfig&, const BinMappers&); // later
BinMappers fit_from_csv(const std::string& path, const Config&);
CLI dispatches on cfg.data.format string: if "csv" call read_csv else if "parquet" .... Each reader its own translation unit. Adding a new format = new file + new branch in CLI dispatch.
No Reader concept, no abstract base, no template plumbing. File loading is once-per-program, not hot-path; concepts buy nothing here. Internal shared helper per reader (CsvReader::columns(path, cfg) -> ColumnBatch) keeps read_csv and fit_from_csv from duplicating logic.
Phase 1 ships CSV only, hand-rolled (~50 LOC). Numeric-only is enough for YearPredictionMSD. No Arrow, no parquet.
Phase 4+: Arrow optional, gated by BONSAI_PARQUET=ON CMake flag. Arrow handles CSV multi-threaded + parquet + feather + IPC. Heavier dep (transitive thrift/snappy), so kept optional. Arrow is the reader layer only. Dataset (binned storage + BinMappers + labels/weights) is bonsai's; Arrow's Table is raw column data we'd copy or borrow from.
Rejected: Reader concept + Reader auto& template params for fit and bin. Over-engineered for once-per-program file loading. Free functions are the simpler shape.
Status 2026-09-17: read_csv and fit_from_csv were deleted; the CLI parses through detail::parse_input (csv or libsvm) and bins through Dataset::bin itself (src/cli/pipeline.cpp), the Python module never reads a file, and no Reader layer exists; parquet never shipped.
7. Determinism contract: fixed thread count, not cross-thread#
Same seed + same data + same thread count → same model bytes. Different thread counts: predictions within numerical tolerance, but bytes may differ.
What this rules in:
- Per-thread local histograms (no atomic FP adds: those are bit-unstable even at fixed thread count).
- Deterministic chunking (e.g., OpenMP schedule(static)).
- random_seed carries through samplers / shufflers.
What this rules out (relative to earlier framing):
- Promising cross-thread bit-exactness. The earlier draft demanded fixed-order merge (tid outer, bin inner) so the per-thread reduction shape didn't depend on thread count. Dropped: costs design constraints on ParallelBackend (must expose ordered reduction primitive) and forecloses OpenMP reduction(+:...) and std::execution reduce shapes.
Field check: XGBoost and CatBoost don't promise cross-thread determinism. LightGBM offers it behind deterministic=true +
force_col_wise|row_wise, and its own maintainers describe the
guarantee as fragile (RFC #6731). The pragmatic, industry-standard contract is "thread count is part of the reproducibility input."
Test contract:
- test_determinism_fixed_threads: two runs at n_threads=k for k ∈ {1, 4, 8} produce identical model files. Required to pass.
- test_determinism_cross_threads: predictions across different thread counts agree to numerical tolerance (e.g., max abs diff
< 1e-5 on YearPredictionMSD). Required to pass.
Knock-on:
- ParallelBackend does not need to expose "ordered reduction" as a primitive. parallel_for + thread-local accumulators is enough.
- The histogram's parallel-build description in architecture/2-histogram.md §"Parallel construction" reflects this: no fixed-tid-order requirement.
- Atomic FP adds remain forbidden, but for the bit-stability-at-fixed-N reason, not the cross-N reason.
8. Two trees in Phase 1: depth-wise + oblivious#
DepthwiseGrower → DenseTree and ObliviousGrower → ObliviousTree both ship in Phase 1. Proposal puts oblivious in Phase 4; pulled forward to force the Tree concept and TreeGrower::Tree associated type to be honest from day one.
The two tree types have structurally different on-disk shapes (flat node array vs per-level splits + leaf table) and structurally different predict kernels (walk-until-leaf vs fixed-depth branchless gather). With only depth-wise shipping, the second-tree-type machinery would be aspirational. Same rationale as logloss alongside MSE in Phase 1 (proposal §1).
Cost: one extra grower + one extra tree type of spine code, plus a second parity target (depth-wise vs xgboost/LightGBM, oblivious vs CatBoost). Both targets share YearPredictionMSD.
9. Tree is a concept; minimum surface = predict ×2 + diagnostics#
template <typename T>
concept Tree = requires(T const t,
std::span<float const> row,
std::span<float const> rows, size_t n_features,
std::span<float> out) {
{ t.predict(row) } -> std::same_as<float>;
{ t.predict(rows, n_features, out) } -> std::same_as<void>;
{ t.n_leaves() } -> std::convertible_to<size_t>;
{ t.depth() } -> std::convertible_to<size_t>;
};
Concept, not abstract base. Booster<Gr, ...>::trees_ is std::vector<typename Gr::Tree>, monomorphized. No vtable on predict.
Two predict overloads under one name (single-row returns float; batch fills out). Disambiguation by arity. Row-major batch input, matches xgb / lgbm. CatBoost's column-major fast path is motivated by predict- time rebinarization, which we don't do (decision 3: float thresholds). Oblivious can transpose-on-demand internally if profiling justifies.
Rejected: leaf_index(row) (DenseTree and ObliviousTree leaf-index spaces aren't unified; defer to Phase 4 if SHAP / leaf-output predict is wanted); walk(visitor) (no shared node shape between the two impls); serialization on the concept (lives in bonsai::io per decision 6).
10. Shrinkage is baked into leaf values at tree construction#
Grower receives learning_rate as a constructor argument (in TreeConfig) and writes lr · -G/(H + λ_l2) into leaves. Trees are pure functions of input rows; predict has no learning-rate knowledge. Matches xgboost, LightGBM.
Rejected: per-iteration learning_rate argument to grow() (Phase 1 doesn't need decay schedules; non-breaking to add later as a grow overload).
Knock-on: Tree concept doesn't carry a set_shrinkage mutator; trees are immutable post-construction.
11. ObliviousTree: per-level default_left, not per-node#
Every node at level d of an oblivious tree shares the same (feature_id, threshold, default_left) triple: that's the symmetric- tree contract. Relaxing default_left to per-node-at-level recovers a small accuracy edge in heavily-missing data but breaks the branchless predict kernel and isn't what CatBoost does.
LevelSplit { uint32_t feature_id; float threshold; bool default_left; } × depth. Leaf table of size 2^depth.
When a level's feature has no missing rows in training data, default_left is don't-care; the splitter records whichever orientation scored higher (arbitrary if no missing rows existed) and predict honors it without thinking.
12. Sampler is the booster's responsibility, not the grower's#
grow(ds, grad, hess, row_indices). The grower receives sampled row indices; it doesn't know what sampler produced them. "Use all rows" is just row_indices = 0..n_rows-1.
Keeps TreeGrower concept narrow. Sampler swappable via Booster<Obj, Gr, Sa, Backend> independent of grower choice. Determinism contract testable on the grower without re-wiring the sampler.
Rejected: grower owns sampler as a member (lgbm-style). Couples grower template to sampler template; bigger cartesian product on Booster instantiations for no compositional gain.
13. Branchless NaN routing in predict#
bool is_nan = std::isnan(v);
bool less = !is_nan && (v < threshold);
bool go_left = less | (is_nan & default_left);
Compiles to mask / select on x86-64 and ARM. Preserves vectorizability for ObliviousTree's batched predict; also keeps DenseTree's single-row predict tight.
Rejected: branchful if (isnan(v)) ... else ... (loses oblivious's SIMD story); pre-cleaning predict input (caller can't know per-feature default direction; rules itself out).
Knock-on: predict-time sentinels (e.g. -999) declared in BinMapperConfig are not honored at predict, only std::isnan. Caller contract: convert sentinels to NaN before predict. Matches xgb / lgbm.
14. Splitter is a template parameter on the grower; one SplitFinder concept#
template <SplitFinder Sp = HistogramSplitFinder> class DepthwiseGrower;
template <SplitFinder Sp = HistogramSplitFinder> class ObliviousGrower;
Static dispatch through to the splitter; inlined into grow(). Default makes the common case ergonomic; explicit Sp makes the extension API real.
struct SplitCandidate {
uint32_t feature_id;
uint16_t bin_idx; // grower converts to threshold via cuts[bin_idx]
bool default_left;
double gain;
bool valid;
};
template <typename T>
concept SplitFinder = requires(T const f,
std::span<Histogram const> hists,
Dataset const& ds,
double sum_grad,
double sum_hess) {
{ f.find(hists, ds, sum_grad, sum_hess) }
-> std::same_as<SplitCandidate>;
};
Both growers consume the same vector<Histogram> shape and produce the same SplitCandidate. Depth-wise calls find once per frontier node with that node's histograms; oblivious calls find once per level with the folded level histograms. The splitter doesn't know or care whether its input is per-node or level-pooled.
Earlier draft of this entry split this into PerNodeSplitFinder / LevelSplitFinder to make mismatched grower/splitter pairs a compile error. Rejected: histogram-based scoring collapses the two signatures to the same shape, so the "compile-time rejection" was illusory. Phase 4 splitters that don't fit this shape (e.g. an exact splitter scanning raw rows) earn their own concept when written.
Rejected: type-erased unique_ptr<SplitFinder> member (the dynamic- dispatch shape we explicitly chose against in proposal §3.4).
15. Splitter returns one best candidate per call#
find(...) returns a single SplitCandidate. valid = false if no positive-gain split exists or no candidate clears min_gain_to_split.
Rejected: returning all per-feature candidates and letting the grower pick max. No caller wants this; flexibility nobody's asking for.
16. Splitter tie-break: lowest fid, then lowest bin_idx#
When two candidates have equal gain (within bit-exact equality, not tolerance), prefer the one with the lower feature_id; if those tie, prefer the lower bin_idx. Stable, deterministic at fixed thread count. Matches lgbm's tie-break order (xgb's is implementation- dependent in their hist updater).
Knock-on: same convention applies to the smaller-sibling choice in the subtraction-trick wiring: when n_left == n_right, left wins.
17. Partitioning: per-node row-index lists (strategy A)#
Each live FrontierNode carries its own std::vector<uint32_t> of row indices. At root: one list with the booster-supplied row_indices. At each split: partition the parent's list into (left_rows, right_rows), replace parent in frontier with two children carrying the new lists.
Both growers use this strategy (oblivious folds per-node histograms into level histograms at scoring time; ~1.5% overhead on YearPredictionMSD-scale data).
Rejected: single row_to_node array of length n_rows rebinned on each split (xgb's hist updater shape; lgbm's voting parallel mode). Beats per-node lists on cache locality at very shallow depth, loses at typical max_depth = 6. More importantly: the subtraction trick wires naturally onto per-node histograms. A single rebinned position vector either fights subtraction (the all-live-nodes-in-one-pass kernel doesn't know to skip the larger sibling) or imports per-node branching back into the kernel.
Knock-on: oblivious grower needs per-parent gain summation across the frontier: for each candidate (feature, bin), sum score(left, λ) + score(right, λ) − score(parent, λ) over every parent (CatBoost's symmetric-tree gain; see decision 30).
Same O(n_features · n_bins · |frontier|) order as a fold; the
difference is in what is accumulated (gain, not histogram cells). An earlier version of this knock-on said "needs a fold step (level_hists = sum_per_feature(...)) before split scoring"; that was wrong because score(g, h) is non-additive; corrected 2026-05-22.
18. Frontier holds histograms inline (no histogram pool)#
FrontierNode { rows, sum_grad, sum_hess, hists }. vector<Histogram> per node, sized n_features. The grower carries std::vector<FrontierNode> frontier and rotates it level-by-level.
Lists and histograms are local to grow(); the grower is stateless across calls (one boosting iteration → one allocation cycle). Matches lgbm's SerialTreeLearner.
Rejected: histogram pool with slot-id indirection (xgb's hist updater). Recycles allocations across the tree, but Phase 1 isn't allocation-bound. The pool refactor is contained if profiling later shows the allocator dominating.
19. Subtraction trick from day one, both growers#
Build smaller child by row-scan; derive larger by larger_hist = parent_hist - smaller_hist. Halves histogram-build work across the tree (per 2-histogram.md §"Why subtraction halves it"). Implemented from day one because retrofitting means restructuring the grower's per-node memory.
Per-parent protocol:
1. Splitter scores parent.hists; commit candidate.
2. Partition parent.rows into (left_rows, right_rows).
3. Pick smaller (left wins ties).
4. Build smaller's hists by row-scan.
5. Derive larger's hists by parent_hist - smaller_hist. Histogram carries its own (total_grad, total_hess) so operator-= subtracts cells and totals together.
6. Push left, right into new frontier in left-then-right order (frontier order is structural, independent of build order).
7. Parent's hists released when parent goes out of scope.
For oblivious: same per-parent protocol, run once per parent at each level. Cross-level subtraction (deriving level d+1's level histogram from level d's) doesn't help: different levels score on different features, so per-feature histograms for level d+1 have to be built regardless.
20. Phase 1 regularization knobs#
TreeConfig fields:
| Knob | Default | Meaning |
|---|---|---|
max_depth |
6 | Hard cap on tree depth. |
min_data_in_leaf |
20 | Node row-count floor (and child row-count floor before splitting). |
min_sum_hessian_in_leaf |
1e-3 | Effective row-count floor under non-MSE objectives. |
lambda_l2 |
1.0 | L2 reg on leaf weights, in gain formula and leaf value. |
min_gain_to_split |
0.0 | Minimum gain to accept a candidate. |
Validated in grower constructors; ConfigError with key path on bad values. Section is [tree] in TOML.
Rejected for Phase 1: max_leaves (leaf-wise concept; depth-wise's natural cap is max_depth, oblivious's leaf count is 2^depth exactly).
Leaf value: leaf_value = learning_rate · -G / (H + lambda_l2), applied at finalization (decision 10).
21. Objective is a concept; static methods, no instance state#
Matches the SplitFinder shape (decision 14). Two static functions required: compute(preds, labels, grad, hess) writes per-row gradients and hessians; eval(preds, labels) returns a scalar mean loss. Dispatch is at the Booster<Gr, Obj, ...> template parameter, fixed at compile time. No vtable; no shared mutable state across calls.
Rejected: virtual base class (loses compile-time dispatch); concept-with-instance-methods (no Phase 1 objective needs instance state).
22. Objective does not own initial score or link inverse#
The first-tree bias prediction (mean for MSE, log-odds for logloss) and the predict-time link inverse (sigmoid for logloss) live in the booster, not the objective. Rationale: both are score-accumulator concerns. The booster maintains the running raw-score prediction array, decides whether the bias comes from config or labels, and is the sole owner of the predict path. Pushing them into Objective would either force every objective to expose a transform and an initial_score it might not need (e.g. MSE: transform is identity), or invite a fragmenting set of optional methods on the concept.
See 5-booster.md (TBD) for where these land.
23. Phase 1 objectives: MSE + binary logloss, single-output#
Two MVP impls satisfy the Objective concept: MSEObjective (regression) and LogLossObjective (binary classification). Both consume 1D per-row floats_view for preds and labels, write 1D floats_out for grad and hess.
Rejected for Phase 1:
- Multi-class / softmax. K-output extension; touches
Objective,Booster,Tree(K-output leaves). Phase 4. - Quantile, Huber, Tweedie, Cox. Out of scope; satisfy the concept when added.
- Custom user objectives. No registry needed: anyone satisfying the concept can drop in as a
Boostertemplate parameter.
24. compute writes raw-score grad/hess; output is overwritten, not accumulated#
Objective::compute writes grad and hess outright; callers don't zero buffers first. preds are raw scores throughout (logloss does not apply sigmoid inside compute or eval); the booster keeps an additive raw-score accumulator across iterations and applies the link only at the outermost predict call. Matches xgboost / LightGBM; keeps boosting math additive.
hess is always non-negative (MSE: 1; logloss: p·(1−p) ∈ (0, 0.25]); the splitter's min_child_hess (decision 20) catches near-zero hessians before they propagate.
25. Sample weights are applied by the booster, not the objective#
When Dataset.weights is non-empty, the booster multiplies the grad and hess buffers by the weight vector immediately after Objective::compute returns and before handing them to the grower. Keeps every Objective impl focused on loss math; the multiplication is a 2-line buffer loop that doesn't belong duplicated across objectives.
Rejected: a WeightedObjective<T> wrapper that satisfies Objective by composing with weights. Adds a template layer with no semantic content; same effect as the booster-side multiply.
26. Dispatch: flat table over cartesian product, IBooster at boundary#
Status 2026-08-26: the shipped registry is three axes, cartesian_product_t<Objectives, Growers, Samplers>; a Splitters axis never shipped and DispatchConfig carries three names (include/bonsai/registry/typelists.hpp). The Candidate A deliberation this entry cites lives at the pinned archive.
Runtime → static boundary uses Candidate A from architecture/6-dispatch.md: a constexpr std::array keyed on a name-tuple, generated by for_each_type over cartesian_product_t<Objectives, Growers, Splitters, Samplers>. Each cell is a monomorphized Booster<O,G,S,Sa> factory. Lookup at the config boundary returns unique_ptr<IBooster>.
Cost: one virtual call per update_one_iter. Acceptable. The hot path is histogram building inside update_one_iter, not the call itself; per-iteration vcall is dwarfed by the per-iteration histogram pass. Static-everywhere is preserved inside the iteration body, which is what the proposal §3.4 rule actually targets.
Rejected:
- Nested registry callbacks (Candidate B). Fully static, zero vcalls anywhere, but forces continuation-passing at the boundary and drags the whole training run into the innermost lambda.
- Dressed-up nested lambdas (Candidate C). No advantage over A or B once the type-level builder is in play.
- Hybrid flat-table + generic callback. Doesn't compile:
std::arrayof function pointers can't be generic over the callback type.
Invalid combinations (none in MVP) are pre-filtered at typelist construction by building sub-products over compatible sub-typelists and concatenating. No runtime check, no concept predicate, no instantiation of bad cells.
Backend placement deferred to 7-parallel.md; dispatch stays 4D for now; promotion to 5D or separate composition both stay open.
27. Booster shape, training loop, and Sampler concept#
Status 2026-08-26: the code has outrun the ratified shape: Booster takes three template parameters, grow() returns leaf values so the loop re-walks nothing, and the identity sampler is AllRowsSampler. include/bonsai/booster.hpp is the reference; the ratified doc lives at the pinned archive.
Ratifies architecture/5-booster.md.
Class shape. IBooster is the boundary erasure type with a minimal CLI-facing virtual surface (update_one_iter, eval, predict, n_iters, accessors for save/load). Booster<Obj, Gr, Sp, Sa> is the real class, monomorphized per cell of the dispatch table (decision 26). One vcall per update_one_iter from the CLI; zero inside.
Training loop (update_one_iter). Six steps in order:
Obj::compute(scores_, labels, grad_, hess_): full row set.- Apply
Dataset.weightstograd_,hess_if present (decision 25). Sa::sample(grad_, hess_, rng, out_indices)→ row indices for the grower.grower.grow(dataset, grad_, hess_, row_indices, split_finder, cfg)→ tree.scores_ += learning_rate * tree.predict(train_rows): re-walks the tree per training row.trees_.push_back(std::move(tree)).
Sampling runs after grad/hess (not before) because GOSS samples on
|grad|, the grad pass is small (~5-10%) compared to histogram
building (60-80%, what sampling actually targets), and reordering would force a "does this sampler need grad?" flag on the concept.
learning_rate. Applied at score-update time (step 5), not pre-scaled into leaf values. Saved trees carry raw leaf values; the booster reapplies the rate at predict and at score-update. Matches xgb's "shrinkage = booster concern" model.
Score update via re-predict, not cached leaf values. Step 5 calls tree.predict(train_rows) rather than reading a precomputed (row → leaf_value) array from the grower. Cost is one extra O(n_rows × depth) walk per iter, small at MVP scale. xgb / lgbm / catboost all cache the row→leaf mapping as a byproduct of growing and reuse it for the score update; bonsai defers that optimization to Phase 2 (after benchmarking). When justified, change grower return from Tree to (Tree, std::vector<float> train_leaf_values) and replace step 5 with a flat add. Pure additive change to the grower→booster boundary; Tree stays clean.
Initial score (bias). Booster owns it (decision 22). Three sources in priority: cfg.init_score; objective-appropriate default from labels (mean for MSE, log(p/(1-p)) for logloss); value loaded from disk for a continued booster.
Predict path. Raw-score predict sums tree predictions plus init_score, applies learning_rate per tree. User-facing predict applies the objective's link inverse (identity for MSE, sigmoid for logloss) via if constexpr on Obj. Inverse link lives in the booster (decision 22), not in Objective::compute (decision 24).
Obj is purely-static. No instance member; T::compute and T::eval are static (4-objective.md / decision 21).
Booster borrows Dataset. Lifetime sits with the CLI; update_one_iter takes Dataset const&. Saved model is BinMappers + trees + init_score, no Dataset. Booster does not own BinMappers (decision 3: predict path doesn't need them).
Save / load are I/O, not booster methods. Free functions save_booster(IBooster const&, path) and load_booster(path) -> unique_ptr<IBooster>. Rationale: load needs the four component types before it has a Booster to dispatch on, so it reads names from disk and calls into the same registry path make_booster uses: that's structurally the dispatch boundary, not a member function. save is the symmetric counterpart.
Sampler concept (Phase 1). Static members, same shape as Objective and SplitFinder:
template <typename T>
concept Sampler = requires(floats_view grad, floats_view hess,
std::mt19937& rng,
std::span<size_t> out_indices) {
{ T::sample(grad, hess, rng, out_indices) } -> std::same_as<std::size_t>;
};
Returns the count of selected indices written into the head of out_indices; the buffer is owned by the booster and reused across iterations. RNG is passed in by the booster, which owns determinism (decision 7).
NoSampler is the Phase 1 identity impl (writes 0..n_rows-1, returns n_rows). GOSS and BernoulliSampler are Phase 4. The sub-product machinery from 6-dispatch.md handles any sampler-grower incompatibilities. Sampler doc folds into 5-booster.md for now; spin out into 5b-sampler.md if it grows.
Rejected:
Objas instance member. No state needed in MVP; revisit if a future objective needs config.- Cache row→leaf mapping in MVP. Adds grower→booster API surface before benchmarking justifies it.
IBooster::save/IBooster::loadas virtual methods. Load has noBoosterto dispatch on; both belong in an I/O module.- Sample-before-grad ordering. GOSS dependency + small grad cost + concept-flag avoidance.
28. Spine complete; insert Phase 2.5#
Milestone (2026-05-18). Phase 1 (Serial MVP) and Phase 2 (benchmark harness) are complete. The spine is end-to-end working on California Housing: Dataset, BinMapper, BinMappers, Histogram, depth-wise + oblivious TreeGrower, DenseTree, ObliviousTree, histogram SplitFinder, Objective concept + MSEObjective + LogLossObjective, Sampler concept + AllRowsSampler, Booster<O,G,Sp,Sa> + IBooster, registry / dispatch flat table, dispatch resolution doc (6-dispatch.md). The Python sidecar runs bonsai vs xgboost / lightgbm / catboost on the same TOML config. Eval baseline pinned at rmse=0.7175214 (regression net via tests/unit/test_eval_baseline.cpp).
Phase 2.5 inserted. Between Phase 2 and Phase 3, before turning on parallelism, the next focus is a CLI / config usability and design pass plus the small items glossed over during the Phase 1/2 sprints. No new spine, no parallel backends. Items captured as commits during the work rather than pre-listed. Phase 3 (Parallelism) follows; YearPredictionMSD becomes the perf benchmark there.
Parallel backends come after a design pass. The two remaining spine items (ParallelBackend concept + first impl) wait on architecture/7-parallel.md, which fixes the threading-model design calls before any backend code is written.
29. Model file serializes the full Config via NLOHMANN macros, not the existing TOML codec#
On-disk format (2026-05-20). save_booster(IBooster const&, path, BinMappers const&, Config const&). Full Config rides along in the msgpack envelope under "config". load_booster reads it straight into LoadedBooster::cfg and calls make_booster(out.cfg): no synthesized-Config indirection (was {dispatch, learning_rate} torn apart at save and stitched back at load). Format version bumped 1 → 2; no v1 artifacts in the repo, fail-loud on stale files is correct.
Mechanism. NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE per Config sub-struct (Data, BinMapper, Tree, Booster, Dispatch, Metrics) plus one for Config itself. Same macros are used for the tree-node POD records (DenseTree::InternalNode / LeafNode / Params), replacing ~65 lines of hand-typed JSON-key mirror code. One-shot adl_serializer<std::optional<T>> added in the same TU: nlohmann v3.11 doesn't ship optional support. Every macro lives in src/io/model.cpp (no public-header nlohmann leakage).
Why not the existing TOML codec. The TOML path uses Section descriptors + field_name<MemPtr>() (source_location-based extraction) to drive serialization with zero per-struct boilerplate. The JSON path could reuse those Section tuples the same way: that was the originally-proposed approach. Rejected in favor of the macros: less code (~10 macro lines vs ~30 lines of generic fold + two new files in bonsai::config), one fewer abstraction layer to read when debugging the on-disk format, and the macro form lives next to the only consumer (model.cpp). Trade-off explicitly accepted: the macro field-list duplicates the existing Section field-list. A member added to a struct but not to one of the two enumerations silently drops from that serializer.
Why not modern C++ reflection. P2996 (static reflection, C++26) collapses every NLOHMANN macro in this file to one template per direction. Not available in our toolchain. When it lands, this decision is the natural retirement point: delete the macros, ship the reflection-based serializer, format version stays at 2. Boost.PFR is positional-only (no field names) and brings a dependency for no JSON-key benefit. Rejected.
Inspection. Model files are now jq-able as a structured tree: nlohmann::json::from_msgpack(read_file(path)).dump(2) yields {magic, version, config: {data, bin_mapper, tree_config, booster_config, dispatch, metrics}, bin_mappers, init_score, trees}. This was a load-bearing factor in the encoding choice: a TOML-string-in-JSON alternative (~2 lines using dump_toml/parse_toml) would have hidden Config behind one escaped-string blob and broken jq access to individual fields.
Knock-on. Every Config sub-struct gained bool operator==(...) const = default; so round-trip tests can assert loaded.cfg == cfg in one line. Also widened the existing [model_io][config] test to populate every Config leaf with a non-default value (covers each leaf-type's nlohmann conversion in one shot).
30. ObliviousGrower: fold-then-score was wrong, revert and re-spec#
Date. 2026-05-21 (landed), 2026-05-22 (reverted).
What landed (2026-05-21)#
ObliviousGrower<SplitFinder SplitterT> in include/bonsai/grower.hpp + src/grower.cpp. The level-scoring step folded per-feature histograms across the frontier into one summed level histogram, then called the existing single-node HistogramSplitFinder::find on that fold. Registered as impl_name = "oblivious" in the Growers typelist; the registry's cartesian product picked up {mse, logloss} × oblivious × all_rows automatically. Model I/O was generalized to be tree-type-polymorphic (try_save_as<B> / try_load_into<B> use typename B::tree_type; new tree_to_json overload + tree_from_json<TreeT> specialization per tree type). Histogram::operator+= added to drive the fold.
What went wrong#
The gain function score(g, h) = g²/(h + λ) is non-additive:
score(Σ g_i_L, Σ h_i_L) + score(Σ g_i_R, Σ h_i_R) − score(Σ g_i, Σ h_i)
≠
Σ_i [ score(g_i_L, h_i_L) + score(g_i_R, h_i_R) − score(g_i, h_i) ]
Folding histograms before scoring gives the first expression. The gain induced by applying one split to every parent in the frontier is the second expression. Bonsai's fold-then-score therefore did not compute the right gain.
The bug surfaced during depth=2 testing as a "fold equals root histogram" property: because rows are partitioned (not removed) across the frontier, the fold at level k+1 reconstructs the root histogram exactly, so the splitter re-picked the same (feature, bin) at every level and produced degenerate trees where 2^depth − 2 leaves were empty. I documented this as inherent to oblivious + basic gain. It isn't; it's an artifact of the wrong gain function.
Verification against CatBoost (2026-05-22)#
Inspected catboost/private/libs/algo/greedy_tensor_search.cpp. The symmetric-tree path calls CalcBestScore → CalcStatsAndScores, which builds per-leaf histograms across the current depth's leaves and aggregates gains via SetBestScore. Per-parent gain summation confirmed. The fold-then-score approach has no CatBoost analog.
Resolution (2026-05-22)#
Reverted the broken implementation in one commit:
ObliviousGrower<SplitterT>declaration removed frominclude/bonsai/grower.hpp.make_level_nodehelper +ObliviousGrower::growimpl + explicit instantiation removed fromsrc/grower.cpp.Histogram::operator+=removed frominclude/bonsai/histogram.hpp.Growerstypelist reverted toTypeList<DepthwiseGrower<...>>ininclude/bonsai/registry/typelists.hpp;impl_name<ObliviousGrower<...>>removed frominclude/bonsai/registry/names.hpp.- Two
Booster<..., ObliviousGrower<...>, ...>explicit instantiations removed fromsrc/booster.cpp. tests/unit/test_oblivious_grower.cppdeleted; CMake entry removed; oblivious cases removed fromtest_make_booster.cppandtest_model_io.cpp. TheObliviousTree-specifictree_to_jsonoverload andtree_from_json<ObliviousTree>specialization insrc/io/model.cppwere also removed because-Werror=unused-functionwould otherwise fire.
What was kept#
Infrastructure that is independently valid (does not assume the broken impl):
ObliviousTree::splits()/leaf_values()accessors oninclude/bonsai/tree.hpp. Needed by I/O once the correct grower lands.using tree_type = typename Gr::Tree;public alias onBoosterininclude/bonsai/booster.hpp.- Tree-type-polymorphic
try_save_as<B>/try_load_into<B>insrc/io/model.cpp(usestypename B::tree_type), and theNLOHMANN_DEFINE_TYPE_NON_INTRUSIVEmacros forObliviousTree::LevelSplit/Params. tests/unit/test_grower_helpers.hppshared fixtures, grower-agnostic, still used bytest_grower.cpp.
Outstanding#
Decision 8's Phase-1 commitment (depth-wise + oblivious) is not honored. The design-review drift flag at reviews/2026-05-19-design-review.md §"DenseTree / ObliviousTree" remains accurate. The correct algorithm is documented as a design target in architecture/3-tree.md §"Oblivious grow loop"; implementation pending in Phase 2.5 (user-authored).
Lesson#
Mathematical primitives need a sanity check before being trusted across an aggregation boundary. score(g, h) looks superficially linear in g, but the g² term kills additivity. Two more checkpoints that should have caught the bug earlier:
- Cross-reference against the reference library before implementing. CatBoost's source explicitly aggregates gains per-leaf. A 10-minute read of
greedy_tensor_search.cppwould have surfaced the right shape before any code was written. - Design tests that distinguish the right answer from a plausibly-wrong one. The original
depth=2test was content with "4 leaves, structurally correct" and even rationalized the degenerate[2 non-empty, 2 empty]outcome. A test that demanded "all 4 leaves carry rows" or "level-1 split differs from level-0 on some non-trivial fixture" would have failed loudly.
31. LeafwiseGrower: best-first growth on a gain-keyed heap, max_leaves primary#
Third grower, dispatch.grower_name = "leafwise" (LightGBM's default strategy). A std::vector<Candidate> maintained with std::push_heap/std::pop_heap holds every expandable leaf ({SplitInput, SplitOutput, depth}) keyed on split gain; each pop converts one leaf into two children, so live_leaves counts up and growth stops at TreeConfig::max_leaves (new field; 0 = unbounded, max_depth stays as the cap). Reuses make_root / split_node / finalize_as_leaf / HistogramNodeSplitFinder unchanged and emits a DenseTree, so registration is just the typelist + impl_name edits.
std::vector+ heap algorithms overstd::priority_queue:top()returnsconst&, which fights moving the histogram-heavySplitInputout;pop_heap+std::move(heap.back())doesn't.- Tie-break: equal gains resolve to the lower node id (FIFO-ish), so trees are deterministic.
- Semantics: with
max_leaves = 2^max_depthand a separable dataset, leafwise reproduces depthwise's tree exactly (covered by unit test).
32. Parallelism: OpenMP behind a one-function seam, determinism at any thread count#
bonsai/parallel.hpp exposes parallel::for_each_index(n, f): an OpenMP parallel for (dynamic schedule, chunk n/(threads*4)) with a serial fallback when OpenMP is absent, plus set_n_threads fed from a new [parallel] n_threads config section (0 = all cores). Every parallel site assigns each index to exactly one thread and performs no cross-thread reductions: per-feature histogram fill, per-feature split scans (per-feature bests merged serially in feature order, preserving the tie-break), row-wise predict, objective grad/hess, score updates, CSV row parsing, binning, mapper fitting.
Consequence: models and predictions are bit-identical to a serial run at any thread count: stronger than the proposal's fixed-thread-count contract (decision 7), because the row-parallel-within-feature + per-thread-histogram-merge design that motivates the weaker contract hasn't been needed yet. If it ever is (single-feature datasets), the contract degrades to fixed-N as originally specified.
Rejected for now: the ParallelBackend concept as a 5th dispatch dimension (proposal §3.4, 7-parallel.md TBD). One free function covers every call site today; promoting it to a dispatched component adds a typelist dimension with a single implementation. The seam keeps the door open: std::execution/TBB would slot in behind the same signature.
33. Hot-path perf: ordered gradients, stable scatter, node totals out of add#
Three measured wins on Year Prediction MSD (M2, 8 threads), all bit-identical outputs:
- Ordered gradients (LightGBM trick):
populate_from_rowsgathers grad/hess into node-row order once, so each of the 90 per-feature scans reads them sequentially instead of re-walking two full arrays with scattered indices. - Stable split scatter:
split_nodereplacesstd::partition+ twoassigns with a two-pass exact-size stable scatter. Stability keeps every node's rows ascending (root's are iota), so bin lookups walk memory near-sequentially at every depth. - Node totals once:
Histogram::addno longer maintains running totals (2 redundant double-adds per row×feature, duplicated per feature); node totals are one O(n_bins) cell sum overhists[0], hoisted per node in the split finders.
CSV load: whole-file read + line index + row-parallel from_chars parse straight into column-major storage, and the train file is parsed once (mapper fit + binning share the batch) instead of twice. Load 7.4s → 1.3s; 200-iter depthwise fit 73s → ~27s; leafwise ~12s.
34. Feature-parity round: colsample, GOSS, early stopping, L1, and the OOB score bug#
Four reference-library features landed in one pass, each benchmarked A/B on Year Prediction MSD with the equivalent knob enabled in xgboost / lightgbm / catboost (protocol + tables in the feature-gap record):
tree.feature_fraction: per-tree feature subsample drawn from a grower-owned rng (tree.feature_seed), histograms built for selected features only; unselected slots are zero-binned placeholders the finders skip. Node totals moved toSplitInput::totals()(first populated hist).sampler_name = "goss": LightGBM's gradient one-side sampling; theSamplerconcept now takes mutable grad/hess so the sampler can amplify the small-gradient sample in place.booster.early_stopping_rounds: incremental valid eval (IBooster::score_base/accumulate_last_tree, one single-tree predict per iteration) +truncateto the best iteration.tree.lambda_l1: XGBoost-style soft threshold on the gradient sum in both the gain score and the leaf value.
The GOSS benchmark exposed a latent correctness bug in every subsampled
path: GrowResult.values was only stamped for sampled rows, so out-of-bag
rows' entries stayed 0 and the booster's score accumulator silently
diverged from the real model for those rows: their gradients were computed
against predictions missing whole trees. Bernoulli had been quietly paying
~2% RMSE for this (9.1873 → 8.9916 on MSD after the fix); GOSS diverged
outright (RMSE 24.7, worse than predicting the mean) because it re-selects
by |grad| every iteration and fed on its own staleness. Fix: growers now
route unsampled rows through the finished tree in bin space
(route_unsampled, split bins recorded during growth), which is exact with
respect to the float-threshold predict path: bin(v) <= b ⟺ v <=
cuts[b] under the right-inclusive binner, missing bin routed by
default_left on both paths.
Lesson (rhymes with decision 30): the booster-side values shortcut was
only ever validated with all_rows. A contract as easy to state as "every
row's train value equals the tree's prediction for that row" deserved a
test the day the first subsampler landed.
35. Remaining-gap round: objectives, monotone, interaction, DART#
Second feature-parity pass (protocol and A/B tables in the feature-gap record); sparse/EFB explicitly stays out of scope until the harness has a sparse dataset to measure against.
- Objectives became Config-constructed instances (like
Sampler) so parameterized losses carry state:[objective] huber_delta / quantile_alpha. Statics satisfy instance-call syntax, so MSE/LogLoss kept their static methods and only gained trivial ctors. MAE / Huber / Quantile land with sign/clamped/pinball gradients and median/quantile init scores. Known limitation: no leaf-renewal pass, worth ~10% MAE vs lightgbm/xgboost's renewed leaves on YearMSD; bonsai matches lightgbm on huber, where renewal matters less. - Monotone constraints: candidate splits on a constrained feature are
rejected when bounded child weights violate the direction, and children
inherit midpoint-fenced leaf bounds via
SplitInput::lo/hi; whole paths are provably monotone. Costs every library the same ~2% RMSE on CH. - Interaction constraints:
SplitInput::allowed/pathcarries the permitted feature set down the tree; a feature may split only where some group covers the whole path (or alone). Same ~9% RMSE cost as xgb/lgbm on a two-group CH config. - DART: dropout of existing trees with bin-space routing to recover
dropped train contributions (no per-tree caches), rescaling with
xgboost's
normalize_type="tree"factors: the DART paper's 1/(k+1) starves the new tree by ~1/lr under shrinkage and measurably tanked RMSE until replaced. bonsai's DART now degrades less than xgb/lgbm's at the same settings. Incompatible with early stopping by construction (throws). - Oblivious grower rejects monotone/interaction constraints at construction rather than silently ignoring them.
36. Python bindings: nanobind over the CLI's own seams, static libomp#
_bonsai (nanobind, python/bonsai package, pip install . via
scikit-build-core) wraps exactly the seams the CLI uses: config::
apply_overrides for params (dotted keys, same codec as --set),
cli::train_with_progress for fit (so early stopping and valid sets come
for free), io::save_booster/load_booster for model files interchangeable
with the CLI. No training or prediction logic lives in the binding. The
sklearn-ish BonsaiRegressor accepts first-class knobs plus a params
dict of dotted config keys. Parity test: same config through the module and
the CLI agrees to atol 2e-4 on California Housing predictions.
The libomp lesson. Linking the extension against Homebrew's
libomp.dylib deadlocked the process the moment xgboost built a DMatrix:
a sample trace showed one OpenMP call stack spanning two different
libomp images (ours and xgboost's bundled copy): classic duplicate-runtime
interposition. Fix, standard for wheels: BONSAI_OPENMP_STATIC=ON links
libomp.a into the module and -Wl,-exported_symbol,_PyInit__bonsai
strips every other export (1015 leaked kmp symbols before). Verified by
interleaving bonsai / xgboost / lightgbm training in one process.
Native benchmark rows. compare.py adds in-process "(native)" rows when
build/python is importable, timed like the reference libraries (no
subprocess, CSV, or model-save overhead, though bonsai's train() still
includes binning, which xgb's timed train does not). Re-baselined:
RMSE identical to the CLI rows; predict drops 0.20s -> 0.08s on
YearPredictionMSD, landing between xgboost (0.017) and lightgbm (0.105).
37. Feature importance recorded at grow time; the guide series#
Importance. Split-count and gain importance ship behind
IBooster::feature_importance(ImportanceType), bonsai importance, and the
Python feature_importances_ / importance(type) surfaces. The one design
decision: gain is stamped when the split is created (split_gains per
node on DenseTree, level_gains on ObliviousTree, serialized, format
v5) because it is not reconstructible from a stored tree. Accumulation is a
20-line walk in booster.hpp. Verified by cross-library agreement on
California Housing: bonsai and lightgbm agree on both types including
their disagreement with each other: gain crowns MedInc, split-count
crowns Longitude/Latitude (many fine-grained, individually-small splits),
the textbook argument for gain as the default and a finding the agreement
test now pins.
The guide. docs/guide/ is a nine-chapter pedagogical series (concept
→ math → the actual implementing code → runnable experiment → war story)
positioned as a deliberate differentiator: reference libraries document
parameters, the guide documents mechanics against a codebase small enough
to read. War stories are real ones from this log (OOB stale scores §34,
DART's k+1 trap §35, the two-libomp deadlock §36, the split-vs-gain
disagreement above). Stale narrative docs were refreshed in the same pass
(context, report addendum, architecture 2–8, new 7-parallel.md), and
milestones are now git-tagged (the MVP submission tag, v0.2.0–v0.5.0).
38. Completing the non-categorical gap: rows 10-17 in one push#
Every remaining non-categorical row of the feature-gap record landed (tables and datasets per row in that doc):
- Leaf renewal (10):
GrowResult::leaf_ids+ an objectiverenew_leafhook; the booster regroups rows by leaf and replaces Newton steps with loss-optimal values (residual median / alpha-quantile / clamped-mean huber). Closed the recorded ~10% MAE gap outright: bonsai now ties lightgbm on mae/quantile and leads on huber. - Prediction extras (13) + warm start (14): predict_at / staged / pred_leaf / dump; --init-model continuation that rebuilds training scores by bin-space routing and reuses the loaded mappers.
- Classification benchmark (11): streamed HIGGS subset, AUC in both the C++ metric registry (rank-sum) and compare.py. The logloss path's first live outing landed between xgboost and lightgbm.
- TreeSHAP (15): Algorithm 2 over per-node covers (stamped at grow time, format v6); verified against a brute-force Shapley reference to 1e-9 plus the efficiency property at every level.
- Multiclass (16):
BoosterForbecame a trait so {softmax, G, Sa} routes to a dedicatedMulticlassBooster, the one objective whose K-output shape the 1-DObjectiveconcept can't express. Covertype: bonsai depthwise leads the field on accuracy. - Sparse input (17): LIBSVM reader behind
data.format, densified, with the boundary stated plainly: input parity yes, sparse compute no. a9a AUC within 0.2% of xgboost.
Recurring lesson, third occurrence (after §30, §34): the benchmark is the strongest test. lightgbm's multiclass metric rejection, catboost's regressor/classifier split, and a9a's short test-split feature space were all caught by running the harness, not by unit tests.
39. Categorical stage 1: measure before building#
Decision. Before implementing native categorical splits (gap row 12), add a genuinely categorical dataset and measure what native handling buys. Amazon employee access (OpenML 4135): 9 integer-ID features, RESOURCE at 7.5k distinct values: the regime one-hot cannot reach and arbitrary ID orderings hurt most.
Design. The measurement isolates technique from library: lightgbm
runs twice, once with the IDs as plain numerics and once with
categorical_feature declared. That within-library delta (+0.0144 AUC,
and faster fits) is what Fisher set splits are worth, independent of
engine differences. bonsai contributes its two practical options today
(raw IDs: 0.8476; K-fold target encoding: 0.8462) and the other
references their native modes (xgboost 0.8498, catboost 0.8812).
Findings. (a) The stage-2 prize is real but modest: ~+0.007 AUC from bonsai's best to lightgbm-native. (b) catboost's +0.026 lead over lightgbm-native does not come from target encoding per se (plain K-fold target encoding was no better than raw IDs) but from the ordered scheme plus feature combinations. (c) bonsai beats lightgbm when both are denied categorical machinery, so the gap is the feature, not the engine. Stage 2 (set splits) proceeds with a measured ceiling instead of a hope.
40. GPU-resident growing: widen the builder seam to an optional level backend#
Decision. Phase 3 (device-resident partitioning and split finding, design in architecture/11-gpu-resident.md) extends the builder policy with three optional hooks (find_splits_many, partition_many, finalize_rows) detected via if constexpr + requires, the same idiom as phase 2's populate_many. The host grow loop remains the single algorithm narrative and the decision-maker (leaf-vs-split, smaller-child pairing, constraint propagation); the device executes the data plane. SplitInput gains sums and row_count so it degrades to node metadata when histograms and rows stay device-resident.
Rejected. A device splitter as a fourth typelist dimension: there is one device implementation and it is coupled to the CUDA builder's state, so a registry axis buys combinations nobody can instantiate (the same restraint as decision 32 for threading). A row_to_node map (xgboost's shape): decision 17's reasons hold on the device too: per-node segments pair naturally with the subtraction trick and stable per-node row order. CUB/Thrust for the partition scan: a hand-rolled three-kernel scan keeps the backend a single self-contained TU with no new dependency.
Consequences. In resident mode SplitInput.hists/rows are empty; the inspect path for tests and debugging is an explicit download_histograms. The cuda_depthwise determinism contract is formally tolerance-equal (prediction/RMSE tolerance + split-agreement rate in parity tests, never tree equality); CPU-only builds stay bit-identical. Copy-back mode is retained as the degrade path (deep trees, oversized max_bin) and for the oblivious/leafwise growers.
41. Grower data-plane as the LevelStep strategy; retire the copy-back ladder#
Decision. Reframe decision 40's "escalating optional hooks" as a single compile-time Strategy: a LevelStep<SplitterT, Engine> (primary template = host data plane; partial specialization for GPULevelEngine = device data plane) selected by engine type, so grow() reads as one control-plane narrative with the host/device fork localized to one specialization instead of smeared across six if constexpr/if (resident()) sites. resident() is removed: the per-tree mode is captured once from begin_root's bool into the LevelStep. The concept ladder collapses to two, renamed to shed the GoF-Builder connotation (the type is the pluggable compute substrate, and the CUDA one supplies the whole device data plane): HistogramEngine (host, from HistogramBuilder) and GPULevelEngine (the device-resident vocabulary, from ResidentHistogramBuilder). The populate → populate_many → resident progression was a dev-research ladder (phases 1–3, preserved in git and doc 11's measured stages); only device-resident is kept: populate_many, BatchHistogramBuilder, and the GPU copy-back histogram path are retired, and the rare decline (oversized max_bin, or level buffers that won't fit) falls back to CPU histogram building via the engine's existing cpu member. Design in architecture/12-grower-backend.md. Refines, not overturns, decision 40: host-owns-decisions, one-grow-loop, no-new-typelist-dimension, and the all-or-nothing device coupling all carry forward.
Rejected. Runtime strategy objects (a unique_ptr<LevelPlane> or std::variant handed to the loop): the dynamic-dispatch shape decisions 14/26/32 explicitly chose against: it would need a benchmark to prove zero-cost rather than guarantee it, add type erasure the grow loop avoids, and thread into every grower. Keeping the three-tier concept ladder: populate_many is a host-plane batch optimization, not a device peer, so the middle tier documented a distinction that no longer earns its name. Keeping GPU copy-back as the decline fallback: it keeps a whole kernel path alive for a rare case (default max_bin=255 always goes resident); the CPU fallback trades a slice of that rare path's throughput for a materially smaller CUDA backend.
Consequences. update_nodes (182 lines, 18 params) decomposes into plan_level + LevelStep methods + commit_children, each ≤~40 lines; the CPU path becomes branch-free (a reader never meets a GPU concept). Oblivious and Leafwise route through the shared LevelStep, so their CUDA variants become a one-line alias + registry entry (not registered here: a later pass; leafwise's sequential gain-heap limits its device value). Docs 10/11's grower-side seam narrative is superseded by doc 12; their device-kernel content stands. Zero perf cost is a release gate, measured on a Thunder 4×A100 against xgboost (scripts/bench_gpu.py, MSD, before/after) in addition to CPU bit-identity and cuda tolerance-equal parity. Landed (commits b4d223c → a4764ba): every phase held 392/392 both configs, sha256-identical CPU models for all three growers, and unchanged resident-path launch counts; the leafwise open call resolved against singleton-frontier unification (a per-heap-pop LevelPlan buys ceremony, not shared code: split_node lives in level_step.hpp as the single-node data plane) and the oblivious unsampled routing stayed its own (leaf-table indices, not DenseTree node ids).
42. GPU oblivious via a device level-find; no cuda_leafwise#
Decision. Register cuda_oblivious (ObliviousGrower<CudaHistogramEngine>), completing the pass decision 41 deferred. The resident plane is reused wholesale (an oblivious level is a depthwise level where every node takes the same split), so the only new device piece is the level-find: find_level_split sums each candidate cut's child scores across the whole frontier (32-node chunks into per-feature global scratch, any frontier width) and requires per-node min_child_hess feasibility, mirroring update_best_for_feature_for_level; a fused find → reduce → child-sums launch chain pays one sync per level. GPULevelEngine gains the method; LevelStep routes LevelSplitFinder growers to it. Measured (RTX 5090, fair full-pipeline timing): 3.9–4.1 s vs CatBoost-GPU 7.3–8.2 s on MSD, RMSE matching CPU oblivious exactly.
Rejected: registering cuda_leafwise. A working LeafwiseGrower<CudaHistogramEngine> was built and benchmarked, then withdrawn: best-first growth expands one node at a time, which the level-batched resident plane cannot serve (advance swaps whole levels), so every histogram was computed by the engine's CPU member: a cuda_ registry name executing CPU work misleads bonsai info, serializes into model metadata, and mislabels benchmarks. The comparison it existed for holds without it: CPU leafwise (11.1–11.5 s) beats LightGBM's CUDA leaf-wise backend (12.0–12.9 s) on the 5090. A true device leafwise needs a non-swapping advance: phase-4.
Consequences. trains_here keys on the cuda name prefix (registry convention) instead of one hardcoded name; skip_without_cuda keys on the grower's Engine alias; the oblivious grow loop consumes per-node child sums from the level-find (children's SplitInput.sums are otherwise unknowable: device histograms are not host-scannable), and host/device leaf finalize is symmetric via LevelStep::finalize_leaves.
43. CI: GitHub Actions gates every PR; sanitizers as a build option, not a preset#
Decision. One workflow (.github/workflows/ci.yml, ubuntu-24.04, clang-21 from apt.llvm.org so CI uses the Makefile's exact Linux toolchain): build-test (Release + ctest), sanitize (BONSAI_SANITIZE=ON, ASan+UBSan, RelWithDebInfo), format (clang-format --dry-run --Werror), tidy (make lint off a configure-only tree: clang-tidy needs just compile_commands.json), python (nanobind module + bindings tests), and cuda-compile. Sanitizers are a CMake option (BONSAI_SANITIZE) applied globally so FetchContent'd Catch2 carries the same instrumentation; a preset file would be a second configuration surface for a Makefile-driven repo. This discharges the proposal's sanitizer-in-CI commitment.
CUDA is compile-only. GitHub has no GPU runners, but the kernel TU is the code path a CPU-only CI would otherwise never touch. The job installs only cuda-nvcc-12-6 + cuda-cudart-dev-12-6 (headers, ptxas, libdevice, no driver) and builds with -DBONSAI_CUDA_ARCH=sm_80, since native requires a device to probe. Runtime GPU validation stays where it has always been: make test-cuda on a GPU host.
Consequences. LSan is off in the sanitize job (detect_leaks=0): libomp's pool allocations outlive main and drown real leaks; ASan+UBSan remain fatal (-fno-sanitize-recover=all). BONSAI_SANITIZE + BONSAI_CUDA is a configure error: sanitizing device code is not supported and a half-instrumented binary would imply coverage that isn't there. FetchContent _deps and the toy CSVs are cached per lockfile-ish keys; a cold run needs the network, warm runs don't.
The first honest lint run. make lint had been discarding run-clang-tidy's stderr, so tool failures on macOS printed "no findings"; the Linux CI job surfaced 128 findings the local gate never saw. Response: fix the real bugs (a use-after-move in the for_each_type fold, two unchecked optional accesses, an exception escaping main, plus small google-*/naming/enum-size items) and curate .clang-tidy down to checks the codebase actually satisfies: the disabled block documents each family (pointer arithmetic at C/CUDA/codec boundaries, reference members, callback F&& APIs, concept archetypes, established long functions). The Makefile now fails lint when the tool itself fails. Re-enabling a curated-out check is a deliberate cleanup PR, not a silent flip.
44. n_threads = 0 means capped auto, not all hardware threads#
Decision. Auto worker count is min(omp_get_max_threads(), 16). Explicit n_threads = N passes through untouched, including N above the cap or above the core count. Measured on a 60-vCPU host (issue #2, MSD 463k×90, 200 iters, depth 8): the uncapped default ran CPU depthwise 10× slower than 16 threads (167 s vs 15.9 s) and cuda_depthwise 4× slower (51 s vs 12.2 s): per-level parallel sections are short (≤ ~250 nodes), so with many workers OpenMP barrier spin-wait dominates useful work, burning CPU-hours per fit. 16 was near-optimal there and is at or above the core count of every dev machine this project targets. The cap does not change the determinism contract: no cross-thread reductions exist at any thread count (decision 32).
Rejected. Work-scaled formulas (clamp(n_rows/K, 1, hw)): the pathology is barrier latency as a function of frontier width, not row count; a formula would be false precision. Setting OMP_WAIT_POLICY programmatically: setenv only works before runtime init, and inside the Python module another extension may have initialized OpenMP first. kmp_set_blocktime: libomp-specific with no header guarantee. The honest version of both is documentation: OMP_WAIT_POLICY=passive is the operator knob for oversubscribed many-core hosts (7-parallel.md).
45. Ingest profiled, then one optimization kept: sort-based quantile cuts#
Decision. BONSAI_INGEST_PROFILE=1 breaks the CSV-to-Dataset pipeline into read / index / parse / mapper-fit / bin / buffer (the GrowProfiler pattern; accumulates across train + valid, prints at exit). Profiling MSD (463k×90) on an M-series laptop attributed half of ingest to mapper-fit: create_cuts ran ~253 nth_element calls per feature over a shrinking 200k suffix. Replaced with one std::sort + stride reads: every prior nth_element(lo, begin+k, end) call selected the absolute k-th order statistic (its prefix already held the smaller partitions), so the sorted array read is value-identical, verified by model-hash equality on MSD. mapper-fit 0.53 s → 0.25 s; total ingest 1.06 s → 0.76 s. End-to-end on the RTX 5090 benchmark (fair full-pipeline timing): cuda_depthwise 2.98 s → 2.61 s, cuda_oblivious 3.91 s → 3.50 s (medians of 3), RMSE unchanged.
Measured and rejected. memchr field splitting: parse 0.26 s → 0.25 s; MSD fields are ~7 chars, too short for SIMD scanning to beat the char loop; reverted rather than kept as complexity without payoff. mmap read and a batched transform were not attempted: read (0.11 s), bin (0.09 s), and buffer (0.03 s) are each under the 100 ms bar the plan set for touching a stage. from_chars already dominates parse and libc++ 21's implementation is Eisel-Lemire-class; no fast_float dependency.
Deferred: binned-dataset cache. A sidecar binary (source size+mtime+bin-config hash as the invalidation key, raw column dumps for the uint16 matrix) would cut warm reloads to ~0.1 s, like LightGBM's binary datasets. It is a product feature, not a benchmark lever: cross-library comparisons stay cold-parse for fairness (decision on bench_gpu.py timing), so it waits for its own PR.
46. Scaling suite: in-memory sweeps, synthetic Friedman target, frontier-as-data#
Decision. The scaling study (scripts/bench_scaling.py) measures fit/predict complexity in rows, cols, bins, and threads against xgboost/lightgbm/catboost from in-memory numpy float32 through each library's Python API (bonsai via the CUDA-enabled nanobind module), not CSV+CLI like bench_gpu.py. Corner CSVs would be 15–20 GB of text whose parse time is orthogonal to the question; the CLI's old justification (module was CPU-only) died with the previous PR. Fairness holds because fit is timed from raw arrays and includes each library's own ingestion (ColumnBatch+binning / QuantileDMatrix / lgb.Dataset / Pool); predict is timed from a raw test matrix; quality is scale-free R² train/test. Synthetic target is a generalized Friedman-1 (blocks of 5 informative features with decaying weights over ~20 of the columns, uniform features so bins populate evenly, noise for best-achievable R² ≈ 0.9); make_regression was rejected as purely linear: trees would neither differentiate on bins nor separate libraries. Data is deterministic in (rows, cols, seed) only, so bins/threads sweeps reuse identical matrices.
Grid. Base 1M×100×255 (depth 8, 100 iters, lr 0.1, 16 threads; 3 repeats at base for variance) with per-axis sweeps: rows ×4 to 16M, cols to 65k with rows shrinking past 4k cols (cells ≤ 2^31: a joint 2D log-fit over rows+cols cells de-confounds the tail), bins to 65535 (bonsai's bin_id_t cap; other libraries swept to their own refusals, recorded not assumed), threads {1,4,16,64} at base. A full cross-product at the user-set extremes is 2^40 cells; per-axis is the honest affordable shape.
Frontier as data. Every (cell, variant) runs in a child process with a size-scaled timeout; status ∈ ok/oom/timeout/error/unsupported/skipped with a message, and RAM/VRAM estimators pre-skip hopeless corners per host. What each GPU tier can and cannot fit is a first-class result (the reason for running 5090 + A100-80GB + 4090). The child-per-run design also delivers per-run profile capture for free: bonsai's exit-time profilers flush to the child's stderr. lgbm_cuda is declared unsupported in v1 (pip wheel lacks CUDA; source build deferred); catboost-GPU's 254-bin cap is applied and recorded as bins_effective.
47. Ingest and histogram-allocation rounds: measure on the platform that has the disease#
Decision. Rounds 1–2 of the optimization campaign (PRs #8/#9/#10): the Python module ingests via a parallel cache-blocked transpose, then (round 1b) bins directly from the row-major numpy matrix through new BinMappers::fit/Dataset::bin overloads: peak RSS fell from 4.8× to 1.8× of raw X with byte-identical models; and histogram cell blocks recycle through a size-class pool (HistBlockPool) with the oblivious level-finder's prefix scratch hoisted to per-worker storage. The pool's win is invisible on macOS (its allocator already recycles; paired Mac A/B was deliberately flat) and decisive on Linux, where fresh >mmap-threshold blocks page-fault per populate: G1 measured CPU depthwise bins 4095 at 3.1×, 16383 at 5.2×, and the 65535 cell went from timeout to completing. Lesson recorded: allocator-behavior optimizations must be validated on the deployment platform; the Mac can prove only non-regression.
48. The "5090 anomaly" was a defective host; benchmark pods now pass a sync-latency probe#
Decision. The scaling study's ~11–14s per-cuda-fit overhead on the 5090 host class was fully diagnosed in G1: one specific rentable machine has a GPU sync round-trip of ~300µs (healthy: 4µs measured on a second 5090), invariant to schedule flags (spin/yield/blocking), with perfect PCIe Gen5 x16 and 23.7GB/s pinned bandwidth, consistent with host-level ASPM/IRQ misconfiguration, unfixable from a container. bonsai's ~20–30k synchronizing ops per fit × 300µs reproduces the excess exactly. The allocator hypothesis was refuted by A/B on that host (async vs sync alloc identical); the stream-ordered allocator, pinned batched bins upload, and dynamic shared-memory opt-in (PR #11) stand on their own merits: the smem opt-in moved the 4095-bins cell from CPU fallback to GPU for a 17.4× win and exposed issue #12 (cuda_oblivious fallback trains garbage above the cliff, pre-existing). Benchmark protocol change: every rented pod must pass a 30-second sync-latency probe (>50µs → reject the pod), and the round-1 fleet's 5090 rows are annotated as defective-host data.
49. Row-wise histogram fill over a row-major u8 mirror; determinism relaxes to fixed thread count#
Status 2026-08-26: Dataset::row_major_bins was renamed; the mirror is reached as Dataset::mirror() (include/bonsai/dataset.hpp). The canonical determinism statement moved to invariants.md and learn/determinism-as-a-contract.md.
Decision. The scaling study's flat 2.5–4× CPU fit gap vs LightGBM was populate-bound (50–85% of fit) and, on deep small nodes, gather-bound: the feature-parallel fill reads one binned column per feature with bins[rows[k]] scatter, so a sparse node's every access misses cache, measured at ~0.7G adds/s against ~3.3G adds/s for large dense nodes (M2, adds counted by the profiler). CpuHistogramEngine::populate_many now fills u8 (max_bin ≤ 255) data row-wise over a lazily built row-major mirror (Dataset::row_major_bins, +n_rows×n_features bytes, never built by CUDA or predict-only paths): a level's nodes become row-block work units; each reads its rows' bins as contiguous 1×n_features strips regardless of node sparsity, streams grad/hess once total instead of once per feature, and accumulates into private per-block partial histograms merged in fixed block order. Nodes below a work threshold (fill ≥ ~16× the partial zero+merge cost) run as one block writing the node's cells directly (byte-identical to the old order), and the whole level shares one parallel section, so 128 deep nodes are 128 units instead of 128 serial parallel-section spawns. Base cell (1M×100×255, M2, 8 threads): fit 26.7→16.9s, populate 20.1→9.6s; 4M rows 43.0→25.3s; 1M×512 35.9→21.8s; identical R². LightGBM's same-cell fit on the M2 is 18.0s: first cell where bonsai CPU leads it.
The contract spend (user-approved). Multi-block nodes' sums depend on the block count, a pure function of node size, selection width, total selected bins, and the configured thread count, so models are bit-identical at a fixed n_threads (decision 7's original contract) but no longer across thread counts. Single-block nodes, the u16 feature-parallel fallback, split scans, and predictions still match serial order exactly. docs/architecture/7-parallel.md §"The determinism contract" is the canonical statement.
Measured and rejected. Two-accumulator parity splitting of the feature-parallel fill (microbenchmark promised 1.6×): exactly flat in the real loop at 1 and 8 threads: the microbench's arrays were cache-resident, isolating FP-chain latency the real streaming loop hides; kept the microbench-lies lesson, dropped the code. Block-count oversubscription beyond 4× threads: flat on M2. The row-major mirror as eager dual storage in Dataset::bin: rejected, CUDA runs would pay RSS for a mirror they never read.
50. Float histogram cells; double reductions; the empty-split demotion guard#
Decision. HistCell is {float, float} (was double). Per-cell sums are bounded by node size and gradients/hessians arrive as float, so cell storage carries only per-cell rounding; every reduction that crosses cells (Histogram::totals(), fill_prefix, the node finder's running left sums (split_sums_at now takes doubles)) accumulates in double and converts once at the store. Measured (paired, M2 8 threads): base cell fit 15.3→13.2s, 8M×100 53.3→45.7s (populate 1.23–1.25×), R² identical to six decimals at both scales; California-Housing eval baseline moved 5.4e-6 (re-pinned). Histogram pool, partial slabs, and prefix scratch all halve. The CUDA engine had already proven the shape (float per ≤32k-row chunk, double merge, RMSE parity): this brings the CPU fill to the same discipline. User-approved trade: models change (one-time re-pin), quality doesn't.
The bug it flushed out. Sibling subtraction in f32 leaves noise ~O(cell_sum × eps) in the derived child's cells, far above the gain > 0 gate, so a degenerate cut (every row one side) can score a tiny positive gain. In f64 the same mechanism existed at 1e-16 and never fired; in f32 it produced empty-child splits whose cover-0 nodes made SHAP contributions NaN (caught by test 60). Fix is structural, not precision-tuned: after partitioning, demote_empty_splits (depthwise plan) and the leafwise equivalent convert any split with an empty child back to a leaf: the partition's row counts are ground truth at any precision. Pre-allocated child nodes remain as unreachable placeholders; predict and SHAP walk from the root.
Rejected. A hist_precision runtime knob (f32 partials only, f64 default): measurement showed no quality cost, so the config surface buys nothing, and a compile-time macro would fork the ABI of a public-header type across builds and double the CI/wheel matrix. Keeping f64 cells with f32 only in partial slabs: leaves the direct-fill nodes, subtraction, and finder scans at 2× traffic for no accuracy benefit that the double-reduction discipline doesn't already provide.
51. quantile_step ceiling stride: cuts never exceed the budget#
Decision. quantile_step uses the ceiling stride ceil(n/(budget+1)) (was floor(n/budget), floored at 1), guaranteeing at most cut_budget cuts for any subsample size. The floored stride overshot whenever the subsample wasn't comfortably above the budget (400 distinct values at the default max_bin=255 produced 401 bins, 1000 produced ~335), giving small datasets more granularity than requested and silently disqualifying them from u8 storage and the row-wise fill (issue #17, found while writing decision-49 tests). Every model's cut positions shift (this is the second model-changing round after decision 50, landed back-to-back deliberately): synthetic 1M×100 R² identical at 0.8991; the California Housing eval baseline improves 0.7175214 → 0.7157657 (−0.24%), consistent with budget-respecting quantiles being no worse while small datasets regain the fast path.
Rejected. Keeping the floor and clamping cut count post-hoc (drop every k-th surplus cut): non-uniform quantile spacing for no benefit over the ceiling stride. Treating it as a documentation caveat: the silent u8 disqualification interacts with two performance features that key off max_bin<=255, which is too much surprise for a one-word fix.
52. Device residency: REFUTED by experiment; the lever is per-level staging latency#
Decision (revised twice, then measured). The phase-A experiment (PR #28, per the review directive on the design PR: prove it before redesigning APIs) refutes device-resident gradients: skipping every per-tree grad/hess upload saved 1.6s of a 42.5s fit (3.7%) at 16M×100 on an L40S, with upload_s unchanged at 7.5s. Both of this decision's prior premises misattributed that upload line: first to the one-time bins upload (~70ms), then to bulk gradient bytes (~1.6s at pinned rates). The line is actually hundreds of small per-level Staged<> syncs (node sums, bounds, row offsets: latency-bound pageable copies × ~800 tree-levels per fit), which residency does not touch. The next honest lever for the 42.5 vs 27.9s gap to xgboost-GPU: batch/pin the per-level staging and cut per-level host↔device round-trips. The CPU/GPU API-consistency redesign the experiment gated should target that: a level-transaction interface would make the batching natural.
What the experiment paid for itself with. A live mainline landmine: demote_empty_splits (decision 50) orphans device-plane row stamps when it fires after the device has scattered a demoted split's rows (one mega-leaf per tree at rightmost-spine node ids 2^k−2, feeding a score runaway), dormant under double-precision device sums, extracted as its own fix. Plus the diagnostic pattern that found it: per-tree device-state dumps diffed against the model's own predictions.
Rejected. Continuing to phase B (device binning) or the API redesign on the unmeasured premise; debugging the experiment's residual 16M-only quality gap (r² 0.79 vs 0.89) once the timing verdict had already killed the approach.
53. The level-transaction engine narrative (adopted)#
Status 2026-08-26: the narrative doc this entry ratified was dissolved by decision 114; its still-true residue, the plane composition, lives as comments in src/cuda/detail/device_context.cuh, and the concept sketch it drafted shipped under different names (see include/bonsai/grower.hpp).
Status. Executed. Step 1 (transaction vocabulary on both planes, byte-identical) landed in PR #33; steps 2–3 landed as one change set: the identity row list cached on device and restored D2D per tree instead of re-uploaded (the avoidable share of the root line), and end_tree handing the node value table to the engine, which maps rows to leaf values on device and returns values/leaf ids in two bulk copies (replacing the finalize line's per-tree host stamping loop over every row). The Impl decomposition shipped in the same set. One deliberate deviation from the sketch below: gh_ordered lives in LevelPipeline, not GradientPlane; it is the level-row-ordered gather and ping-pongs with gh_b.
Decision (proposed). The CPU/GPU engine APIs unify around a level-transaction narrative (begin_tree / open_level(LevelInputs) → LevelOutputs / apply_level / end_tree() → TreeEpilogue) with the backend an implementation detail, per the review commission on the device-residency design. The shape is derived from the measured 16M ledger (PR #31), not from a lever bet: the root becomes an ordinary one-node level (dissolving begin_root's bespoke per-tree staging, the ledger's largest line at ~14s), open_level's single-struct input batches the per-level staging by construction, and end_tree owning the per-row epilogue is where finalize residency (8.4s of per-tree D2H + host stamping) can land with its real motivation. CudaHistogramEngine::Impl (41 buffers) decomposes into DeviceData / GradientPlane / LevelPipeline planes with ledger-exposed lifetimes. Migration in three bit-identical-gated PRs: host plane first, device plane onto the transactions, then the device epilogue. Full design: docs/architecture/14-engine-narrative.md.
Rejected. Redesigning around the refuted residency/staging levers; a single templated engine (hides the narrative); fusing the level phases into one transaction (the control plane must observe results between them: doc 12's host-control contract stands).
54. Device binning at ingest (adopted)#
Status. Implemented. cuda_ingest (both arms), the IngestPlane receipt on Dataset with lazy host materialization, plane adoption in ensure_dataset, pipeline wiring by grower-name prefix, and the doc-16 instrumentation (bins_upload, fin_wait/fin_d2h, dbin, fit-profile in the bench harness) shipped as one change set. One correction from implementation: the module path bins from the borrowed row-major numpy view (features_view), CSV from the feature-major ColumnBatch; the doc-15 draft had the arms swapped.
Decision (proposed). Ingest joins the transaction narrative as the zeroth verb (ingest(raw, mappers) → IngestPlane) with the backend an implementation detail (doc 16 frames the narrative as a compute DAG; this is the last node outside the vocabulary). The host backend's ingest is today's fill_binned, untouched. The CUDA backend's ingest streams raw columns through double-buffered pinned staging and a lower_bound-exact bin kernel; its product is an opaque IngestPlane handle carried by Dataset as the transaction's receipt (defined in the CUDA TU, null in stub builds, the row_major_ lazy-mirror precedent). The train pipelines select the ingest backend the way growers dispatch (cuda name prefix + cuda_available(), training dataset only); ensure_dataset adopts its own plane instead of copying and uploading host bins. Host binned columns are not materialized in device mode: the fallback-decline arm (oversized max_bin, decidable at ingest) keeps the host path outright, and route_unsampled's bin_at triggers a one-time cached D2H materialization only when row sampling is on. Cuts stay host-fitted (identical transform semantics ⇒ bit-identical bins ⇒ before/after models must be equal, the gate). Motivation is the measured line, not a bet: host bin ~4.6s of 1.6G binary searches + an unlapped 1.6GB upload, replaced by ~0.5s of overlapped transfer+kernel at 16M×100 (same-pod L40S; priced by the measured 19GB/s gh edge, scripts/dag_model.py). Ships with the missing lap counters (bins_upload, finalize fin_wait/fin_d2h, ingest dbin): the PR #35 refutation was designed against an undecomposed finalize line, the fourth such miss. Full design: docs/architecture/15-device-binning.md.
Rejected. Engine-side rebinning (the host transform is the cost); retaining raw floats on Dataset (+6.4GB RSS at 16M); device mapper-fit this round (reservoir-RNG identity: model-changing, deferred to its own decision); a config knob for device binning (it is an implementation detail of the cuda growers, not a user choice); the first draft's DeviceBins side channel on Dataset (identical mechanics, but the API grows by exception instead of by the narrative's vocabulary).
55. The cut-quality gap is not sample size (study)#
Study (2026-07-12). The residual test-r² gap to xgboost-GPU at the 16M×100 cell (bonsai 0.8791 vs xgb 0.8800) was hypothesized to come from fitting cuts on a 200k-per-feature subsample. Sweeping bin_mapper.n_samples over {200k, 1M, 4M, 16M (full column)} on one pod, same cell, same seed: r²_test moves 0.879083 → 0.879048 → 0.879194 → 0.879261 (+0.0002 end to end, ~2% of the gap), while fit cost is flat (the mapper's reservoir scan, not the sort, dominates and even that is noise at this scale). Verdict: sample size is a dead lever; the 200k default stands. Follow-up (same day, issue #42) dissolved the gap entirely: bonsai trained on xgboost's exact cut set (extracted via DMatrix.get_quantile_cut()) scores the same as on its own cuts (0.879034 vs 0.879083), and xgboost's own r² moves by 0.001 (the full size of the "gap") between max_bin 255 and 256 (0.879953 vs 0.878966, same pod, same seed). There is no sketch deficit; at this cell every library sits in a ±0.001 band governed by threshold-placement chance, and no research round is warranted.
Rejected. Raising the default n_samples (cost without benefit); treating the gap as a defect to chase this round (it is a documented trade at +0.0009 r², with bonsai holding a 3× host-memory and ~3× predict-speed advantage at that cell).
56. Quality-campaign fixes: the oblivious veto, exact duplicate cuts, the true softmax hessian (adopted)#
Decision. Three model-changing fixes from the 2026-07 quality campaign (benchmarks/quality-campaign-2026-07.md), each probe-confirmed on real datasets before implementation: (1) the oblivious level scan no longer vetoes a candidate when one frontier node's children fall under min_child_hess: the infeasible node contributes zero gain and the broadcast split still applies (empty children are first-class since #57); this was worth 3–26% rmse on real data and moves bonsai-oblivious ahead of catboost. (2) create_cuts emits one right-inclusive cut per distinct value when the subsample's distinct count fits the budget (the stride+dedup previously collapsed house_sales' 13-value bedrooms column to 7 cuts); measured net-neutral on the campaign but objectively correct: the California pin moves 0.7157605 → 0.71625 (+0.07%). (3) the multiclass hessian is the true diagonal p(1−p); the factor-2 variant halved every Newton step and cost exactly 2× the iterations to match lightgbm (letter 0.9515 → 0.9613 at the same budget). Post-fix, bonsai-depthwise is the best-scoring library on 8 of 9 campaign datasets.
Rejected. Keeping the veto with a lower default min_child_hess (the veto is wrong at any threshold: one node should never censor the level); weighting duplicate cuts by count above the budget (deferred to #63, where continuous placement is the live question); retaining the factor-2 hessian for "xgboost compatibility" (xgboost loses to both at matched budgets precisely because of it).
57. Count-weighted cuts for heavy-value columns only (adopted)#
Decision. The #63 follow-up to decision 56's cut work: above the distinct-value budget, a column where some value's count reaches a mean-sized bin gets lightgbm-shaped greedy allocation: heavy values take a bin to themselves, the rest fill toward a running mean, cuts at midpoints between adjacent distinct values (greedy_weighted_cuts in src/bin_mapper.cpp). Columns with no heavy value keep the decision-51 quantile stride bit-identically: with every count below a mean bin, equal frequency already is the count-weighted allocation, so the greedy walk could only reshuffle thresholds inside the chance band. Measured on the campaign suite: house_sales 131,841 → 128,959 rmse (27% of the gap to xgboost), every other standing unchanged, bonsai-depthwise still best on 8 of 9; the California pin moves 0.71625 → 0.71719 (+0.13%, chance-band). Both cut placements were probed and are metric-equivalent (midpoint vs value cuts produce identical training bins when the sample covers the column); midpoint kept as the principled choice for unseen test values.
Rejected. Greedy allocation for every over-budget column (measured: house_sales gains more, 126,528, but magic_telescope drops below lightgbm and phoneme's depthwise drops below the best ref: a chance-band tax on every continuous dataset to overfit one; the per-column rule takes the heavy-value win without the tax); closing #63 (bonsai at 511 bins matches xgboost at 256 on house_sales: the refs extract more from an equal budget on dense-continuous columns, so per-column budget allocation stays an open research question, kept in tension with decision 55's synthetic verdict).
58. Categoricals resolved by measurement: an encoder, not an engine feature (adopted)#
Decision. Categorical support ships as OrderedTargetEncoder in the Python package (causal/ordered target statistics, seeded and deterministic, keep_codes giving trees both the response-rate and identity views) plus guide chapter 13: the C++ core stays numeric. The call was bought with a probe, not taste (scripts/probe_categorical.py, evidence in benchmarks/categorical-tradeoff-2026-07.md): each reference library's categorical machinery toggled on/off at matched knobs on amazon/adult/kick measured native Fisher set splits (the doc-17 stage-2a design, which would have grown the ~1,400-line split/tree/SHAP/model-format core by roughly a third) at +0.029 / +0.000 / −0.018 AUC by lightgbm's own toggle: a coin flip whose complexity every user carries. Meanwhile ~100 lines of preprocessing hit 0.8590 on amazon, beating lightgbm-native (0.8572) and closing 48% of the gap to catboost-native (0.8894, whose ordinal baseline collapses to 0.779, so much of its celebrated categorical gain is recovering its own weak numeric path). On the repo's own amazon split the encoder is worth +0.049 AUC (0.811 → 0.860), pinned by test_encoding.py. Doc 17's design stays on the shelf, priced and declined; the probe method is codified as the feature-admission skill.
Follow-up (same day). Crossed pairs close the rest of the gap, still from preprocessing: cross=2 on the encoder packs each pair of code columns into an int64 key and applies the same ordered TS: amazon 0.8604 → 0.8877 vs catboost-native 0.8897 (chance-band at this test size), with catboost's own toggle as the control: max_ctr_complexity=1 (crosses off) drops it to 0.8587, below our singles line: the crosses were its entire remaining edge, and our single-column ordered TS already beats theirs. Triples measured 0.8859 (overfit, rejected as a default). Probe: scripts/probe_crossed_ts.py; pinned in test_encoding.py.
Rejected. Stage-2a native set splits (measured median gain ≈ 0, negative on kick, cost concentrated in the most-read files in the repo); plain or K-fold target encoding (stage 1 measured the leak: 0.8462 vs 0.8590 ordered: causality is load-bearing, guide 13 derives why); xgboost-style native handling (its own toggle loses on 2 of 3 datasets); engine-side stage 2b for now (per-tree permutations + crossed-category statistics are catboost's remaining amazon edge, +0.030, and crossed-TS preprocessing is the next cheap probe before any engine work is reconsidered).
59. Cross-architecture bit determinism: no fp contraction on the host plane (adopted)#
Decision. -ffp-contract=off for all host C++ (CMake directory option; the CUDA kernel TU opts back to fast, the device plane's f32-chunk/f64-merge scheme owns its precision story and no cross-platform hash contract covers it). Found when decision 57's midpoint cuts split the California pin by platform (0.71719 arm64 vs 0.71725 x86-64, each internally deterministic): a temporary CI test dumping every cut bit-exactly proved the bin mappers identical across platforms, which cornered the divergence in training arithmetic: clang contracts a*b+c into single-rounded fma on targets that have the instruction (arm64) and cannot on baseline x86-64, and the new thresholds put one split decision inside that one-ulp window. Flipping -ffp-contract=off on the Mac reproduced the Linux value exactly, confirming the mechanism. Measured cost: nil (interleaved 5-rep California 2000-iter fits: 1.736 vs 1.738 s; the hot paths are adds and divides, not fused-multiply-add shapes). This upgrades the determinism contract from thread-count invariance (decision 32) to the same model bits on any host architecture: no reference library makes that claim. The eval pin and the model_hash.py baseline are now platform-independent by construction (baselines refresh with this change; the campaign quality tables were measured pre-flag on arm64 and move at rounding level only).
Rejected. Widening the pin margin to a platform band (surrenders the pin's one-ulp sensitivity and the reproducibility story); per-platform pin values (documents the symptom, keeps the disease); -ffp-contract=off on the CUDA TU too (fma is the native device op; nothing gates device bits across platforms, and the device/host boundary is already tolerance-checked where it must be).
60. Issue #72 resolved: the "cross-arch divergence" was OpenMP build variance (adopted)#
Decision. Parallel training is bit-identical across host architectures, proven, not just claimed: with matched builds, arm64 and x86-64 produce byte-equal models at every thread count tried (t1 f35340da495343c1, t2 9e2c081bd5e3fcfe, t4 fb5692c2aebea4fe, t8 afc31f746baaafb7, sampled default 8c2c375a331a1bb7; per-block root-histogram cell bits diffed to zero on a 2-thread minimal artifact). Issue #72's "architecture divergence" was a phantom with a real cause: find_package(OpenMP) fails on a stock Mac (homebrew libomp is keg-only, the llvm kegs ship no OpenMP), the failure was a silent STATUS fallback to a serial build, and serial builds train different (valid, but not build-reproducible) bits than parallel ones because the fill plan's block counts scale with parallel::n_threads() (the documented fixed-N contract). Worse, the Makefile's python configure sent its output to /dev/null, so which build you got was invisible. Three fixes: (1) CMake hints homebrew's keg-only libomp explicitly on macOS; (2) OpenMP-not-found is now a hard configure error: a build variant that changes model bits must never be silent; serial stays available as an explicit -DBONSAI_OPENMP=OFF; (3) the python configure's OpenMP/error lines are no longer swallowed. The cross-arch CI gate now asserts both serial and parallel hash equality across the runner pair. Model bits are henceforth a pure function of (input, config, configured thread count), on any machine.
Rejected. Keeping the silent serial fallback (it manufactured issue #72 and cost a night of ulp-level forensics (a fill-plan bit dump, thread/iteration ladders, and an on-pod x86 bisection) to exonerate arithmetic that was never guilty); making the fill plan thread-count-independent (a fixed global block count either starves big hosts or taxes small ones; the fixed-N contract is the documented, measured trade); chasing the third hash family observed on one destroyed local build and one opaque runner configure (the loudness fix eliminates the class, silent variants can no longer exist).
61. The populate round: software prefetch closes the 16M CPU gap (adopted)#
Decision. One change, priced from the ledger before it was written: the fill row loop prefetches the mirror strip and grad/hess pair sixteen rows ahead (run_fill, src/grower.cpp). Below the root a node's rows are an ascending subset, so successive row-major strips sit at irregular strides the hardware prefetcher cannot follow; the 16M×100 ledger showed the loop DRAM-latency-bound: populate 82.1s of a 107.4s fit (row loop 78.3s), everything else ≤ 12s. After: row loop 45.5s (−42%), fit 75.8s, a dead tie with xgboost-hist's 75.7s, same pod, same session (was 1.42× behind). Reads only, models byte-identical (hash gate f35340…/8c2c37… unchanged, r² to four decimals), 4M improves 30.2→24.3s. This closes the largest visible CPU loss on any chart.
Rejected. The same prefetch in the partition passes (measured: 75.85s vs 75.76: noise; refutation logged and the change reverted, per the doc-16 rule that unmeasured complexity does not ship); constant-hessian cell elision (the hess add lands on the already-loaded cache line: priced as ~free before any code); prefetch-distance tuning beyond the first guess (the first guess hit the ledger's floor; further squeezing trades maintenance for noise-level gains).
62. The GPU find-kernel round, abandoned by instrumentation; the 16M GPU frontier belongs to catboost (adopted)#
Decision. No GPU kernel-optimization round ships, and the docs stop implying a large-scale GPU speed crown over catboost. Both conclusions are measurements, not opinions.
The round was scoped to speed up the device find kernel (all-double warp scan, suspected FP64-bound on an L40S). Instrumenting first (a profile-gated sync splitting the find lap into kernel-compute vs device→host transfer (find_kern_s/find_d2h_s in histogram_engine.cu, profile path only)) showed the find kernel costs 0.17s at 16M. The "8.4s find" in the grow profile is the profiler's opening cudaDeviceSynchronize in find_splits_many catching the previous level's asynchronous histogram kernels; the find scan itself is negligible. The genuine ~8s GPU cost is the histogram accumulation, which already sums in float shared memory (double only for the bounded cross-chunk merge), so the obvious precision lever is spent. Every banked hypothesis was refuted by one measurement: the instrument-first pass is the deliverable, turning a speculative multi-hour rewrite into a measured no-go.
That reframed the question from kernel speed to the whole accuracy-vs-time frontier at 16M (benchmarks/gpu-pareto-16M-2026-07.md, all one pod). The honest result: bonsai strictly dominates xgboost-GPU (reaches xgboost's 100-iteration accuracy 0.8776 in 30.16s vs 36.69s, and beats it at every matched-accuracy point), but catboost owns the frontier at every accuracy above ~0.875: catboost@150 (28.35s, 0.8892) is faster and more accurate than bonsai cuda_depthwise@100 (30.16s, 0.8776). Decomposed against the structural match (bonsai's symmetric cuda_oblivious), catboost's lead is two independent gaps: a per-round speed gap (~15–20%, its tuned symmetric-tree kernel) and a per-round convergence gap (+0.011 test r² at 100 iters, same tree shape, its ordered boosting corrects the prediction-shift bias in ordinary gradients). The earlier "bonsai is more accurate than catboost" reading was a fixed-100-iteration artifact that the frontier dissolves. Closing this needs both a histogram-kernel rewrite and an ordered-boosting-style change to the core booster; winning either alone leaves the other gap standing.
Consequence. bonsai's crown over catboost rests on the other axes: bit-identical cross-architecture determinism (§59–60, no competitor has it), a third of the host memory, an ~1,800-line engine, chance-band categorical parity via preprocessing (§58), and best-of-field CPU quality on 9 of 10 real datasets, not on large-scale GPU throughput, where it is strictly ahead of xgboost and roughly 20% behind catboost.
Rejected. A histogram-kernel memory/atomic-contention rewrite under the promo deadline (real project, not a knob); quoting the fixed-100-iteration cell as evidence bonsai out-accuracies catboost (the frontier refutes it); any framing of "strictly superior to all three libraries on performance" (unsupported: catboost wins this cell on speed).
Corrected by §63. The "convergence gap" attributed to catboost's ordered boosting above was wrong. The feature-admission ladder refuted ordered boosting (a wash vs boosting_type=Plain, which catboost uses at scale anyway) and bin quality, then isolated the +0.011 to a bonsai bug: the GPU oblivious level-find still vetoed level candidates on infeasible nodes, a defect the CPU had fixed (issue #60). Patched, GPU cuda_oblivious matches its CPU twin and catboost's accuracy exactly. Only the ~19% per-round kernel-speed gap is real: a bounded optimization target, not an algorithmic disadvantage. Study: benchmarks/catboost-scale-edge-2026-07.md.
63. GPU oblivious lost accuracy at scale to a missing issue-#60 port, not to catboost's algorithm (adopted)#
Decision. Port the CPU level-find's issue-#60 behavior to the device level_find_kernel: an infeasible frontier node (child hess < min_child_hess) contributes its parent score (zero gain) instead of vetoing the whole level split. The kernel previously computed warp_all(feasible) across the frontier and dropped any candidate with one infeasible node: the pre-issue-#60 pathology (decision 56) that at depth ≥ 5, where some node is always near-empty, rejected every good deep cut. The veto, its device scratch (level_feas), and the now-unused warp_all helper are removed.
Why it was found. cuda_oblivious scored 0.8638 test r² at 16M vs its own CPU grower's 0.8749 (and catboost's 0.8751), while cuda_depthwise matched CPU (0.8776 vs 0.8782). Precision was ruled out (device histogram cells are double, more precise than the CPU's float); ordered boosting and bin-sample quality were ruled out by the feature-admission ladder. That localized the loss to the oblivious device level-find, and the code diff to the CPU was the veto. The bug hid because small-data GPU-vs-CPU oblivious tests never produce a near-empty node; the new test forces one with a high min_child_hess at depth 7 (fails pre-fix, GPU −0.019 vs CPU 0.324; passes post-fix).
Consequence. Same pod, 16M: cuda_oblivious 0.8638 → 0.8749, matching CPU to the fourth decimal and catboost's 0.8751: the accuracy gap that read as a convergence disadvantage (§62) was ours all along, and every cuda_oblivious user at depth ≥ 5 was silently getting worse models at scale. The honest residual against catboost is now a single ~19% per-round kernel-speed gap (0.238 vs 0.292 s/iter), which is efficiency, not algorithm. Full [cuda] suite green (125,864 assertions); no CPU model bits touched, so the cross-arch hash gate is unaffected (the device plane is tolerance-equal, not bit-equal, by design).
Rejected. Closing the residual kernel-speed gap in the same change (a separate, bounded optimization: measure the oblivious kernel's occupancy and launch overhead first, per decision 62's instrument-first rule); leaving the veto with a comment (it silently degraded every deep oblivious GPU fit: a correctness bug, not a tuning choice).
64. One shared row sample for binning, not one reservoir pass per feature (adopted)#
Decision. BinMappers::fit draws a single seeded row sample for the whole matrix and gathers each feature's values at those rows, instead of each feature independently reservoir-sampling its own column. The old create_subsample ran std::ranges::sample over a NaN-filtering view (an O(n) pass) once per feature; at 16M×100 that was 100 passes over 16M rows, and the BONSAI_INGEST_PROFILE lap put mapper-fit at 8.45s on the Mac / ~5.7s on an L40S, pure serial host time before any training (and time catboost, which bins on device, does not pay). The shared sample runs the O(n) selection once, then each feature does an O(n_samples) gather: mapper-fit 8.45s → 0.35s at 16M (24×), r² unchanged to four decimals (0.8782 both): the bin-sample study (§ the scale-edge note) already showed sample count is quality-neutral past ~200k rows, so a different-but-equivalent sample moves nothing.
Determinism and scope. Bit-identical for any dataset that fits the sample: n_rows ≤ n_samples takes the whole-column path unchanged, so every small-data test and the serial model hash (model_hash.py runs 500k rows with n_samples=500000) are untouched. Only fits above n_samples get new cuts: the default (sampled, 8-thread) hash changes, superseding decision 60's 8c2c375a331a1bb7; the serial f35340da495343c1 stands. std::ranges::sample over an iota_view uses selection sampling with mt19937 (deterministic and architecture-independent) so the cross-arch gate (which compares arm==x86 dynamically, no hard-coded baseline) still holds, and the fixed-thread-count contract (decisions 59–60) is preserved. Two tests pin it: a >n_samples fit is reproducible cut-for-cut, and the ColumnBatch/features_view overloads agree.
Consequence. Measured same-pod at 16M (L40S, 100 iters): cuda_oblivious 19.65s vs catboost 18.85s at matched accuracy (0.8749 vs 0.8751), a ~4% residual, down from the ~19% §63 flagged, with mapper-fit falling from ~5.7s to 0.77s of the fit. Combined with §63's accuracy fix, bonsai's GPU oblivious went from slower and less accurate to even on accuracy, within 4% on speed. Every large CPU fit gets the same ~8s ingest saving. It is the standard lightgbm/xgboost approach (sample rows once); bonsai had simply not adopted it.
Rejected. Preserving the exact per-feature reservoir bits (would keep the 100× O(n) cost for no quality gain, since the sample is quality-neutral); a bit-preserving fast path only for NaN-free columns (fragile: depends on std::ranges::sample's implementation-defined selection matching a hand-rolled reservoir, and still O(n) per feature to detect NaN).
65. Reusable pre-binned Dataset with a sealed bin config (adopted)#
Decision. PR #91 adds a Python-level bonsai.Dataset(X, y, weight=None, max_bin=255, n_samples=200000, seed=0, min_data_in_bin=1) that runs BinMappers::fit + Dataset::bin once at construction, then feeds the same bonsai::Dataset to every train(params, dataset) call. A hyperparameter sweep or CV loop skips the per-fit bin pass entirely. Verified bit-identical to fitting from (X, y) directly.
Consequence. Because the object address is now stable across fits, the CUDA resident-matrix upload-skip cache (decision 54's ensure_dataset) actually fires for the first time: previously every train() built a fresh Dataset, so the cache never hit. Lifetime is simple: the wrapper pins the numpy X buffer, and FeatureBuffer borrows it row-major with no float materialization.
Sealing the bin config. bin_mapper.* overrides via params are rejected by key-prefix at the Python boundary. The harder case is a config file: value comparison can't distinguish an absent section from one explicitly restating defaults, so a file setting max_bin = 255 against a Dataset built with max_bin=63 must still error rather than silently discard the Dataset's binning. Two follow-up commits on PR #91 closed this: f899e52 added a structural check, config::toml_has_section(), that tests for section presence rather than value equality, and a further pass made the guard general and exposed min_data_in_bin.
Rejected / deferred. Disk persistence, row-subsetting for CV, and fit(dataset) on the sklearn estimators are deliberate non-goals of this MVP. The eval_set/early-stopping path in train(dataset) was a known gap in the MVP, tracked and closed separately (see branch feat/dataset-eval-set).
66. Prebuilt wheels from native runners, not manylinux containers (adopted)#
Status 2026-11-10: GitHub retired the macos-14 runner image on 2026-11-02, so from 2.11.0 the macOS leg builds on macos-15 and its wheel carries the macosx_15_0 tag; the rest of the matrix stands.
Decision. PR #94 + #98, shipped in v1.2.0: 15 wheels + sdist attach to the GitHub Release automatically on release: published. Matrix is {ubuntu-22.04, ubuntu-22.04-arm, macos-14} × py{3.9–3.13}, CPU-only.
Why not cibuildwheel/manylinux. bonsai requires LLVM ≥ 20 with libc++ (C++23 std::print/std::mdspan). The official LLVM release binaries need a newer glibc than the manylinux_2_28 container ships, so wheels build on plain runners with apt.llvm.org LLVM 21 (Linux) / brew llvm@21 (macOS) instead. auditwheel/delocate vendor libc++ (+ libc++abi/libunwind) into each wheel; OpenMP is statically linked via the pre-existing BONSAI_OPENMP_STATIC, so zero C++ changes were needed to make this work. auditwheel tagged the result manylinux_2_34 (dual-tagged 2_35): actual glibc floor 2.34, so RHEL 9/Alma 9 are covered, a better floor than the Ubuntu 22.04+ design target implied.
Python floor. Lowered to 3.9 in PR #98 (concrete user use case, reversing an earlier decline). Four touchpoints, not one: requires-python, the CMake find_package(Python) floor (a pyproject-only audit missed this; the local 3.9 build caught it), the wheels matrix (now 15 legs), and ruff target-version=py39 so 3.10+-only syntax can't regress in.
Verification. Every wheel installs into a clean venv and runs a smoke script: regressor fit, classifier predict_proba, Dataset train, and (added after PR #95 found from_file broke on Python 3.10 because tomllib is 3.11+ stdlib and the original smoke test never called it) a save/from_file round-trip across the whole version matrix.
Consequence. PyPI publish is deliberately deferred until trusted publishing is registered (bonsai-gbt name + pypi.org trusted publisher, an owner action); wheels ship via GitHub Releases in the meantime. CUDA wheels are out of scope here and tracked as issue #99: the design is a fat-arch linux x86_64 leg plus a rented-GPU validation gate before assets attach, since GitHub-hosted runners can build CUDA but never execute it.
Rejected. A manylinux_2_28 container image to reach older distros (a documented follow-up, not blocking; no user has asked); PyPI publish in this PR (needs the owner-side trusted-publisher registration first).
67. Automatic per-feature bin budgets: declined by measurement; explicit user edges: open design question (partial)#
Decision. No engine API for per-feature bin budgets or user-supplied edges (issue #63's residual; lightgbm ships max_bin_by_feature, catboost ships per_float_feature_quantization). Priced at zero core cost by scripts/probe_binning.py on five datasets at campaign knobs: budgets emulated exactly through the issue-#61 one-cut-per-distinct rule for bonsai, and priced natively via lightgbm's own toggle. Best observed gain anywhere is +0.0011 (synthetic with known signal structure, unlimited extra budget), at the decision-55 chance band; the importance-guided policy loses outright on adult (−0.0011 AUC) and kick (−0.0096), and lightgbm's own toggle is ≤ +0.001 at best and negative on kick. The inverse-allocation control costs up to −0.084 r², so budgets are causally live but asymmetric: uniform 255 sits at saturation and reallocation can only break things. The headroom policy on MSD (−0.0003) also kills the hypothesis that decision 55's +0.001 cut-quality residual is a resolution-allocation problem. Full table in benchmarks/binning-tradeoff-2026-07.md.
Consequence. What is declined is the ACCURACY-motivated feature: automatic importance-driven budget allocation buys nothing at the 255-bin default and misallocates on real data. What stays open is the CAPABILITY: user-supplied explicit bin edges are a deployment-artifact question the probe never measured. The pre-discretization emulation is bit-exact at train time but leaves the binning OUTSIDE the model artifact: every serving path must re-apply the transform forever, and predict on raw features silently produces garbage. A native Dataset(bin_edges=...) would bake edges into the per-feature BinMappers, which already serialize into the model, so predict round-trips on raw values; the design is specified in architecture doc 18 and admission-gated on a concrete workload. The default also gained evidence: uniform max_bin = 255 is robust in a way per-feature schemes are not.
Rejected. An engine API "because lightgbm and catboost have one" (their own measurements above justify declining it); shipping ManualBinner as a package class (unlike the categorical encoder, the preprocessing won nothing, so it stays a documented recipe, not an API surface).
Reopen the accuracy branch if: a memory-constrained regime forces the global budget down (max_bin ≤ 64, where saturation no longer holds and allocation could matter; never measured). Admit the capability branch when a concrete workload needs domain-mandated bins in the model artifact (regulatory bands, clinical thresholds, reproducing an existing scheme); doc 18 prices it.
68. The Grinsztajn benchmark becomes the standings suite; bonsai has the best mean rank (adopted)#
Decision. Adopt the 55-task Grinsztajn et al. (2022) benchmark (OpenML suites 297/298/299/304) as the external standings suite, replacing the hand-picked internal ten as the citable table (scripts/run_tabular_suite.py, benchmarks/grinsztajn-2026-07.md; the internal campaign stays as the fast smoke tier). At the paper's medium protocol and campaign-matched knobs across 990 fits: bonsai has the best library mean rank, 2.04 vs xgboost 2.11, lightgbm 2.53, catboost 3.33, with the most consistent profile in the field: second place or better on 44 of 55 datasets and last exactly once. xgboost keeps the most outright wins (26 vs bonsai's 10): it is the peak library at small-data knobs, bonsai the consistency library. bonsai leads categorical regression outright (mean rank 1.77).
Why external. A self-picked suite invites a selection-bias objection that no honesty of execution can answer; a published benchmark selected by third parties removes it. The claim format also improves: distributional (mean rank, head-to-head, rank distribution) instead of a win count over ten.
Caveats recorded with the numbers. The 10k-row cap is decision 55's regime (xgboost's cut-quality edge at its strongest); ordinal codes strip catboost's categorical machinery (uniform convention, undersells catboost on categorical tracks); depthwise and leafwise coincide at these knobs so library-level best-variant ranking is used.
Rejected. OpenML-CC18 (image-flattened datasets dilute the tabular story); TabZilla-176 (volume over curation); running references on GPU for wall-clock (GPU paths change reference numerics and reproducibility; accuracy standings are hardware-independent). TabArena submission (the living leaderboard with external protocol) is the post-promo follow-up, not rejected.
Correction (same day). The first run hardcoded xgboost's min_child_weight = 1 instead of the campaign mapping (= min_data_in_leaf = 20, scripts/reference_params.py), giving xgboost ~20x smaller leaves than the other libraries were allowed; under that skew xgboost ranked 2.11 with 26 outright wins. Re-run at the campaign mapping: bonsai mean rank 1.73 with 27 outright wins, lightgbm 2.35, xgboost 2.73, catboost 3.20; bonsai >= xgboost on 42 of 55. Because min_child_weight is hessian-weighted (20 implies ~80+ rows per leaf on classification, harsher than the others' 20 rows), the two conventions bracket xgboost and the claim kept is the one that holds at both ends: bonsai has the best mean rank under either. The remaining named losses to xgboost, year (+0.0066 r²) and yprop_4_1 (+0.0053), are the decision-55 residual with real datasets attached. Sensitivity rows preserved in results/grinsztajn-2026-07-xgb-mcw1.jsonl.
69. The benchmark charter: bonsai.bench in the wheel, two divisions, one row schema (adopted)#
Decision. The benchmark harness moves inside the Python package (bonsai.bench: params, metrics, synth, runlog, datasets, and the grinsztajn/scaling suite runners), shipped in the wheel behind a [bench] extra so pip install bonsai-gbt[bench] reproduces the published tables; import bonsai stays numpy-only via lazy imports. Every result row is one of two closed divisions: quality (metric primary, timing never citable) or perf (timing_mode mandatory: in_memory vs pipeline), self-described by row schema v1 (division, suite, knobs + hash, metric/value, timing_mode, git sha, full host capture). Knob sets (CAMPAIGN, SCALING) and the two declared lightgbm leaf conventions live only in bonsai.bench.params: hand-re-deriving reference mappings caused decision 68's published correction and is now structurally prevented and test-pinned. The normative rules are docs/method/benchmark-protocol.md; migration verified by a byte-identical model-hash gate, byte-stable Friedman goldens, and a zero-mismatch replay of committed grinsztajn rows.
Rulings. Completed probes are provenance and stay as-run (annotated, never refactored onto the new library); bench_categorical's deviating knobs stay annotated rather than rerun; benchmark data stays in tests/data/ (moving it would touch configs, Makefile sentinels, and CI caches for zero mechanical gain) with the registry as machine truth and the test-pin fetchers kept build-independent for CI; superseded results files are deleted, git history being the archive (rebaseline.jsonl/.md removed, superseded by the dated re-baseline).
Rejected. A repo-local scripts/benchlib (users could not reproduce tables from an install); moving data out of tests/data; regenerating any committed row under the new schema (old and new rows coexist; readers tolerate both).
70. CUDA wheels: fold-in, static cudart, and a rented-GPU release gate (adopted)#
Decision. The linux x86_64 release wheel ships the CUDA backend (issue #99): SASS for sm_70;sm_75;sm_80;sm_86;sm_89;sm_90;sm_120 plus a compute_90 PTX forward-JIT floor (sm_100 JITs; BONSAI_CUDA_ARCH became a list, BONSAI_CUDA_PTX_ARCH pins the PTX), built with CUDA 12.8 (12.6's ptxas cannot emit sm_120; clang cannot target 13) and CUDA::cudart_static (BONSAI_CUDA_STATIC_RUNTIME), so the extension carries zero CUDA DT_NEEDEDs, auditwheel grades manylinux_2_34, and GPU-less machines import a de-facto CPU wheel. Measured on the leg-0 probe before commitment: the whole backend costs 2.33MB of wheel (control 1.27MB; xgboost's GPU wheel ~300MB) and ~5s of build for six extra arches; no CUDA runtime symbols exported. Because GitHub runners can build CUDA but never execute it, releases gate through one rented L40S session that boots the candidate runtime image (docker/runtime.Dockerfile, wheel baked in, published as ghcr.io/daniel-m-campos/bonsai:{<tag>-cuda,cuda} after the gate): on-pod wheel_smoke_cuda.py (both cuda growers, pre-registered 1e-3/0.005 parity bands, byte-stable save/load round-trip) plus model_hash.py, whose output must equal CI's, extending the decisions 59/60 byte-identity contract to shipped artifacts on real GPU hardware; the wheels workflow's hash-compare job asserts the same triple equality (macos-arm, linux-arm, linux-x86-with-CUDA) on every wheel build. Teardown is unconditional with a loud leftover-pod sweep; a red gate withholds only the CUDA artifacts and the CPU release stands. Driver floor documented as R525 (CUDA 12 minor-version compatibility); the gate exercises 12.8-static-cudart on RunPod's 12.4-driver hosts every release by construction.
Rejected. Vendoring dynamic libcudart via auditwheel (a second mangled runtime in-process beside torch/xgboost); an nvidia-cuda-runtime-cu12 pip dependency (mandatory NVIDIA download for CPU-only users); a separate bonsai-gbt-cuda distribution and +cu12 local tags (pre-registered fallback if the wheel had exceeded 50MB, it measured 2.33; local tags are PyPI-illegal); building wheels inside the bonsai-ci image (its 12.4 pin is the RunPod container-start driver ceiling, its ptxas cannot emit sm_120, and decision 66 already rejected container wheel builds); toolkit 12.6 without sm_120 SASS (registered as the fallback if 12.8-on-R550 minor-version compatibility fails at the gate; it did not).
71. The post-fix 16M GPU frontier: split by budget, ceiling recovered (adopted)#
Decision. The 16M accuracy-vs-time frontier was re-measured on current main (2026-07-14, same-pod L40S, scripts/gpu_pareto.py with ladders extended into the deep end), superseding the pre-fix 2026-07-12 run whose bonsai points carried both the decision-63 oblivious accuracy defect and pre-populate-round fit times. The post-fix frontier decomposes cleanly into fixed cost plus marginal cost per round: bonsai cuda_oblivious ~4.6s + 155ms/round, catboost ~11.8s + 77ms/round, xgboost ~22.3s + 58ms/round. Consequences, recorded as the standing verdict: bonsai owns the fast end (lowest fixed cost; fastest to every accuracy up to roughly r² 0.88), the curves cross at the ~100-round operating point (20.1s/0.8749 vs 19.5s/0.8751, the scaling tables' measured tie), catboost owns time-to-accuracy in the deep end (0.8973 in 35.1s vs bonsai's 0.8974 in 51.9s) through its 2x cheaper marginal round, and the accuracy ceiling now belongs to bonsai by a rounding digit (0.8981 vs 0.8980 at 450 iters), a region the pre-fix defect made unreachable. Validation of the supersession itself: the depthwise ladder reproduces the old run's r² to four decimals (no fix touched it; determinism across pods), the oblivious ladder shows the defect's removal point by point (0.8638 to 0.8749 at 100 iters), and bonsai times dropped ~28% while reference libraries moved only with fleet variance. Evidence: benchmarks/gpu-pareto-16M-2026-07.md + jsonl (replaced in place, git history is the archive per decision 69); the results-ledger chart now shows this run. The named next perf target if the deep end becomes load-bearing: bonsai's 155ms marginal round vs catboost's 77ms.
Rejected. Keeping the pre-fix frontier beside the new one (decision 69: superseded results are deleted, not attic'd); extending the README's fixed-iteration "fastest GPU slot" claim to the whole frontier (false above r² 0.885 and the claims table stays exact); chasing the marginal-round gap now (the 100-round operating point is the standing benchmark regime and is a tie; the deep end has no user yet, so the gate applies).
72. The marginal-round campaign: 155 to 104 ms, the frontier taken whole (adopted)#
Decision. Decision 71's named target (bonsai's 155ms oblivious marginal round vs catboost's 77) was attacked instrument-first per doc 16 and closed in two stages (PR #148) plus this close-out. Stage 0 built the price list before any lever: a profile-only sync peel replayed the decision-62 misattribution (6.1s filed under lfind_stage was the previous level's async histogram kernels draining at the next sync), cudaEvent pairs priced the async build directly, and conservation flushed two residues nothing else explained (make_root's 64MB/tree host identity copy at 33ms/round; a final-level histogram build for children that are leaves at 22ms/round). Stage 1 landed the three levers the table priced above ~10ms: the identity contract (full-data fits pass empty rows + row_count; the engine iota-builds and caches identity on device), deterministic device root sums (fixed-grid two-pass reduce replacing a 16M-row host loop), and the final-level skip (advance_layout_only() keeps only the segment flip stamping needs). Three levers were killed by their pre-registered criteria at a combined price under a millisecond (epilogue sync scope 0.1ms, per-level memset 0.5ms, pinned gh staging break-even). Same-pod: round 181→125ms, fit 19.43→13.88s, r² four-decimal identical, CPU model hash byte-identical.
Frontier verdict (2026-07-15 re-run, same-pod L40S US-NC-1, superseding in place per decision 69). bonsai cuda_oblivious ~3.4s + 104ms/round, cuda_depthwise ~3.1s + 121ms (the levers were engine-level, so depthwise fell from 187ms too), catboost ~12.4s + 76ms, xgboost ~21.6s + 65ms. The bonsai-catboost crossover moved from ~100 rounds to ~320, which sits inside both libraries' accuracy plateaus: bonsai is now first to every measured accuracy up to r² ~0.895 (0.8749 in 13.9s vs 19.7s; 0.8948 in 24.5s vs 27.9s), the 300-iter points are a statistical tie (0.8974/35.3s vs 0.8973/35.1s), and the ceiling stays bonsai's (0.8981 vs 0.8980). Accuracy reproduced to four decimals at every shared point, the campaign's behavior-preservation contract measured from the outside. The ship bar (≤110ms) was met; the crown bar (≤77ms, kernel parity) was not, and did not need to be: its premise was that the crossover mattered inside the useful range, and the fixed-cost advantage plus the 33% marginal cut pushed the crossover past it.
Stage 2 (histogram-kernel engineering): not spent. The plan's own gate asked for honest histogram compute above ~80ms/round with parity otherwise unreachable; the event-timed build is ~72ms and parity turned out unnecessary for the frontier. The floor is recorded instead: the 104ms round is ~72ms histogram kernel + ~32ms partition, bus, and per-level residue. Reopen if a workload lives at 450+ rounds of this cell, where catboost still reaches its (lower) plateau about 3s sooner.
Consequence. scripts/dag_model.py and doc 16 were refreshed from this pod's profiled cells: the old find 7.62s node is retired (the find kernel is 0.13s; the weight was always the histogram build, now its own event-timed node at 7.9s/fit), conservation closes at fit level (est 14.9s vs measured 15.70s), and the all-device floor is ~13.9s with the histogram build at 70% of device compute. Guide 11 gained the campaign's rows and the one-round summary of the method. The results ledger regenerates from the superseded-in-place artifacts.
Rejected. Stage 2 now (gate not met, crown achieved without it); keeping the pre-campaign frontier beside the new one (decision 69); quoting the 104ms as a cross-pod absolute (fleet spread is ~25%; the number that transfers is the decomposition shape and the same-pod deltas).
73. Explicit bin edges ship as a Dataset capability (adopted)#
Decision. Doc 18's design is built: bonsai.Dataset(X, y, bin_edges={col: edges}) bins listed columns at user-supplied interior cut points; unlisted columns fit as usual. The plumbing is exactly the constructor-not-mechanism the doc predicted (BinMapper::from_edges beside the loader-trusted from_cuts; a BinEdges override on both BinMappers::fit overloads with edge mappers seeded before the parallel region so validation errors never cross it; one bin_edges argument on the Python Dataset), no model-format bump, no hot-path branches, no CUDA change. The admission gate is recorded as met by roadmap signal: decision 67 asked for a workload that needs domain-mandated bins inside the artifact, and the owner ranked the capability onto the roadmap; accuracy remains a non-claim (decision 67 measured saturation).
The one thing the design missed, found by the acceptance test. The first implementation appended only the +inf sentinel, and the acceptance test's cross-band assertion failed: bands above and below the LAST edge were inseparable. Root cause is an engine convention, not a bug: the split scan (histogram.hpp cut_cells) never offers the last real bin as a candidate because for fitted columns that cut is degenerate (the observed maximum defines it). For user edges the band above the last edge is a domain statement, so from_edges appends a FLT_MAX cut to close it as a real bin plus the +inf sentinel to keep the missing bin NaN-only: k edges give k+1 splittable bands, NaN routes to its own bin, and raw +inf inputs land in the missing bin exactly as they do for fitted columns. Edges must be finite and below FLT_MAX (reserved), strictly increasing, non-empty; bad column indices and duplicates throw ConfigError.
Verification. The acceptance test is the one the decision-67 emulation structurally cannot pass: fit with domain bands, predict on RAW values (within-band invariance, cross-band separation, right-inclusive edge membership), save/load round-trip predicting byte-identically, all with no external transform. Byte-identity gates: model_hash.py unchanged (serial f35340da495343c1, sampled 8c2c375a331a1bb7), full suite 38,296 assertions green, overridden-absent fits bit-identical by construction (the override path is never entered).
Rejected. Validating inside from_cuts (the loader's trusted path stays branch-free; user input is validated at its own named entry); a config-file/TOML surface for edges (arrays of floats per column do not fit the flat dotted-key override grammar; the Python Dataset is the artifact-construction door and the CLI can gain one later if a workload asks); exposing the emulation as a package class (decision 67's ruling stands, superseded by the native capability).
74. The FLT_MAX top-band closer: the missing bin is NaN-only on every path (adopted)#
Completed by decision 117: +inf still binned as missing after this change, so the NaN-only claim held for finite values only until then.
Decision. create_cuts now appends a FLT_MAX cut before the +inf sentinel on every fitting path (issue #155), so every finite value above the last placed cut bins into a real, splittable top band instead of the NaN sentinel. This closes three leaks the fitted paths carried: the stride path's top tail (~one mean-bin of rows), the greedy path's final group (an entire heavy run when the maximum is a capped value), and rows above the 200k-sample maximum on any path. It also removes a train/predict routing skew: leaked rows trained down the learned default_left branch but predicted by raw threshold comparison (right of everything), so the same row routed differently in training and deployment; the valid/early-stopping path scores raw and was already on the deployment side. The budget slot was already reserved (from_sample's max_bin - 2), so finite cut placement is untouched and no bin count exceeds max_bin. The invariant now matches decision 73's edge columns: no finite value ever bins as missing, anywhere, and the mechanism (the closer cut) is the same one from_edges uses.
Evidence (scripts/probe_missing_bin.py, campaign knobs, both growers). The mechanism synthetics are decisive: capped-max heavy value r² 0.483→0.988 (the capped 10% carried signal and trained as missing), rare top-tail signal +0.16, signal above the sampled max at 1M rows +0.008. The real suite is chance-band flat: higgs ±0.0001, airline ±0.0006, california ±0.001 with opposite signs per grower, and amazon's −0.002 sits inside that dataset's own 0.0034 spread across max_bin 253-256 with no closer at all (the null-perturbation yardstick; threshold-placement churn on ID codes). Full table in benchmarks/missing-bin-closer-2026-07.md.
Why adopt (contrast with decision 67). The probe suite happens to contain no capped columns; the wild does (clipped sensors, capped amounts, 999-coded maxima), and there the failure mode is works-vs-doesn't, not a tuning delta. The fix costs nothing at runtime, spends a slot that was already reserved, removes a correctness asymmetry rather than chasing accuracy, and unifies the sentinel semantics across fitted and user-edge columns.
Standings re-validation (the surprise). The citable Grinsztajn table was re-run bonsai-arms-only against frozen reference rows (same protocol, seeds, and knobs; runner identity proven by the decision-69 replay). Expectation was chance-band; the result was not: mean rank 1.73 to 1.44, outright wins 27 to 36 of 55, second-or-better 44 to 50, last-place finishes 1 to 0, head-to-head >= lightgbm 37 to 46, >= xgboost 42 to 48. The honest decomposition: per-dataset values mostly moved inside 0.001 (43 of 55; 8 improved beyond it, 4 regressed, worst house_16H −0.0040), but the 10k-row cap is the regime where the greedy path is nearly universal (mean bin ~39 rows, so 461 of 495 fits changed), the suite was full of photo-finish second places, and the closer's small nudges broke them systematically one way. Rank tables amplify near-ties; the durable movements are the head-to-head counts and never-last. The decision-55 residual also narrowed: year recovered +0.0036 of its +0.0066 gap to xgboost. The grinsztajn jsonl's bonsai rows are superseded in place; README and the ledger carry the new table.
Consequence. Models change wherever a leak existed: canonical hashes move to serial 09dbf47353033362 / sampled ca7174cb1560221e (data digests unchanged; the cross-arch CI gate is dynamic equality and unaffected), and the California pin improves 0.71725→0.7153 (−0.27%, inside the band; lineage in the test comment). New invariant test pins all three paths: observed max and out-of-sample larger values bin below the sentinel, NaN bins into it. An all-NaN column now emits {FLT_MAX, inf} (a real bin exists even with nothing observed). A tree may now split real values away from missing at the last cut, a candidate that previously did not exist; small-fixture tests were unaffected because the new candidate is infeasible or zero-gain there.
Rejected. Keeping the leak as a documented budget trade (the trade was never priced until now, and the price on capped columns is catastrophic); a config knob for the closer (invariants are not options); closing the leak by clamping transform to the last real bin instead (mimics lightgbm's convention but leaves the top band unsplittable and the skew intact for default_left trees).
75. Per-node/per-level feature subsampling: declined by measurement (adopted)#
Decision. No colsample_bylevel / colsample_bynode equivalent in the grower (issue #45; xgboost ships both, lightgbm ships feature_fraction_bynode). bonsai already samples features once per tree (tree.feature_fraction), and the feature only earns its plumbing (the grower's selected-features path plus a CUDA find-staging change that today assumes a per-tree selection) if per-node/per-level beats per-tree. Priced at zero core cost by scripts/probe_feature_subsample.py on four datasets (8 to 200 features) at campaign knobs, toggling the reference libraries' own knobs. In isolation, per-node/per-level never leads: on california/higgs/year (<= 90 features) every arm sits in the decision-55 chance band or per-tree wins, and on the 200-feature synthetic where feature bagging matters most, per-tree at 0.5 (−4.73 rmse) dominates the best per-node arm (−1.18) by ~4x. Stacked on per-tree (their intended use) per-node adds a genuine −0.6 rmse on the 200-feature case, its one real signal, but a tuned per-tree fraction ALONE beats the stack: bytree0.4 (89.34) is better than bytree0.5+bynode0.5 (90.26). Full tables in benchmarks/feature-subsample-tradeoff-2026-07.md.
Consequence. The regularization per-node offers is reachable, and exceeded, by tuning the single knob bonsai already ships; the feature is a strictly dominated lever, so it changes no standings and unlocks no workload feature_fraction cannot already serve. The max_bin = 255-style outcome repeats: the existing simpler control is validated as sufficient. No core lines, no new config surface, no CUDA find-staging rework.
Rejected. Building it "because xgboost and lightgbm have it" (their own toggles above justify declining it, the categorical/bin-budget pattern of decisions 58/67). Reopener: a real many-feature workload where per-node/per-level beats a tuned feature_fraction beyond the chance band, none found across 8 to 200 features; bonsai's wide-data strength is the regime to watch, but even synthetic 200-feature data favours the existing knob.
76. Data-parallel multi-GPU: built, measured to parity, parked as an experiment (adopted)#
Decision. The data-parallel multi-GPU engine (architecture doc 19: MultiCudaHistogramEngine, the cuda_multi_* growers, parallel.device_ids) is withdrawn from main and parked on the experiment/multi-gpu branch. The track was built through its full plan and validated end to end (correctness held everywhere: identical r2 across single, 2, and 4 GPUs at 16M and 64M rows, both peer and host-staged reduction regimes, on 2x A40 and 4x A100 NVLink hardware), then priced by five optimization levers across four same-pod ladders: parallel per-device fan-out, sliced per-shard finalize copies (which alone took the 64M fit from 184s to 63s), per-shard gradient upload slices, pinned staging, and a double-buffered reduction pipeline. The end state is END-TO-END PARITY with the single-GPU engine (16M: ~16.5s vs ~15.8s; 64M: 58.9s vs 57.5s), against a pre-registered bar of 1.3x at 2 GPUs and 1.8x at 4. The floor is architectural, not a tuning residue: gradients are host-computed per tree, so the gh stream must cross host memory every tree regardless of staging strategy (pinned equaled pageable), and the level reduction's cost is its correctness syncs, not transport (forced host-staged equaled peer on an NVLink mesh). What main keeps: parallel.device_id (single-device selection), the CudaDeviceContext extraction and header/implementation split (structural improvements to the single-GPU engine), and the tightened GPULevelEngine concept.
Consequence. The supported multi-GPU story is fit-parallelism: N GPUs run N independent fits (sweeps, CV folds, ensembles) via parallel.device_id, which scales linearly by construction and compounds bonsai's existing advantages (a fit's small memory footprint allows more concurrent fits per card; bonsai.Dataset bins once for the whole sweep). Capacity is likewise a weaker motivation for bonsai than for any competitor: u8-binned storage puts roughly 500M x 100 rows on one 80GB card, so vertical scaling covers the realistic range. The experiment cost ~$17 of pod time and every conclusion above is a measurement.
Rejected. Keeping the engine in main at parity (a checkbox feature that grows the core and the registry for no measured win is exactly what the feature-admission discipline exists to refuse; this track bypassed that gate as a personal-use experiment, and the outcome re-validates the gate); further lever rounds (the two remaining costs were each refuted by a targeted fix, which is the signature of an architectural floor). Reopener: a device-resident objective, where each GPU computes its shard's gradients from resident scores, eliminating the host gh stream. That redesign is also the single-GPU engine's own next frontier (the decision-72 marginal-round floor is the same host/device boundary), so it should be pursued for single-GPU wins first, with the parked branch inheriting the result.
77. The device-resident objective: the per-tree host round-trip deleted (adopted)#
Decision. Decision 76's reopener was pursued single-GPU first, as its own campaign (issue #171), and shipped for the MSE objective. When a fit is eligible (an objective with a device gradient, no DART, no sample weights, a sampler that never reads gradient values), the booster arms a resident mode: labels and initial scores upload once per fit, each tree's packed (grad, hess) array is derived on the device from the resident scores by a two-line kernel, and the tree epilogue routes every row through the finished tree in bin space and fuses the leaf value into the resident scores. Per tree, nothing crosses the bus in either direction: the gradient upload, the interleave pass, the values and leaf-id downloads, the host objective loop, and the host score update all cease to exist. Ineligible fits take the host path untouched, BONSAI_HOST_OBJECTIVE=1 forces it, and the CPU plane is untouched by construction (model hashes byte-identical; the eligibility seam is a compile-time no-op for CPU growers).
Evidence (stage 0 priced, stage 1 measured; benchmarks/resident-objective-2026-07.md). The instrument-first price list on existing counters put the reachable pool at 35.9ms/round at 16M rows (22% of the fit) and 128ms/round at 64M (20%), clearing the pre-registered kill bar (12ms and 10%) threefold. The same-pod interleaved A/B on the shipped branch then measured cuts LARGER than the pool: oblivious 16M 136.1 to 102.6ms/round (24.6%), depthwise 16M 20.1%, oblivious 64M 16.4%, depthwise 64M 14.9%, because the routing epilogue is also cheaper than the stamp-and-copy epilogue it replaced. r2 identical to every reported digit in all pairs; the full-data resident model is bit-identical to the host-objective GPU model on Jetson parity tests. The ship bar (15ms/round at 16M) was met at 2.2x; the same-share projection puts the decision-72 frontier round near the 77ms stretch bar, to be confirmed by a frontier re-run.
Consequence. The decision-72 marginal-round floor moves: the round is now histogram build plus partition plus find, with the objective boundary gone. The complexity ledger, measured per the panel this campaign introduced: 616 non-test lines (about 380 in the CUDA plane, 240 in generic headers), zero new config knobs, zero registry growth, and the fit loop keeps its host shape (the eligibility seam is one named call, try_resident_round; the capacity predicate is one shared function both begin_root and resident_begin apply, so the decline conditions cannot drift apart; the resident state is armed per Dataset and disarms with a sync when the Dataset or a runtime gate changes). One depth-scaling note: the routing epilogue is O(depth) dependent loads per row against the O(1) gather it replaced, measured cheaper at depth 8; if deep-tree fits ever regress there, the reopener is a hybrid epilogue (leaf gather for partitioned rows, routing only for out-of-bag rows). The decision-76 multi-GPU reopener is now live on its parked branch (per-shard gradients from resident shard scores are exactly this mechanism), and remains parked pending a workload. Stage 2 (LogLoss, Poisson, resident sample weights) is justified by these numbers and follows as its own step; Softmax stays host-side (per-class tree shape, its own campaign).
Rejected. Extending eligibility to GOSS (it reads and reweights host gradients; a device GOSS is its own design); renewal objectives (MAE, Huber, Quantile renew leaves from host residuals; resident mode would have to download what it just avoided uploading); persisting resident state in the artifact (scores are training state, not model).
78. The frontier re-run confirms decision 77: unconditional at 16M (adopted)#
Decision. The 16M accuracy-vs-time frontier was re-measured on current main (2026-07-18, one L40S pod, scripts/gpu_pareto.py, 22 same-pod points), superseding the decision-72 run in place. bonsai cuda_oblivious decomposes to ~3.8s fixed + 64ms/round (was ~3.4s + 104), cuda_depthwise to ~2.8s + 88 (was ~3.1s + 121), while the same-pod controls moved only with fleet variance (catboost 76 to 78, xgboost 65 to 59), attributing the whole marginal cut to the device-resident objective. The stretch bar decision 77 projected is met on the measurement that matters: bonsai's marginal round is now cheaper than catboost's on the same pod, the decision-72 crossover no longer exists at any measured horizon, and the one residue that run named honestly (catboost reaching its plateau sooner at 450+ rounds) is gone: 0.8979 in 31.9s vs 0.8980 in 46.4s, a fourth-decimal tie at 45% more wall clock.
Consequence. The frontier verdict is unconditional for the eligible regime (MSE, no DART, no sample weights, uniform or no row sampling); ineligible fits keep the decision-72 frontier, whose residue was already plateau-depth only. The ledger chart and benchmarks/gpu-pareto-16M-2026-07.md carry the superseded-in-place evidence. The remaining round is histogram build plus partition plus find; kernel engineering stays unspent per decision 72's gate, now with a higher bar since no competitor pressure remains at this cell.
Rejected. Claiming the fourth-decimal ceiling (fleet noise, either direction); extending the claim beyond the eligible regime before stage 2 lands LogLoss and Poisson.
79. Resident LogLoss, Poisson, and sample weights: the eligible regime widens to the common case (adopted)#
Decision. Stage 2 of the resident-objective campaign (issue #171) extends the device-resident objective from MSE to LogLoss and Poisson and admits per-row sample weights, closing the campaign. The gradient kernel is templated on the objective kind and a weighted flag (compile-time dispatch, no per-row branches), formulas mirror the host implementations exactly in float with IEEE expf, and the Poisson raw-score clamp moved to one shared header constant so host and device cannot disagree. Weights upload once per fit beside the labels under the same dataset identity key. Eligibility now reads: MSE, LogLoss, or Poisson; weights or not; no DART; uniform or Bernoulli row sampling. Everything else keeps the host path untouched, and BONSAI_HOST_OBJECTIVE=1 still forces it.
Evidence. Parity better than the tolerance budgeted for transcendentals: resident predictions are bit-identical to the host-objective GPU path on every tested case (LogLoss, Poisson including a clamp-stress fit that is exact by construction, weighted MSE, weighted LogLoss under Bernoulli). Same-pod interleaved A/B at 16M rows, 100 iterations, oblivious: LogLoss 15.4s to 11.5s (25.7% cut), Poisson 14.3s to 10.6s (25.8%), weighted MSE 22.2s to 10.4s (53%), metrics identical to six decimals in every pair.
The surprise the A/B surfaced. The weighted host path was paying a serial 16M-element weight multiply every tree, roughly 80ms/round of single-threaded work. The loop is elementwise with no reduction, so it is now parallel (bitwise-identical models by construction); the 53% weighted cut above was measured against the pre-fix host path, and the honest post-fix comparison will be nearer the unweighted cuts. Weighted CPU fits and ineligible weighted GPU fits inherit the same fix.
Rejected. Fast-math exp intrinsics (parity is worth more than nanoseconds in a membw-bound kernel); softmax residency (per-class trees, its own campaign if ever); GOSS residency (it reads and reweights host gradients by design).
80. The categorical reopener predicate is established; the build decision waits for launch strategy (adopted)#
Decision. Decision 58's escape hatch named two conditions for reopening native categorical splits: crossed-TS preprocessing failing to close the catboost gap, and a workload where that gap is load-bearing. The first is now measured (scripts/probe_tabarena_cat.py, benchmarks/tabarena-cat-probe-2026-07.md): on the cat-heavy TabArena subset, catboost's own reference toggle (native categoricals vs the same model ordinal-encoded) prices its categorical machinery at 68% of its remaining lead over bonsai with the ordered target encoder (mean share -0.0099 of a -0.0147 remaining gap, 12 datasets), while the pure-numeric control is bit-identical in both arms. The distribution is honest: beyond the chance band on 8 of 12, inside it on 3, and the machinery hurts on 1; the leave-one-out ratio spans 47 to 81%. Where the machinery's price is largest (amazon, kddcup09, splice), ablated catboost loses to bonsai_ts outright: the encoder already matches everything except the native per-split ordered statistics and feature combinations. The machinery also costs catboost 4.2x train time on these datasets.
Consequence. The reopener predicate stands, but no build starts: the second condition (a load-bearing workload) is a launch-strategy judgment tied to whether TabArena standing is a product goal (issue #157). If it fires, the design starting point is architecture doc 17 (priced and shelved), now with a measured target: the per-split share on cat-heavy data, roughly one point of AUC-scale metric. The other two thirds of the catboost story (its pure-numeric small-data lead) belongs to a future ordered-boosting campaign and no categorical work will close it.
Rejected. Treating the TabArena Elo gap alone as the load-bearing workload (a leaderboard is evidence of capability, not of a user's workload); building the doc-17 engine speculatively ahead of the launch call (the admission discipline held once and the price list only got sharper).
81. Ordered boosting: declined at stage 0, the mechanism is not the small-data edge (adopted)#
Decision. The ordered-boosting campaign died at its own stage 0, per the pre-registered kill. CatBoost's own boosting_type toggle, run at both its defaults and matched knobs on a 12-dataset pure-numeric small-data pool (scripts/probe_ordered_boosting_rung0.py, benchmarks/ordered-boosting-probe-2026-07.md), prices the mechanism at zero or below: Ordered beats Plain beyond the chance band on 0 of 12 at matched knobs (1 of 12 at defaults), the mean share is negative in both task families, and on the two datasets where the toggle moves most Ordered is distinctly worse while bonsai beats CatBoost outright. Ordered also costs about 3.9x Plain's train time, which is the sanity check that the toggle really engaged. The reachability prototype produced its own refutation with a named cause: a faithful 2-fold honest-gradient booster does not converge, because a fold's gradient never sees its own accumulator and therefore never vanishes; early stopping truncates it far short of usefulness, and the simpler two-booster form is bagging, not the mechanism.
Consequence. The long-standing attribution "CatBoost's small-data lead is ordered boosting" is withdrawn from the record. The residual decomposes elsewhere: the probe's single-split harness does not reproduce the bagged gauge's CatBoost lead at all (bonsai is competitive to better on 10 of 12 there), so what remains of the aggregate-leaderboard edge points at the bagged-ensemble protocol interaction and tuning defaults, plus the categorical machinery decision 80 already priced on cat-heavy data. No bonsai booster-math campaign follows from any of those. The what-to-use-when row softens its attribution accordingly.
Rejected. Building any ordered-gradient scheme into the core (the mechanism fails its own vendor's ablation on the target regime); extending the prototype to high fold counts (the non-convergence is structural at small k, and the compute grows k-fold against a mechanism already priced at zero). Reopener: a measured bagged-protocol interaction showing Ordered contributing under bagging where it does not single-split, or a user workload where CatBoost's small-data lead is load-bearing and survives matched-knobs Plain.
82. Static permutation averaging: declined, the categorical substance is per-split (adopted)#
Decision. The cheapest route to CatBoost's measured categorical share, K-permutation-averaged ordered target statistics as plain preprocessing, was priced on the decision-80 cat-heavy pool at matched protocol (scripts/probe_static_k_encoder.py, benchmarks/static-k-encoder-probe-2026-07.md) and declined by its pre-registered WEAK criterion: K=8 recovers a negative share of the gap to native CatBoost (pool mean -0.026, TS-active -0.039), the K curve is non-monotone (small bump at 4, negative at 8, with an 0.018 swing on a 1000-row dataset between adjacent K values), and the two datasets where decision 80 priced the machinery largest are hurt or flat at both K. The mechanism is named: the K-average converges toward leave-one-out target statistics, the leaky mode decision 58 already measured, while the single ordering's noise acts as implicit regularization that averaging destroys. The reproduction gate held bit-for-bit (max delta 8.3e-17 against the cached gauge), which also corrected the record: the gauge wrapper runs the encoder at cross defaults, not cross=2.
Consequence. The categorical question now has both bounds measured: the encoder-side static ceiling is zero, and the native per-split share is 68 percent of the remaining cat-heavy lead (decision 80). If the doc-17 build ever proceeds, it must contain the dynamic machinery (per-split ordered statistics and path combinations), and it remains gated on the launch-strategy call. One cheap deployment lever is now visible and separate from any build: the TabArena wrapper never enabled the shipped cross=2 encodings that decision 58 measured well on exactly the highest-cardinality pool member; enabling it is integration configuration for issue #157, not research.
Rejected. Productizing K-averaging in the encoder (negative at the only K that matters); higher K (the trend is the wrong direction and the mechanism explains why); treating the K=4 bump as signal (inside small-data variance, non-monotone).
83. An automatic learning-rate default: declined, even the oracle buys nothing (adopted)#
Decision. The hypothesis that a per-dataset learning-rate rule (CatBoost's automatic default being the exemplar) is a cheap slice of the small-data defaults residual was priced and declined (scripts/probe_lr_rule.py, benchmarks/lr-rule-probe-2026-07.md; the ordered-probe pool and protocol, reproduction bit-exact). The ceiling itself is empty: a validation-selected per-dataset oracle over eight learning rates gains nothing on the pool mean, and its signature is overfitting, winning the validation split on 10 of 12 datasets but the test split on only 6. On the two datasets where CatBoost-default leads beyond the band, the oracle closes 15 percent of one gap and worsens the other. CatBoost's own automatic values, transplanted by reading the resolved rate from its params, sit in a tight 0.024 to 0.075 band around bonsai's shipped 0.05 and are a no-op; its heuristic trends upward with rows while the noisy oracle trends downward, mildly anti-correlated. A flat 0.1 control is worse than 0.05. Caveats recorded honestly: low rates ride early stopping longer (correlation -0.79 with trees kept) and the 1000-tree cap binds at the grid's low end on most datasets.
Consequence. bonsai's fixed 0.05 default stands; no auto-default feature follows. The small-data defaults residual loses its last named single-knob suspect: what remains of the CatBoost aggregate story is the bagged-ensemble protocol and its non-rate defaults (per-split randomization), which interact with bagging and belong to decision 81's bagging-interaction reopener as one combined future probe. A prior worth recording as corrected: the automatic rate had been assessed as the likeliest cheap lever on the leaderboard; the measurement says the lever does not exist at this pool's sizes.
Rejected. Fitting a size rule anyway (the leave-one-out fit swings sign across folds, pure variance); a finer sweep (the ceiling is the problem, not the grid); raising the tree cap to un-truncate low rates (the reference protocol is the comparison and the mid-grid is cap-free on most datasets already).
84. A code-metrics division: the readable-core claim made falsifiable (adopted)#
Decision. The results site gains a self-only code division (scripts/measure_complexity.py, the results-ledger section, the benchmark-protocol subsection). It measures the bonsai tree at one git SHA with lizard (pinned uvx lizard@1.23.0): per plane (core_headers, engine_impl, cuda_plane, bindings_cli, bench_tooling, tests) it records file count, LOC, NLOC, function count, and mean and max cyclomatic complexity, plus the five highest-CCN core functions by name and the surface counts (45 parameters, 105 dispatch combinations, 9 public Python names, dependency counts). The measurement is drift-gated in CI beside the other generated pages and superseded in place on re-measurement (decision 69). The baseline: core_headers 4,926 LOC at mean CCN 2.04 with a per-function ceiling of 15, and the worst function across the core planes is the CSV parser at CCN 29 (in the IO layer, not the split, tree, or booster headers).
Why. The code-quality pillar was the only one of the four project goals with no results representation; speed had the frontier, accuracy the standings, pedagogy the Learn tracks, and the readable core carried only unfalsifiable prose of the kind the style guide forbids for performance claims. A claim about code you can read must ship with counts you can check. The five worst functions are published by name deliberately; an offender list its author curates away is marketing, not measurement.
Non-claims, recorded. LOC alone is not quality and a small number is not an argument; the division makes the claim checkable, not proven. No comparative claim against any other library is made or implied: comparative measurement (competitors at pinned tags, with a published core-selection rule and a paired capability column) is deferred until this self-only methodology has lived in public. Pre-registered CI budgets on named core functions (a maximum CCN per function, the gate that would have caught the resident-objective seam before review did) are a possible later step, held until the baseline has history to budget against.
Rejected. Comparative from day one (the methodology earns trust on our own tree first, and an unfair competitor selection would poison the division's credibility); LOC-only reporting (complexity is the load-bearing metric, LOC the least informative); hiding the offender list (naming our worst functions is the credibility move).
85. The bagged-protocol interaction: declined, CatBoost's small-data lead is not a randomization interaction (adopted)#
Decision. Decision 81's reopener named a measured bagged-protocol interaction, CatBoost's randomization defaults decorrelating its ensemble members under bagging where they do not single-split, as the one thing that could resurrect the small-data story. It was priced and refuted (scripts/probe_bagging_interaction.py, benchmarks/bagging-interaction-probe-2026-07.md; the ordered-boosting probe's pool, splits, and loader imported read-only, bonsai_single bit-identical to that probe's bonsai arm on all 12). The headline interaction, (cat_single minus cat_bag8) minus (bonsai_single minus bonsai_bag8), is negative in both pool means (regression -0.032, binary -0.0002) and strictly inside the chance band on 7 of 12; the pre-registered REFUTED wording asked for 10-plus-of-12 in band, so that wording is recorded as not literally met, but the sign analysis makes the refutation firmer, because 4 of the 5 out-of-band cases are NEGATIVE (bonsai gains more from bagging than CatBoost, the opposite of the hypothesis) and the lone CatBoost-favoring beyond-band case is one 460-row coin-flip. The named mechanism is null: randomization_share (neutralizing CatBoost's Bayesian bootstrap and random_strength under bagging) averages -0.0004 on regression and +0.0013 on binary, inside or at the band on 11 of 12, and on the single dataset where the interaction favors CatBoost it covers the whole of it. The plain cause sits in the bagging-gain columns: 8-fold data-bagging already gives bonsai the decorrelation (bagging_gain_bonsai mean +0.104 on regression against CatBoost's +0.072), so there is no residual headroom for CatBoost's per-tree randomization to exploit, and bonsai's shipped sampler knobs (arm 3, bernoulli plus feature subsampling) reach any randomization benefit where one exists.
Consequence. Decision 81's reopener closes on its first clause. The CatBoost small-data lead that does survive under bagging, reproduced directionally on 4 of the 5 gauge datasets by the library-default arm including both largest cached leads, is a LEVEL difference from CatBoost's defaults operating under bagging (arm 7 versus arm 2), not a bagging-specific interaction (arms 4 and 5) and not the randomization the hypothesis named (arm 6). No bonsai core change follows, and no wrapper randomization lever is recommended, because the zero-core-cost response already ships and buys nothing the deterministic bag lacks on this pool. What remains of the whole CatBoost aggregate story is now fully partitioned: the categorical per-split machinery priced on cat-heavy data (decision 80), and defaults-level tuning under bagging, with the booster-math suspects (ordered boosting decision 81, static K encoding 82, an auto learning rate 83, this bagging interaction) all measured to zero.
Rejected. Building or wiring any ensemble-randomization scheme for the bagged regime (the mechanism is null and bonsai's existing knobs already reach it); treating the one positive out-of-band dataset as signal (a single 460-row coin-flip fully absorbed by randomization_share, inside the noise the ordered-boosting and static-K probes both charted at these sizes); reading the gauge-reproduction magnitudes as a bit-match (the BAG8 here is an 8-fold inner bag on a single fold-0 test split, directionally faithful, not the AutoGluon protocol). Reopener: a bit-faithful AutoGluon-bagged reproduction showing a positive CatBoost interaction beyond the band on a pool majority (not one coin-flip), or a user workload where CatBoost's bagged small-data lead is load-bearing and survives matched-knobs Plain single-model, the same load-bearing-workload bar decision 80 set for the categorical build.
86. Honest shadow-feature selection: declined as an accuracy lever on all three growers, the gain ranking already has it (adopted)#
Decision. A refit-based honest feature selector (a shadow-feature / Boruta prototype, append a permuted copy of every column and keep only real features that beat the 95th percentile of the shadow importances, over 5 seeds with a 3-of-5 vote) was prototyped at zero core cost and priced against CatBoost's in-library select_features and against plain top-k-by-gain truncation (scripts/probe_feature_selection.py, benchmarks/feature-selection-probe-2026-07.md; two regimes over 9 datasets from the ordered-boosting pool, REAL-WIDE up to 1024 features and NOISE-INJECTED with shuffled-copy noise equal to each set's feature count, the bonsai arms run under all three growers). It was declined on its pre-registered second clause, and the decline holds per grower: every beyond-band accuracy win the shadow arm produced is matched by plain top-k truncation at the same k. Under depthwise the shadow arm moved 3 datasets beyond the band (concrete_compressive_strength +0.736 rmse after 8 injected noise columns had cost bonsai_all 0.74, breast_cancer +0.00126, MagicTelescope +0.00172), but shadow_vs_topk is inside the chance band on all 9 datasets, and on concrete and MagicTelescope the two arms select a bit-identical kept set (shadow_vs_topk exactly 0.00000), because bonsai's own gain importance already ranks real features above the permuted ones, the same ranking the shadow threshold reads. Leafwise is bit-identical to depthwise on all 9 datasets (at the campaign shape the 63-leaf budget never binds, so the gain-ordered and level-ordered growers split the same node set; the dispatch was verified engaged with a binding budget) and inherits the verdict line for line. Oblivious, the grower whose coarser one-feature-per-level importance spectrum was the live threat to the top-k control, refutes that threat in the opposite direction: it adds a fourth beyond-band win (wind), every win is again a top-k win at the same k, and the only beyond-band shadow_vs_topk in the whole 27-row grid (pima_diabetes, -0.0072) has the shadow cutoff LOSING to plain truncation. The shadow vote contributes a cutoff rule at 6x the compute of one fit, not a better ranking, under any grower. The ADOPT-SIGNAL branch failed both ways on all three: the machinery also LOSES beyond the band on the same 2 low-dimensional informative sets everywhere (pima_diabetes -0.011, spambase -0.0012), so the no-loss condition is unmet, and it does not match cat_select pool-wide (differs beyond the band on 5 of 9) at half its wall time (depthwise 0.77, leafwise 0.74, oblivious 1.20 of cat_select's 126.9 s pool total, none half or less).
Consequence. Feature selection is not an accuracy lever on this pool. Where it recovers accuracy it is recovering from injected junk that a one-line top-k-by-gain removes just as well, and where the features are all real it costs accuracy. A bonsai.select module, if it ever ships, is a wall-time-and-interpretability tool (smaller models, a noise-detection report), explicitly not an accuracy feature, and no bonsai-core change follows: the whole prototype is Python around the shipped importance("gain") call, and the measurement says even that Python wrapper does not beat a sort of the same importances. The noise-recovery precision/recall table is retained as the deliverable exhibit for the guide chapter that follows this probe: it teaches that both selectors are perfect only when the noise is truly independent (concrete, both drop all 8 noise and keep all 8 real) and imperfect the moment the real features are correlated or the pool is high-dimensional (breast_cancer, the shadow arm drops 16 of 30 real features and cat_select drops 21 while keeping 8 noise).
Rejected. Shipping the shadow selector as an accuracy feature (its wins are top-k's wins on every grower and it loses where features are real); productizing it over plain top-k-by-gain (shadow_vs_topk is inside the band on 26 of the 27 grower-dataset cells and favors truncation in the 27th); reading the concrete recovery as a selection win for the machinery rather than for the ranking (top-k recovers the same accuracy from a bit-identical kept set); treating the oblivious grower as a separate selection story (its coarser spectrum changes the numbers, not the verdict, and its one beyond-band separation favors top-k). Reopener: a workload where shadow_vs_topk clears the band in the shadow's favor on 2 or more datasets under any grower (the shadow cutoff genuinely beating truncation at equal k), or a high-noise-fraction regime where the data-driven cutoff beats every fixed k a user would guess; the interpretability and model-size case is not refuted here and is a separate, non-accuracy decision.
87. The XGBoost 3.3 recheck: every published standing survives, one competitor improvement recorded (adopted)#
Decision. XGBoost 3.3 (2026-07-21) claimed lower GPU quantile-sketching memory and CPU histogram tiling for wide datasets, both aimed at cells bonsai competes in, so the perf claims were rechecked on one pod (L40S, US-NC-1) with three same-pod arms: bonsai at main, XGBoost 3.2.0, and XGBoost 3.3.0 in separate venvs (benchmarks/results/xgb33-recheck-2026-07.jsonl, 41 rows; the recheck subsection of the results ledger). On GPU, 3.3 matches 3.2 within noise at every measured cell (rows 1M/4M/16M at 100 cols, cols 256 and 1024 at 1M), host RSS does not move (22.1GB at 16M against bonsai's 6.9GB, reproducing the README's 3x memory ratio on a second host), and the order never changes: bonsai_cuda_depthwise fits 3.0-3.3x faster than xgb_cuda at every cell, with zero cpu-fallback nodes in every bonsai profile. On CPU at 16M bonsai is 6% behind xgboost-hist, inside the published "within ~8%, host-dependent" band. The one real improvement in the release: 3.3 halves wide-CPU hist time at 1M x 4096 (783.7s to 387.1s; no change at 1024, the tiling engages by width), which narrows bonsai's CPU lead at that cell from 2.4x to 1.19x (323.9s vs 387.1s) but flips nothing: the ledger's wide-cols standings are GPU, where CatBoost leads and 3.3 changes nothing.
Consequence. README and ledger claims stand unedited; rebaseline-2026-07.jsonl remains the authoritative standings table. The recheck rows carry explicit per-row xgboost version tags, giving the perf claims a recorded version boundary (valid against 3.2.0 and 3.3.0) for the first time. One watch item is recorded rather than acted on: the two widest CPU cells (131k x 16384, 32k x 65536) were not re-measured, and the 4096-col tiling gain suggests 3.3 could pass bonsai's CPU growers there; if wide-CPU standings ever become reader-facing, re-measure those two cells first.
Rejected. Superseding the re-baseline table from this pod (only three of its six variants ran here, and cross-pod absolutes are invalid under the ~25% fleet spread); a README edit (no number cited there moved); treating the 1024-col null as the tiling failing (4096 is simply the first measured cell wide enough for it to engage); re-measuring the CatBoost and LightGBM arms (neither shipped a release since the table was measured).
88. The wide-CPU fill routing: feature-parallel past a 24MB footprint (adopted)#
Decision. The first production field report (issue #217: 131k x 16384 on a Xeon 6521P, LightGBM-CPU ahead of every bonsai grower 2-3x, matching the committed multi-host scaling rows) traced to the row-wise u8 histogram fill: its per-row scatter targets the whole selected histogram footprint (total_cells x 8B, 33.6MB at 16k features x 255 bins), so past the last-level cache every add misses and the partial slabs add a zero+merge pass per block (populate was 84-88s of a ~100s fit at the stage-0 profile). u8 levels whose footprint exceeds 24MB now route through the existing feature-parallel fill, previously reserved for u16 data: one thread per feature, no partials, no merge, bit-identical at any thread count. Same-pod before/after at 131k x 16384 (t=16, SCALING knobs): depthwise 1019s to 379s (2.7x, LightGBM parity at 367s), leafwise 2591s to 445s (5.8x, the 7x deficit against LightGBM collapses to 1.2x), identical r2, peak RSS 18.8GB against LightGBM's 50.1GB. The threshold was set by an interleaved same-pod A/B at 1M x 4096 (alternating builds, twice each): the row path WINS mid-width on a big-L3 host (320/337s vs 547/547s all-feature-parallel), because the EPYC's L3 absorbs an 8.4MB scatter target while the feature-parallel fill pays scattered per-feature column reads on sparse child nodes. 24MB flips only shapes that lost on every measured host.
Consequence. bonsai's wide-CPU standings move from 2-3x behind LightGBM to parity (depthwise) at 2.7x less memory; the fastest-slot claims (<=256 cols) are untouched and the narrow path is code-identical (fixed-input model hash byte-identical to before; 526 C++ and 67 Python tests green). Above the threshold, model bytes change at identical accuracy, and gain thread-count invariance the row path never had. Evidence: benchmarks/wide-cpu-hist-2026-07.md, raw rows in results/wide-cpu-hist-2026-07.jsonl.
Rejected. A per-node rows bound (<=256k rows feature-parallel, built and withdrawn: the A/B showed sparse-node feature-parallel is the mid-width problem, not node size, and the bound kept the regression at 573s); shipping the M2-calibrated 6MB threshold (it flips 4096-col shapes that a big-L3 host wins on the row path); a config knob for the threshold (a measured constant until a real workload disputes it).
Reopener / recorded follow-ups (issue #217). A cache-size-aware threshold to capture the mid-width win on small-cache hosts (M2: 101.7s to 44.9s at 131k x 4096 goes untaken by the 24MB constant; XGBoost 3.3's aarch64 cache detection is the same lever); skipping the row-major mirror for always-wide fits (2.1GB at the 16k cell); the CUDA planes' own wide wall (~5x behind xgb_cuda at the 16k cell) is untouched by this change.
89. The tiled mirror: one fill retires the wide-CPU strategy pair (adopted)#
Decision. Decision 88's per-width strategy pair (row-wise below a 24MB footprint, feature-parallel above) lasted one day: the recorded follow-up, XGBoost 3.3's column-tiling lever, was probed immediately and dominated. The u8 row-major mirror moves to a column-block-tiled layout (2048-feature blocks, each row-major on its own; one block at narrow widths reproduces the classic layout byte for byte) and the fill runs tiles outer, rows inner, so the live scatter target is one block's histograms (at most ~4MB) at any selection width while reads stay sequential inside each block. Per-feature accumulation order is unchanged from the untiled row path, so models are BIT-IDENTICAL at every width (verified: identical model sha256 from the main and tiled builds at a multi-block width), which retires the 24MB threshold, the u8 feature-parallel route, and the cache-size-aware-threshold follow-up in one move. Interleaved same-pod A/B (two reps each, single worker): tiled beats the row path at its best cell (326/321s vs 369/377s at 1M x 4096), beats feature-parallel at its best cell (442/448s vs 514/532s at 131k x 16384), and is a wash at 16M x 100 (114/116 vs 119/112); the M2 leg takes the mid-width win the fixed threshold had left on the table (44.8s vs 101.7 at 131k x 4096) and scales linearly to 8192 with no cliff. Identical r2 everywhere.
Consequence. One fill covers every u8 width with no host model, no threshold, and no strategy dichotomy; the feature-parallel fill remains only for u16 data, its original job. Same-machine reproducibility strengthens: the u8 fill's sums no longer depend on selection width routing, and wide models regain byte-stability across versions from here on. Peak RSS at the 16k cell is 21.0GB (against 18.8 for the strategy pair and 50.1 for LightGBM), the cost of per-slice partial stripes. Evidence: the superseding section of benchmarks/wide-cpu-hist-2026-07.md; raw rows tagged run=tiled-ab in the same jsonl.
Rejected. Keeping the strategy pair alongside the tiled fill (dead code with a threshold nobody can calibrate); runtime cache detection (mooted: the tile constant is cache-conservative everywhere measured, M2 through EPYC); a fit-time empirical trial (would trade same-machine byte reproducibility for a decision the tiling makes unnecessary). Reopener: a host or shape where a 2048-feature block's ~4MB histogram footprint is not cache-resident (the tile width becomes the knob to revisit, not the strategy); the CUDA planes' wide wall stays open on issue #217.
90. The CUDA wide recheck: the wall was already gone (adopted)#
Decision. The campaign opened to close the recorded wide-GPU gap (bonsai_cuda ~355s at 131k x 16384 against xgb_cuda ~72s in the multi-host scaling study) and closed at stage 0, because the gap had already been closed by three weeks of unrelated work: the recorded rows date to 2026-07-07/08 code (git bd783e6/972652c), before the level-transaction and device-resident campaigns landed. On current main, one L40S pod, SCALING knobs (benchmarks/results/cuda-wide-recheck-2026-07.jsonl): bonsai_cuda_depthwise 54.9s at 131k x 16384 against catboost_gpu 71.2s and xgb_cuda 76.7s, and 37.7s at 1M x 4096 against catboost_gpu 50.2s and xgb_cuda 103.7s, at 3-4x less peak host RSS (8.8-16.4GB against 25-60GB). bonsai_cuda_oblivious (61.2s at the 16k cell) also beats both references. The wide-data standings prose ("CatBoost keeps the lead, bonsai second"), stale in README and the results door, is corrected to cite this recheck.
Consequence. No CUDA wide campaign runs; a refutation-by-progress is the deliverable, and the lesson is operational: perf standings quoted from a study must carry their git sha forward, because three weeks of engine work can invert them silently (this is the second stale-row correction this week, after the CPU field report). The stage-0 price list is banked for the future: even in the winning fit, the find stage is ~80% of grow (find_kern 17.3s plus gpu_wait 24.5s of a 54.9s fit at the 16k cell) and the host-side mapper fit costs 11.5s at 16k features, so a further ~2x of internal headroom is measured and recorded on issue #217 without being spent. The full six-variant cols-axis re-baseline (superseding the July 8 study's wide cells properly) is the recorded follow-up before any wide-standings chart ships.
Rejected. Running the campaign anyway against the internal headroom (the standings motivation is gone and the crown items rank higher); superseding the July 8 scaling study wholesale from this two-cell recheck (cross-pod absolutes and the narrow cells remain valid history); leaving the stale prose standing while the jsonl told a different story (the reader-facing claim is the product).
91. The iso-volume shape frontier: measured device memory becomes an output (adopted)#
Decision. The first campaign on the redesigned bench tooling holds rows x cols constant and sweeps aspect ratio, with measured peak device memory (dev_mem, NVML-sampled per worker child) recorded in every row and the a-priori memory gates disabled by spec, because a measured failure at a shape is the experiment's output rather than a condition to pre-empt. Two committed ladders (benchmarks/specs/): 2^31 cells from 16M x 128 to 32k x 65536, six arms; 2^33 GPU-only to 262k x 32768. One pod, RTX PRO 6000 Blackwell Workstation Edition 96GB (sm_120 via CUDA 12.8 toolkit side-installed over the cuda12.4 image, clang-21 offload), main a907895 (benchmarks/results/iso-volume-2026-08.jsonl). bonsai's CUDA growers are fastest at every cell of both ladders: near-flat 6.8-9.3s across the tall half of the 2^31 line where both references vary 1.5-2x, 4.1x over XGBoost-GPU at 67M x 128 on the 2^33 ladder (27.9 vs 113.8s at 11.7 vs 73.6GB device memory). The instrument's first catches: XGBoost-GPU fails at 32k x 65536 having allocated only 33.4GB of the 96GB card (an internal limit, not exhaustion); CatBoost-GPU allocates 90.2GB at every cell including 1M x 100 (reserves the card, never sizes to the problem); bonsai's footprint tracks the problem, 0.8 to 58.5GB along the ladder. At extreme aspect (p about 2x n) the oblivious grower holds r2 .873 where every depthwise-family arm falls to .815-.817.
Consequence. Feasibility claims now cite measured rows, not estimator output: GPU_MAX_COLS stays as the default policy for unattended sweeps on consumer cards, but it is a policy knob a spec disables, and the 96GB class measurably runs cells the old skip assumed impossible. The ad-hoc campaign-driver era ends: this campaign produced zero hand-written schemas (every row schema v1 with sha, host, and run label stamped by the harness), and the committed spec plus scripts/pod_bench_driver.sh reproduce it in two commands. The work-rig replication path (make bench-iso, host-tagged) stands open for a second same-silicon point. Watch item: CUDA 13 stays blocked until clang can target it; the campaign runs on the 12.8 toolkit ceiling.
Rejected. Fixing a VRAM budget instead of a cell budget (device memory is library-dependent, so the budget would encode one library's allocator; constant logical volume isolates shape and lets memory be the measurement); nvcc for the sm_120 build to reach CUDA 13 (the campaign must measure the clang-built binary path the wheel ships); baking a cuda12.8 image (the side-install costs 2 minutes a session and the 12.4 image is the only one that boots fleet-wide).
92. The results lifecycle: standings supersede in place, evidence freezes, staleness hard-fails (adopted)#
Decision. Results files conflated two roles and the conflation produced drift three times in one month (the scaling history's stale wide cells stood until decision 90; the adversarial sweep found four more stale reader-facing standings claims). The split: evidence files are the dated record behind a decision, frozen forever, append-only, corrected by banner plus log entry; standings files are the current claim on one published axis, listed in benchmarks/standings.json with the single sha their rows were measured at, superseded in place by re-measurement (decision 69's code-division rule generalized). The ledger stamps every standings caption with the measured sha computed from the rows. Two gates hard-fail via scripts/check_standings.py: a decisions entry claiming a perf change carries a Standings: <axis> line and docs-check fails while any tagged entry outruns the axis's registered state (this entry, 92, is the parse baseline); the wheels publish job fails unless every axis was refreshed for exactly the version being released. Reader-facing prose never restates standings digits. Deleted under the policy (git history archives): the multi-host scaling history and its exponent analysis, the retired year-MSD track, and the Catch2 microbenches, which measured kernels in isolation and were structurally blind to the memory-system effects that actually moved standings.
Consequence. The refresh becomes one rented pod session, automated as the standings-refresh workflow: a same-pod A/B of the previous release wheel against HEAD on anchor cells is the perf-change detector (the only rigorous one, since cross-pod and CI-runner timing comparisons are invalid at fleet spread), then the standings specs re-measure and the supersession lands as one reviewed PR whose body reports the A/B verdict; a moved verdict demands a tagged decision, which the claim gate then enforces. Releases inherit a fixed cost of roughly one pod session and gain standings never older than one release. The perf division sheds its history-file class entirely; repeatability questions are answered by reps within a standings run, not by cross-vintage archaeology.
Rejected. Recipe-only storage for perf (a recipe reproduces the procedure, not the numbers; the fleet-spread rule exists because hardware is not a controlled instrument, so the measured single-sha jsonl is the irreducible minimal artifact and it already carries the recipe in every row); CI microbench tripwires (shared-runner noise floors and kernel-scope blindness; instruction counting is stable but measures the wrong thing); banner annotations for stale standings (banners rot, deletion cannot); a calendar cron for refreshes (manual plus pre-release bounds staleness without surprise spend).
93. First automated standings refresh: stale-vintage supersession, airline speed flip (adopted)#
Decision. The standings-refresh workflow's first successful run (2026-07-31, one L40S, sha d3ffcd0) supersedes the rows, width, frontier, and airline standings in place. The same-pod A/B against the 1.5.4 wheel read no code movement: all four anchor cells within ±0.5%, so HEAD and the shipped wheel are performance-identical.
Standings: rows, width, frontier, airline
What moved and why. The published numbers moved anyway, because the superseded files predated the late-July engine work that shipped in 1.5.4: the rows ladder was measured at 434a382 (2026-07-13), before the tiled CPU fill and the radix mapper sort. The refreshed 16M x 100 headline is 10.3s (CUDA oblivious) against XGBoost-GPU's 19.6s, where the stale file read 18.4s vs 19.9s. On the airline shape the speed standings flip: bonsai CUDA depthwise is now the fastest fit at 1M and 10M rows under ordinal encoding (1.9s vs XGBoost-GPU's 2.6s at 10M), retiring the long-standing "XGBoost-GPU owns raw speed on the narrow shape" reading; XGBoost keeps only the 100k cell. The frontier holds its shape: bonsai first to every measured accuracy, terminal accuracies tied within the noise band, marginal round below CatBoost's. Width holds: bonsai CUDA fastest at every width, with the CPU arms trading the widest cell inside a rep's noise.
Consequence. This is the policy working as designed: the drift was not unreleased speed but unrefreshed files, and the refresh caught it in one pod session. Narrative captions that restated standings digits (airline provenance, frontier provenance, the cols re-baseline prose) are rewritten digit-free; the tables and generator-computed stamps carry the numbers. Chart ticks on the frontier page now derive from the data after the hardcoded ones stranded outside the refreshed range.
94. LightGBM-CUDA joins the reference arms; August supersession (adopted)#
Decision. The bonsai-ci image builds lightgbm from source with USE_CUDA=ON (PR #257), and lgbm_cuda joins the rows, width, and frontier suites. The 2026-08-01 refresh (one L40S, sha 0b077ad) supersedes all four fast axes; the A/B against the 1.5.4 wheel read no code movement (four anchors within ±0.8%).
Standings: rows, width, frontier, airline
What the new arm shows. LightGBM-CUDA is real GPU performance at scale, not the small-data loser the decision-42-era snapshot suggested: at 16M x 100 it fits in 31.7s, 6.6x its own CPU (210.2s) and ahead of XGBoost-GPU on this pod, though 3x behind bonsai (10.5s). Its test r2 runs consistently higher at matched knobs (0.884-0.886 vs the field's 0.876-0.880), an implementation difference worth its own probe. At width it hits the histogram wall hardest of any arm: 563.7s at 131k x 16384, 11x bonsai's 50.3s, validating the decision-42 regime argument where it was made. bonsai keeps the fastest slot at every cell of every ladder.
Fleet-variance caveat, recorded. XGBoost-GPU's 16M anchor swung 19.6s to 36.9s between two same-model pods (identical CPU class) while bonsai's held within 2%; this exceeds the documented ~25% spread and flatters bonsai's published margin over XGBoost by pod luck. The same-pod ladder remains the standings per protocol, but the A/B detector anchors only bonsai arms today; adding one reference anchor to the A/B would catch reference-side pod pathology. Follow-up, not blocking.
Also fixed. The refresh workflow's month-rollover bug: a supersession across months deletes the old dated files, and the committed-files render gate (git ls-files) fired before the deletions were staged. Deletions now stage before rendering.
95. The leafwise recheck: decision 42's claim inverts at scale (adopted)#
Decision. The decision-42-era reading "CPU leafwise beats LightGBM's CUDA leaf-wise" is superseded by measurement: on one pod (L40S, US-MO-1, 2026-08-01, leafwise-recheck-2026-08.jsonl) LightGBM-CUDA wins at every ladder scale, monotonically from 1.2x at 250k to 5.3x at 16M (24.4s vs 128.4s). The original claim was measured at 464k rows and was a small-n artifact. Doc 11's leafwise row carries the correction; the recheck table lives on the scale page.
What stands, what changes. The engineering conclusions of decision 42 stand: no cuda_leafwise registration that computes CPU histograms under a GPU name, and bonsai's existing CUDA growers dominate lgbm_cuda outright (same-pod anchor 17.2s vs 24.4s at 16M; frontier time-to-accuracy 2.2-3.1x, decision 94's data). What changes is the deferral's premise: LightGBM demonstrates leaf-wise-on-GPU is viable at scale, so the device-leafwise deferral converts from "structurally unpromising" to a tracked engine gap with a measured competitive target - issue #268, kill criterion pre-registered (beat lgbm_cuda at 16M x 100 same-pod or do not register).
Also recorded. The r2 pattern across all leafwise-recheck cells matches decision 94's depth-cap finding: lgbm_cuda scores .879-.886 while every depth-8-honoring arm (bonsai leafwise, lgbm_cpu included) sits at .872-.879, and lgbm_cpu with max_depth=-1 reproduces the CUDA scores exactly - LightGBM's CUDA learner does not enforce max_depth, so its quality column in the ladders is not at protocol knobs. Cross-pod CPU variance also logged: lgbm_cpu's 16M fit measured 104.7s here vs 210.2s on the August ladder pod, a 2x swing on a CPU arm while the GPU anchor moved 42%.
96. The standings-refresh CI workflow retires for a local driver (adopted)#
Decision. The standings-refresh workflow's tail (supersede files, render, open the bot PR) failed on all four of its dispatches, each on a distinct one-shot bug found only by paying for the roughly three-hour pod run that reaches it: pip missing in the bonsai-ci image's uv venv, a rows-only schema ZeroDivisionError in the A/B verdict table, and the month-rollover staging bug decision 94 already logged. Every fix landed after the fact, on the next paid dispatch. The measurement half never failed: all four runs rented the pod, ran the standings specs, and produced correct jsonl, with the artifact-upload step (added after the first tail crash) recovering the data every time the tail crashed downstream. The structural problem is that the tail has no test harness short of a real pod rental, so the workflow's own CI never caught what it broke. scripts/standings_refresh.py replaces it: a measure phase (pod create, detached on-pod run, incremental scp pulls, teardown plus stray-pod sweep) and a supersede phase (registry update, staged git add -A benchmarks/ before render, A/B verdict, branch, commit, gh pr create, with a --no-pr escape hatch) that runs on a developer machine and can be rerun without touching a pod. The supersede phase was dry-run validated against the 2026-08 measurement artifact before this decision.
Consequence. The decision-92 refresh ritual is unchanged: same two phases in the same order, same release ordering (bump PR merges first, then refresh with prev_version set, then tag), same Standings:-tagged-decision gate on a moved verdict, same freshness check at publish time. Only the vehicle moved, from a GitHub Actions runner to a local script invoked by hand per the runbook. The tail is now iterable at the cost of a supersede-phase rerun against an already-measured results directory, not a fresh pod rental, so the next tail bug (there will be one) costs minutes instead of hours. Still unexercised: the supersede phase's gh pr create step itself, since the dry run stopped at the commit; the first live run is that step's real test.
Rejected. Iterating on the CI tail in place (the four dispatches already show this costs one paid pod session per bug, with no way to shorten the loop); splitting responsibilities, CI for measurement and a local script for supersede (two systems for one ritual, and the CI half brings back the pip-in-uv-venv class of failure for no reliability gain now that the local driver also measures); a scheduled cron trigger (decision 92 already rejected this for the same workflow, and a flaky tail makes an unattended cadence worse, not better). Reopener: if the supersede phase accumulates its own run-scarce failure history, revisit whether a cheap local test harness (fixture results directory, no pod) can be built before deciding whether any part belongs back on a runner.
97. cuda_leafwise admitted by measurement (adopted)#
Decision. The device leafwise plane of 20-cuda-leafwise.md keeps its registration. Issue #268's kill criterion was pre-registered and is met: on one pod (L40S, US-NC-1, 2026-08-01, leafwise-ladder-2026-08.jsonl, sha 2a23f33) cuda_leafwise fits 16M x 100 in 30.8s against lgbm_cuda's 32.4s. The secondary bar is met with room: it beats same-pod CPU leafwise 4.6x to 7.1x at every cell. Four arms, best of two reps, interleaved, SCALING knobs at 100 iters and 256 leaves.
| rows | cuda leafwise | lgbm cuda | leafwise (cpu) | cuda dw (anchor) |
|---|---|---|---|---|
| 250k | 2.9s | 6.7s | 13.5s | 0.7s |
| 1M | 4.4s | 7.7s | 29.3s | 1.6s |
| 4M | 10.2s | 12.2s | 66.9s | 6.0s |
| 16M | 30.8s | 32.4s | 219.8s | 22.6s |
The uncapped-depth reading. At the protocol knobs a 256-leaf budget under a depth-8 cap is the full tree, so every arm returns the same tree and the capped ladder cannot see what leaf-wise is for; it is also the regime where lgbm_cuda's r2 column reads high for the reason decision 95 identified, its CUDA learner ignoring max_depth. The extra 16M arm lifts the cap (explicit 256 leaves, no depth limit) and settles both. Uncapped, cuda_leafwise scores .8859 and CPU leafwise .8859 against lgbm_cuda's .8858: the quality gap the capped rows showed was the depth cap, not the engine, and LightGBM's fixed .8858 across both arms confirms the cap was never binding on its side. The time reading goes the other way and is recorded as-is: uncapped, cuda_leafwise takes 38.6s against lgbm_cuda's 31.6s, because best-first without a cap must find a split for every leaf it creates, doubling the round count from 25,500 to 51,100 where the capped tree skips the find at the cap. bonsai is faster at matched knobs and slower at matched accuracy, and the honest statement of the admission is that both hold.
Where the time goes. The profiled 16M rep prices the frontier serialization at 350 us per round: 19.70s of grow against the depthwise plane's 10.78s for identical histogram volume, over 25,500 rounds. That is 3.5x the design budget and 11x what the stage 0 skeleton probe measured, and the counters say why the skeleton was wrong rather than the design. 51,085 launches, 9.80s of find-stage host time against 3.46s of measured kernel time, gpu_wait at zero: the plane is launch-bound with the device idle, the exact inverse of the depthwise anchor's 7.96s gpu_wait. Trivial kernels in a cadence harness model neither the real kernels' occupancy on a frontier of one nor the staging around them. The admission stands on the ladder, not on the budget, and doc 20 now carries the decomposition and the ranked levers (launch batching, the 32 ms/tree setup residue, adaptive accumulator width).
Consequence. Every bonsai grower now has device support, closing the gap issue #268 opened; a leaf-wise user gets 30.8s at 16M where before the choice was 219.8s on bonsai's CPU arm or 32.4s by switching libraries. bonsai_cuda_leafwise joins the benchmark variant registry but deliberately not the SCALING suite tuple: the standings specs do not carry the leafwise arms, so no standings verdict moves and none of the four standings files is touched. Benchmark cells may now name an explicit num_leaves, which the uncapped arm needs and which nothing else uses.
Rejected. Withholding the registration until F reaches the 100 us budget (the kill criterion was pre-registered as a fit-time comparison against a named competitor, and moving the bar after seeing the data is the failure mode admission gates exist to prevent); reporting only the capped ladder (it is the flattering half, and the uncapped arm is where the strategy differs and where LightGBM wins); adding the arm to the standings sweep (it would expand every future refresh by a slow CPU arm and a device arm for a comparison the standings do not make). Reopener: if the launch-count levers land and the uncapped arm reaches parity with lgbm_cuda on time, the uncapped regime becomes publishable as a standings shape rather than a doc-20 footnote.
98. Device leafwise stage 3: two levers land, one is refuted (adopted)#
Decision. Stage 3 of the device leafwise campaign closes here: two levers landed, a third was built, measured, and reverted, and the closing ladder is the record. On one pod (L40S, US-NC-1, 2026-08-02, leafwise-stage3-2026-08.jsonl, sha 703a78e) cuda_leafwise fits 16M x 100 in 24.4s against lgbm_cuda's 31.9s, where decision 97 measured 30.8s against 32.4s. Three device arms, best of two reps, interleaved, unprofiled; the CPU leafwise arm is unchanged since decision 97 and is cited from it rather than re-measured.
| rows | cuda leafwise | lgbm cuda | cuda dw (anchor) | decision 97 leafwise |
|---|---|---|---|---|
| 250k | 2.1s | 6.6s | 0.7s | 2.9s |
| 1M | 3.2s | 7.6s | 1.6s | 4.4s |
| 4M | 7.6s | 12.3s | 5.9s | 10.2s |
| 16M | 24.4s | 31.9s | 23.0s | 30.8s |
The two ladders are different rentals of the same GPU model, so the reference arms carry the cross-ladder reading: lgbm_cuda and the depthwise anchor reproduce their decision 97 times within 2.4% at every cell, which licenses reading the leafwise column's 21% to 27% cut as the levers rather than the rental. Against decision 97's CPU arm the plane is now 6.4x to 9.2x faster, the margin over lgbm_cuda at 16M widens from 5% to 24%, and the fit gap to resident depthwise at 16M falls from 8.2s to 1.3s. r2_test is identical to decision 97 at every cell.
Lever 1, the device-resident objective (landed). The seam doc 20 put out of scope for stage 1 now arms for leafwise growth: eligible fits keep labels and scores on the device for the whole fit, so the per-tree gradient upload, the values and leaf-id downloads, and the host objective and score loops all go away. Same-pod A/B at 16M x 100, two reps each: median fit 30.23s to 24.60s, median grow 20.02s to 13.13s, r2_test and r2_train identical on every run rather than merely within tolerance. Arming is decided once per fit against the conservative bound (every feature selected, the widest feature sizing the stride) because a tree that declined to the host plane mid-fit would have no host gradients to fall back on; the whole decline predicate lives in one leaf_budget_ok.
Lever 2, pinned and packed round staging (landed, over a gate it misses at one cell). The fit-constant monotone vector uploads once per tree instead of once per split find, the histogram kernels' (offset, count, slot) triple becomes one packed upload behind three pointers into it, and what remains moves to pinned host memory and asynchronous copies: four per round against eight pageable ones. The saving is a fixed 0.37s of grow per fit, 14.5 us of the round against 25,500 rounds, and it is the same absolute number at every scale because it is per round and not per row. Read at the 16M gate cell that is 1.8% of fit against a 2% bar; it clears on grow (2.6%, ten interleaved blocks out of ten) and by 5x to 8x on fit at the other two cells of the same ladder (250k -17.1%, 1M -11.0%), and it ships on that basis. The deviation is recorded rather than hidden, and the rule it argues for is that a fixed-cost lever is gated across the ladder, not at the one cell where the most compute dilutes it.
Lever 3, the partition chain (built, measured, reverted). A parallel tiled segment scan replaced the single-threaded one, and the range copy-back moved to a non-blocking stream under the round's histogram, which read the smaller child from the scratch side the scatter had just written. Against its own parent it moves the paired median fit +0.03% at 16M, -1.2% at 1M, and +0.3% at 250k, with grow -0.8% at 16M, against the same 2% gate. Both halves are reverted rather than carried as a stream and an event nobody paid for, and the refutation is the deliverable: the 0.5s to 0.9s the stage 2 diagnosis attributed to the copy-back and the scan is real device time, but it overlaps work already in flight, so removing it buys back only the fraction that was on the critical path.
The stage 2 diagnosis was profiler misattribution, and the correction is the reason stage 3 worked. Decision 97 read the plane as launch-bound with the device idle at 350 us per round. Re-instrumented with per-kernel events, find_stage's 9.80s turns out to be 84% device compute in disguise: leaf_find's first pageable staging copy stream-syncs, so it absorbed the in-flight histogram and subtract kernels (8.2s) that the sibling planes peel into gpu_wait. The histogram runs at depthwise parity (8.99s against 8.77s of device time for the same volume), so there is no leafwise histogram penalty at this leaf budget and level batching would buy nothing. What decision 97's comparison actually measured was an uneven one: depthwise ran resident and leafwise could not, a seam a kill-switch A/B prices at 5.90s. The true leaf-plane penalty was 3.6s, and the ~200 us per round of host residue read off the profiled run costs 14.5 us unprofiled. Profiling stays the right instrument for attributing device time between kernels and the wrong one for pricing host residue on rounds this short; any future leaf-plane lever is gated on unprofiled wall clock at more than one scale.
The uncapped arm, honestly. Decision 97 recorded uncapped 16M at 38.6s against lgbm_cuda's 31.6s at equal accuracy and called it the admission's open number. The levers cut it 16% to 32.3s against 31.7s, with r2_test .8862 against .8858, so LightGBM's lead at matched accuracy falls from 22% to 2% and does not disappear. The reading stands as decision 97 wrote it, one step smaller: bonsai is faster at matched knobs and marginally slower at matched accuracy, and the remaining 0.6s is the same structural fact, that uncapped best-first must find a split for every leaf it creates, doubling the round count from 25,500 to 51,100.
Consequence. A leafwise GPU user gets 24.4s at 16M x 100 where decision 97 shipped 30.8s and the pre-registration bar was LightGBM's 32.4s. The registration, the dispatch grid, and the standings are untouched: no standings spec carries a leafwise arm, so nothing published moves and no axis needs a refresh. Three things stay open and are named rather than scheduled: the last 1.3s of fit to resident depthwise parity at 16M, which is now small enough that the next lever must be priced before it is built; small-node occupancy, which is real only when the mean node falls below roughly 150k rows and is therefore gated on that regime rather than on this ladder; and issue #278, the leafwise CPU-vs-GPU parity bound flaking at 1.06e-4 against its 1e-4 contract, which predates stage 3 and is a calibration decision on a contract surface (decision 40), not a drive-by widening.
Rejected. Carrying lever 3 anyway because its grow number was negative in every block (a lever that does not move fit is not a lever, and a stream plus an event is permanent complexity paid for a measurement inside the noise); holding lever 2 back on its missed 2% at the gate cell (the gate is a percentage and the saving is a fixed cost, so the gate cell is structurally the worst place to read it, and the same lever is 5x to 8x over the bar at the cells where the round is the fit); re-measuring CPU leafwise on this pod for a complete four-arm table (it is unchanged code, it costs more pod minutes than every device arm combined, and decision 97's numbers are the honest citation); widening the parity bound while the flake was in front of us (issue #278 exists so that the contract moves deliberately). Reopener: if a priced lever closes the last 1.3s to depthwise, or if a sub-150k-row regime makes small-node occupancy the top term, stage 4 opens with the same discipline: unprofiled wall clock, more than one scale, and a pre-registered gate read across the ladder.
99. Dataset takes a device hint, so the two-step form keeps device binning (adopted)#
Decision. bonsai.Dataset(X, y, ..., device="cuda", device_id=0) bins on the device, and the two-step workflow reaches the same ingest path the fused train(pairs, X, y) call has used since decision 54. Until now it could not: device binning is chosen inside make_labeled from the grower name, and a standalone Dataset construction has no grower, so it always binned on the host. The cost was measured on one L40S at 4M x 100: fit 2.92s against 4.30s and peak host RSS 1.86GB against 2.51GB, identical r2, with the ingest profile reading dbin=0.09s bin=0.00s fused and dbin=0.00s bin=1.14s two-step. The benchmark harness hit exactly this and published it into a standings refresh before it was caught (issue #290 records the protocol response). Parity is the admission bar and it is met: 4M reads 3.207s fused against 3.209s hinted, 16M 12.056s against 12.005s, both inside interleaved-repeat noise on time and memory.
Consequence. A hyperparameter sweep binds its data once. The engine is rebuilt per train call, so a sweep over a host array pays mapper-fit plus device binning on every fit; over a device-hinted Dataset it pays once, measured at 3.63s against 0.74s over five fits at 16M, which is 5% of that sweep's wall clock and grows as the per-fit iteration count falls. Mismatch is resolved by materialization rather than refusal: a device-binned Dataset handed to a CPU grower fills its host bins on first host consumer, through the call_once path Dataset already had, and its model is byte-identical to a host Dataset's. A parallel.device_id that disagrees with the Dataset raises before any device work; device="cuda" without a build or a device raises, because it is an explicit request rather than an engine inference, while the oversized-max_bin ingest decline stays silent and reports device == "cpu" truthfully. Device-binned Datasets do not pickle. The constructor also gained n_threads, which it never honored before, so its binning ran outside parallel.n_threads.
Rejected. Binning both host and device eagerly (pays memory for a fallback most callers never take); refusing the CPU-grower combination outright (the materialization path already existed and refusing would make a reusable Dataset less reusable, which is the point of the feature); inferring the device from the first train call instead of taking a hint (binning would then happen at a moment the caller cannot see, and a sweep's first fit would pay a cost its siblings do not). Reopener: device-resident input (issue #289), which changes where the bytes come from rather than where they are binned, and shares this seam.
100. The device-leafwise campaign was measured on a host-binning harness (adopted)#
Decision. Every bonsai CUDA number in decisions 95, 97, and 98 was measured through a benchmark harness that could not reach device binning, so the campaign's published absolutes overstate bonsai's fit time and understate the result it reports. The mechanism is decision 99's: at 4e035f0 the bench runner split its fit into Dataset(X, y, max_bin) then train(pairs, ds), and a Dataset built before a grower is named always binned on the host, so every cuda_ arm carried a host binned matrix, and about 2.5GB of extra host memory, for the whole fit (16M x 100 peak RSS reads 9.47GB in the affected ladders against 6.93GB on the fixed path). All three evidence files carry that commit and none carries the fix, 77633a6: leafwise-recheck-2026-08.jsonl at f5e7740, leafwise-ladder-2026-08.jsonl at 2a23f33, leafwise-stage3-2026-08.jsonl at 703a78e. The bias ran one way, against bonsai: no reference arm touched the affected path. Decisions 95, 97, and 98 are not rewritten: this entry is the correction of record, in the pattern decision 95 used on decision 42. Evidence: leafwise-correction-2026-08.jsonl (one L40S, US-NC-1, 2026-08-03, the campaign's three device arms at the campaign's knobs, best of two reps, interleaved, unprofiled, on the fixed path, plus the uncapped arm and two instrument controls).
| rows | cuda leafwise | lgbm cuda | cuda dw (anchor) | decision 98 leafwise |
|---|---|---|---|---|
| 250k | 3.3s | 8.6s | 0.8s | 2.1s |
| 1M | 4.2s | 9.7s | 1.5s | 3.2s |
| 4M | 7.2s | 14.8s | 4.4s | 7.6s |
| 16M | 18.7s | 37.0s | 15.8s | 24.4s |
The rental, stated before the readings that depend on it. This is the slowest of the three L40S rentals the campaign has used: lgbm_cuda, which never touched the affected path, reads 16% to 29% above the times decision 98 published for it, largest at the small cells where the fit is host-side fixed cost. That is why the 250k and 1M leafwise cells read above their published numbers rather than below, and it is why no absolute here should be quoted against a campaign absolute without its reference arm. What survives the rental is the ratio, and a second reading of the load-bearing cell survives with it: the 2026-08-02 standings measured 16M x 100 on the fixed path on a rental that reproduces the campaign's reference times, at cuda_leafwise 13.8s against lgbm_cuda 31.8s. The distance between 18.7s and 13.8s is taken apart rather than left as pod luck: the bench driver's profile counters price at 0% to 2%, the --data-cache memmap every campaign ladder used costs another 12% at 16M (the standings run without it, and dropping it here reads 16.5s leafwise and 13.7s depthwise), and what remains is 19% of rental on identical protocol, in line with the reference arm's 16%.
What moves. The kill criterion pre-registered in issue #268 was met far more decisively than recorded: cuda_leafwise is 2.0x LightGBM's CUDA leaf-wise at 16M on this pod and 2.3x on the standings pod, where decision 97 published 5% of margin and decision 98 published 24%. The fit gap to the resident depthwise anchor at 16M is 2.9s here and 1.7s on the standings pod, not the 1.3s decision 98 recorded: the host binning pass sat on both planes and flattered their distance, so the leaf plane is not as close to depthwise parity as the record claims. Against decision 97's CPU leafwise column the plane is 4.1x to 11.8x rather than 6.4x to 9.2x, spread wider at both ends by the same rental effect. Decision 98's 21% to 27% cut on the stage 2 column stands as measured and is a floor: both ladders carried the same handicap, so removing it from both sides raises the percentage rather than lowering it.
What does not move. Every lever delta in the campaign was a same-path A/B with the handicap on both arms, so decision 98's levers 1 to 3 and doc 20's lever 4 stand exactly as measured. CPU leafwise binned on the host by design, in every run, so decision 95's headline (LightGBM's CUDA leaf-wise beats bonsai's CPU leafwise 5.3x at 16M) is untouched; only the cuda_depthwise anchor row of that recheck carried the handicap. No standings axis moves: the standings were re-measured on the fixed harness for 1.6.0 and already read the corrected numbers, which is how the drift was caught.
The campaign's one negative finding inverts. Decision 97 recorded the uncapped 16M arm at 38.6s against lgbm_cuda's 31.6s and decision 98 at 32.3s against 31.7s, calling LightGBM's 2% lead at matched accuracy the honest half of the admission. On the fixed harness, same pod, same knobs, best of two reps: cuda_leafwise 27.5s at r2_test .8862 against lgbm_cuda 36.8s at .8858. bonsai leads the uncapped cell by 34% at matched accuracy. The structural fact decision 97 named is unchanged, that uncapped best-first must find a split for every leaf it creates and so pays 51,100 rounds against the capped tree's 25,500; what it does not do is cost the arm the comparison.
Also recorded. The bench driver forces BONSAI_GROW_PROFILE, BONSAI_INGEST_PROFILE, BONSAI_CUDA_PROFILE, and BONSAI_FIT_PROFILE on for every bonsai child, so both campaign ladders ran with the counters on despite decision 98 and the ledger describing the closing ladder as unprofiled; the ledger line is corrected here. Priced on this pod at every cell, the counters cost 0% to 2% of leafwise fit (16M: 18.8s against 18.7s), so nothing in the campaign turns on them, and BONSAI_BENCH_NO_PROFILE=1 now exists so the question is measurable rather than assumed. The --data-cache memmap costs more than the instrument it was chosen over: 12% of leafwise fit at 16M, on a flag every campaign ladder passed and the standings do not, which is worth knowing before the next cross-ladder comparison is drawn. One further observation, not chased here: two of ten device-leafwise reps on the fixed path scored r2_test .8798 and .8781 where every other rep of the same cell scored .8793 and .8783, while the affected ladders and the standings reproduced their scores exactly across reps. That is run-to-run variation inside the fit, it is adjacent to issue #278's parity-bound flake, and it wants its own measurement rather than a sentence here.
Rejected. Deleting or rewriting the three superseded evidence files (they are dated records of what was measured, decisions 95, 97, and 98 cite them, and the archive moves by correction rather than by edit; the ledger sections that render them now say in prose that they carry the handicap and point here); re-measuring CPU leafwise (it binned on the host in every run, so nothing about it moved, and it costs more pod minutes than every device arm combined); publishing the correction from the standings alone (they carry one cell, not a ladder, and not the uncapped arm that inverts); renting a second pod for absolutes that match the campaign's rentals (three rentals already agree on the ratio, which is the claim, and decision 94's fleet-variance caveat is the standing answer for the rest). Reopener: issue #290 pins the ingest contract so that a device arm which silently bins on the host fails loudly instead of waiting for a reader to notice an odd table; if that lands and any published table still disagrees with it, this correction reopens rather than a fourth ladder being rented.
101. Perf rows report ingest and train for every arm (adopted)#
Status 2026-08-04: the committed standings behind this entry were measured before the two-step runner merged and carried no bonsai split; the 2026-08-04 refresh supersedes them with the split measured for every arm.
Decision. Every perf row now carries ingest_s and train_s alongside fit_s, bonsai included. The bench runner fits through Dataset(X, y, max_bin=..., device=...) then train(pairs, dataset); fit_s remains the outer wall clock over both and is never redefined as their sum. This was impossible until decision 99: a prebuilt Dataset without a device hint bins on the host whatever grower follows it, so its ingest number would describe a pipeline no GPU arm runs. That is not a hypothetical failure, it reached a published refresh and was withdrawn (decision 100).
Consequence. The split says something the total hides, and it says it against us. At 16M x 100 on one L40S, XGBoost trains in 7.0s against bonsai's 11.0s, 36% faster, while bonsai's ingest is 1.2s against XGBoost's 30.0s. The 3x margin in the total column is ingest, not boosting: bonsai bins on the device where the references sketch on the host and ship the result across the bus. Against LightGBM's CUDA leaf-wise and CatBoost's GPU oblivious, bonsai leads both halves (12.8s against 15.4s of training, 9.4s against 19.6s), so the deficit is specific to XGBoost's depth-wise kernels and is now a named target rather than an invisible one. The two halves also scale differently with hardware: on a second host with a faster card, bonsai's training halved while its ingest held flat and XGBoost's ingest got worse, which a single column cannot express.
The standing evidence is a parity arm, not an assertion. Every refresh fits the anchor cell through both the fused and two-step forms, interleaved on the same pod, banded at 5% on fit_s and on peak RSS, and a failure stops the supersession before it touches a file rather than annotating the result. This run read 12.01s fused against 11.99s two-step, 0.2% apart, with the split at ingest 1.05s and train 10.94s. Without that arm a regression in the device hint would silently reintroduce host binning and post a plausible ingest number, which is exactly how the withdrawn refresh passed unnoticed.
Rejected. Reporting the split for the reference libraries only, which is what the harness did and what made bonsai's column read as absent rather than fast; deriving bonsai's ingest from the profile counters, which perturb short rounds and are the wrong instrument (decision 98); and reusing one Dataset across repeats or variants, which amortizes a cost each row must be charged in full. The amortization is real and worth measuring, but as its own study: one device Dataset served three growers in 1.1s of ingest plus 25.3s of fits rather than three separate ingests.
102. Device-resident input bins in place (adopted)#
Decision. Any CUDA array supporting DLPack is accepted as training data and binned where it already lives, so a caller whose data is on the GPU reaches a trained model without a host round trip. This closes the one regime where bonsai's ingest advantage inverted: for host input, device binning means the host never materializes a second full-size copy (decision 54, and the headroom column added under issue #291 prices it at roughly 8% of the input array against 2.5x to 3.5x for the reference libraries), but a caller already holding a device array had to copy down to host memory first, which XGBoost's QuantileDMatrix avoids by sketching in place. Measured on one L40S at 4M x 100 with the data already resident, 20 iterations: 1.30s and 1.28s to download and fit, against 1.04s and 0.96s binning in place, maximum prediction difference 9.5e-7.
Consequence. The bin mapper still cuts on a host sample, and deliberately so: sampling on the device would change the sampled set and therefore the model, which doc 15's phase-2 rule forbids. The device arm instead gathers exactly the rows bin_sample_rows names into a compact block, downloads that block, and runs the ordinary BinMappers::fit, which re-samples it and finds it already at sample size. Cuts are bit-identical to the host path by construction, and the download is the sample rather than the matrix: 80MB against 6.4GB at 16M x 100. Ownership is borrow-for-one-call: ingest copies into a plane owning its own device memory, so nothing bonsai holds points into the caller's allocation afterward. Stream ordering is the producer's under DLPack, which synchronizes at export, and bonsai reads on the default stream, so there is no handle to plumb and nothing to wait on. Labels and weights are accepted device-resident and downloaded once, because every consumer of them (the host objective, the eval loop, the resident uploader) reads them host-side; when that stops being true they can stay. Mismatch follows decision 99: a device-id disagreement raises before any device work, a device request without a device or a build raises, and device="cpu" with device input raises rather than silently copying back. The cuda_ingest bin-count decline inverts here, since there is no host copy to fall back to: the device arm always mints a plane, and a declining grower takes the lazy host materialization instead.
Parity, stated in two parts because it is two claims. For CPU growers the model artifact is byte-identical to the host path, which is the bin-identity claim: the grower reads the device's bins materialized on the host. For cuda_* growers the contract is tolerance-equal at 1e-4 on predictions and nothing stronger, because device float atomics are not reproducible run to run; three repeats of one cuda_depthwise fit on one unchanged host array produced three different model hashes on the same pod. That is the same phenomenon behind the r2 spread recorded in decision 100 and the parity-bound flake of issue #278, and it is a property of the device plane rather than of this feature.
Rejected. Sampling the bin mapper's cuts on the device (changes the model, and the compact-gather download costs 80MB to avoid that); retaining a borrowed device pointer past the call (an aliasing contract callers cannot see); accepting device input into the standings ladders (every arm is handed the same host array, and a device-input study is a separate measurement where every arm that supports such input is measured on it); parsing __cuda_array_interface__ by hand (built first and replaced before ship: nanobind's DLPack import runs the same validation with no owned code, and the one producer class it does not reach, numba's device array, arrives through cupy.asarray). Reopener: keeping labels device-resident once a consumer can read them there.
103. The device bin plane is tile-blocked (adopted)#
Status 2026-09-05: the quantised sub-histogram reopener is taken by decision 124 (int64 fixed point); the tile's shared cost doubled rather than halved, so width 16 stays priced, not opened.
Standings: rows, width, frontier, airline
Decision. The CUDA binned matrix is written and read in feature tiles of 8: feature f lives in tile f / 8 at strip position f % 8, tile t starts at cell n_rows * t * 8, and one row's strip inside it is the tail-aware min(8, n_feats - t * 8) cells wide. This is the layout decision 89 adopted on the host (Dataset::row_major_bins), at the width device shared memory allows. It is the plane, not a copy of it: both ingest arms write it, the host upload stages it, materialize un-tiles on the way home because the host store is per-feature columns, and every device reader moved with it, the histogram build by a new kernel and the small-node build, the partition count and the resident epilogue by one index expression each. The layout arithmetic lives in exactly one function and the width is one constant. The histogram build owns one tile per block, loads a row's strip in a single aligned vector load, reads the row id and its gradient pair once per tile rather than once per feature, and keeps one sub-histogram per lane with no warp-parity duplication, so eight lanes at 255 bins ask 16 KiB and the whole build stays inside the static shared budget with no opt-in. A tree that subsamples features rides the same tiles through a per-feature slot map, and bin counts too wide for a tile's sub-histograms fall back to one feature per block on the same plane, which costs what the feature-major plane cost, so the wide-bin envelope is unchanged.
Consequence. Measured on one L40S (EU-NL-1, interleaved A/B against main, three reps, 16M x 100), where tile 8 is what ships and tile 16 is the width the depthwise build alone would have picked:
| cell | main | tile 16 | tile 8 |
|---|---|---|---|
| depthwise depth 8, train | 11.02s | 6.85s | 7.23s |
depthwise depth 8, adv_hist |
7.95s | 2.49s | 3.07s |
| depthwise depth 4, train | 3.58s | 3.70s | 3.61s |
| leafwise 16M, train | 12.64s | 14.65s | 11.31s |
The histogram kernel the whole gap lived in falls 61%, and the depth-8 fit falls 34%. The crown reading is the one that matters: at this cell bonsai's depthwise arm was 59% behind XGBoost's trainer and is now inside 4%, which is a statistical tie at this pod's spread. Leafwise gains 10.5% for free, having never been the target, depth 4 is neutral at 0.8%, and r2_test spans {0.8793, 0.8798} on both branches equally, the known flutter rather than a difference. The width is 8 and not 16 because one plane serves both growers and the choice is therefore joint: 16 is better for depthwise by 5% of fit and worse for leafwise by 15.9%, which fails the pre-registered 5% leaf-plane bar, and it fails it for the reason doc 20's lever 4 predicted, since a leafwise round histograms one node and a tile-narrowed grid stops filling the device. 8 passes every pre-registered bar and improves both planes, so it ships, and the depthwise width question is not closed but priced: reopener, an adaptive accumulator width (16-bit or quantised sub-histograms, named and never opened in doc 20) would halve the tile's shared cost and put 16 or wider back on the table for both planes at once.
Rejected. Feature grouping at fixed layout, refuted by measurement in PR #332: it varied the block's feature width while the plane stayed feature-major, so it paid a G-fold shared footprint and collected none of the gather benefit, which exists only when the bytes a block needs are adjacent, and its G=8 arm additionally kept the warp-parity duplication and so ran at half the occupancy before reading a byte differently. Row reordering into node order, which sounds free because the partition already computes the ordering and is not: the partition permutes the row list, not the matrix, so a contiguous gather would mean physically permuting the whole matrix once per level, priced at 25.6 GB per tree against the 107 GB it removes, and it is the only option here that changes what a row id means. Full row-major (ELLPACK shape), dominated at this feature count: a block cannot own 100 features of shared histogram, so it reads a partial unaligned strip out of each row and reintroduces exactly the partial-sector waste tiling removes, while route_add loses its coalescing and both the host upload and materialize need a transpose anyway. Per-plane widths, one for depthwise and one for leafwise, which is not an option without a second copy of the matrix and therefore the 1.6 GB the probe form was retired to avoid. The probe record, including the pre-registered criteria this measurement was read against, is PR #335; the shipping measurement is this PR's.
104. The standings are six scenarios on two gated planes (adopted)#
Standings: gpu-tall, gpu-wide, gpu-extreme, cpu-tall, cpu-wide, gpu-early-stop
Decision. The perf standings are redesigned from four grid axes to six single-cell scenarios: an iso-volume tall/wide pair per plane (2^31 cells on GPU, 2^28 on CPU), one VRAM-ceiling extreme on GPU where an OOM is a published result, and early stopping as a standing behavior axis. Every scenario publishes the same dimensions, the fixed/variable split (ingest_s, train_s) beside peak host RSS and per-process device memory, with one fused wall clock at gpu-tall from the parity arm. Arms pair by growth strategy on one page, grower by grower, hardware never mixed in a table. The standings card moves to the RTX PRO 6000 Blackwell (96GB), the card the extreme scenario is sized to. Axes carry a plane, and the release gate skips any axis whose plane's sources are byte-unchanged since its refresh, so a one-plane change re-measures one plane.
Consequence. A full refresh is 48 jobs where the retired grids ran hundreds, and a routine one is smaller still under the plane gate; the three-hour refresh that motivated this (issue #318) becomes tens of minutes. The framing complaint is answered structurally: fixed and variable costs are separate columns rather than a footnote under a total, memory is two honest numbers rather than one host figure, and the tall/wide contrast replaces ladders whose interior rungs backed no claim. The grower rename rides along (decision at issue #305, shipped in the same train): the growth policy is levelwise; the tree shape remains oblivious where CatBoost's vocabulary is meant.
Retired. The rows, width, shape, frontier, and airline axes and their files; the accuracy-time frontier's unique content (the capacity sweep) and the airline suite's real-data story leave the standings entirely, by ruling, and twenty-three closed-campaign evidence files leave the tree with them. Git history is the archive (decision 92), and the generated archive page maps every retired record to its decisions and the ref where its data lives. The renderer fell by a fifth of the repo's bench tooling in the same stroke.
Rejected. Per-grower pages (one page with panels compares better); keeping the airline axis under the canonical Pafka protocol (ruled out rather than filled); a per-plane width or per-scenario knob surface (SCALING stays the one knob family); resolving archive refs at render time (shallow CI checkouts cannot see deleted-file history, so refs are pinned at generation). Reopener: doc 21's component axis joins this registry with plane: gpu when its design is built; the extreme scenario re-sizes if the standings card changes.
105. The sparse fill is one composition: buffer and reduce (adopted)#
Decision. The CPU sparse-node histogram fill becomes a single decomposition, admitted as the default and as the only path (issue #360). A level's sparse nodes are cut into fixed 1024-row blocks; the node-major block list is split into n_threads contiguous ranges; the lowest range touching a node accumulates straight into that node's arena; every higher range owns one partial, zeroed on first touch and skipped entirely when never touched; a second pass over (node, feature) pairs sums the partials in ascending range order. The per-node block plan it replaces is deleted with it: block counts derived from node size, selection width and bin footprint and capped at four blocks per thread, one partial per block, a merge per multi-block node. So is BONSAI_HIST_REDUCE, the env toggle that selected between the two during the A/B. Dense-node routing to the column fill is untouched, and the grain is a constant because a block is streamed once and never re-walked, so its size gates no cache reuse and trades only balance against per-block setup.
Measured. The gain is small and one-sided, which is what carried it. Train falls 3% on the 12-thread EPYC, reads 0 to -2% on the 16-thread Xeon, and shows no separable change on the M2 against a rep-to-rep drift near 1s at 2M x 128, depth 8, 100 iterations, 8 threads. Across the interleaved paired reps on every host the new arm never lost one. Peak RSS falls, and that part is structural rather than tuned: because the block list is node-major and thread ranges are contiguous, the ranges touching a node form a run, the runs telescope, and a level needs at most n_threads - 1 partial buffers however many nodes it holds. The old plan bounded blocks per node and paid a partial for each, so its slab grew as O(n_threads x n_nodes) where this one is O(n_threads). At depth 8 that is orders of magnitude.
Consequence. Models shift. A node's summation order now depends on the level-wide partition, so at a fixed thread count and a fixed dataset the depthwise and levelwise CPU model bytes differ from every version before this one, and the next standings refresh re-baselines rather than compares. Determinism itself is unchanged and stated in architecture/7-parallel.md: buffers are keyed by the partition index rather than the OpenMP worker, so scheduling cannot reorder a sum, and a fixed n_threads reproduces. The contract's dependency list is wider than it was, because the block list is cut level-wide: one node's row count moves another node's cut points. The load-balance trade is written down in the same place, because the obvious future fix silently undoes the memory result. Emitting exactly n_threads work units is what buys the partial bound, and it degrades for_each_index to chunk 1 with nothing left to steal, which is the static partition that doc's scheduling rationale warns about on asymmetric cores. The bound and the balance are one dial and this fill picks the bound.
Rejected. Shipping the toggle, which the design review priced as the one outcome worse than both alternatives on every axis it could price: two schedules to keep correct, two determinism stories under a doc that describes one, roughly 175 lines dead on arrival, a knob whose value 1 did not mean 1, and a fill path no test could reach because the selector read the environment. Default or decline, and the measurement decided which. Also rejected: grafting one ingredient of the reference decomposition at a time, refuted twice before this composition was tried whole; and a work-proportional block count, which the old plan needed because a block cost a full slab zero plus a merge to start, and which this one does not, since lazy per-range zeroing and a rebuild of the histogram bases only on node change make a block nearly free to begin.
106. Per-candidate min_data_in_leaf: declined by measurement (adopted)#
Decision. bonsai keeps its node-level row floor; the per-candidate child floor LightGBM and XGBoost apply is not adopted. Measured at zero core cost via the min_child_hess identity (MSE writes a per-row hessian of 1.0, so min_child_hess = 20 is the feature for regression): on the 55-dataset quality suite over 3 seeds, the strict arm is net negative (20 datasets beyond the decision-55 band, 16 losses; AUC mean -0.008, rmse mean +0.65%), and XGBoost's own min_child_weight toggle loses the same way on the same datasets, so the floor is an over-aggressive regularization default rather than a bonsai deficiency. Sub-floor leaves are common (median 25% of leaves) but hold ~1% of training rows. Evidence in PR #379's record; the probe was deliberately not kept.
Consequence. The semantics live in one place: the interop tables document the non-equivalence at the LightGBM/CatBoost min_data_in_leaf rows, and the parameters page now states what the knob gates. min_child_hess = 20 expresses the strict form today, exactly a 20-row floor under squared error. Side finding: mapping min_data_in_leaf = 20 onto XGBoost's min_child_weight = 20 (decision 68's matched-knob rule) costs XGBoost beyond the band on 23 of 55 datasets; the rule stays, but the handicap is measured now, not assumed. Reopener: a workload whose sub-floor leaves carry real mass, or a row-expressed classification floor beating the default beyond the band.
106. The hist chunk axis fills the card (adopted)#
Decision. launch_hist owns the chunk policy for all four of its callers: n_chunks is the larger of the row-split term (max_rows / 32768) and a fill term, ceil(sm_count * 4 / (grid_x * n_nodes)), clamped to [1, 64]. Both histogram kernels return before their shared zero when the chunk starts past the node's row count, a block-uniform exit that makes overshooting the chunk axis free on small nodes. The SM count is read once beside the shared-limit probe; a failed query disables the fill term rather than the launch.
Attribution. The small-cell fit-time trade published with the tiled plane (decision 103, issue #340) was occupancy starvation, not per-block fixed cost. Tiling divides grid.x by the tile width, and a shallow level over small data launches tiles x nodes blocks: a fraction of a 142-SM L40S, while the Orin's 8 SMs never notice. The three-arm A/B on the Orin (feature-major plane, tiled plane + per-feature kernel, tiled plane + tiled kernel; 3 interleaved reps) has the tiled kernel WINNING the exact cells that regress on the L40S, 7.33s to 5.41s of level-hist at 1M x 128, which rules the per-block cost story out on the device where fixed costs bite hardest.
Measured. Same-pod interleaved medians on one L40S (US-TX-3, 3 reps, r2_test a single value per cell with one 4th-decimal flutter of the issue #278 class): train at 262k x 128 falls 30.4% depthwise and 22.0% levelwise; 1M falls 6.3% and 8.1%; leafwise at 1M falls 35.3% (4.20s to 2.72s), because its per-round build launches one node's tiles and was the most starved caller of all; 4M and 16M read -0.6% to -0.0%, the no-regression bar met exactly. The Orin guard pair is a no-op (5.41s vs 5.40s), as the fill term predicts for a narrow device.
Rejected. Raising the small-node cutoff: the 2026-08-17 sweep measured every cutoff above 512 worse at every cell, monotonically. Per-node chunk lists: they shrink the chunk axis where the mechanism wants it grown, and the early exit already prices uniform overshoot at a block launch. The early exit alone: measured a no-op at uniform cells on the Orin (workless chunks are rare without skew), kept solely as the guard the fill term composes with. Routing more nodes to hist_small_kernel: unchanged at 512, per the same sweep.
107. Typed params are generated from the section registry (adopted)#
Decision. The Python surface gains bonsai.Params, one frozen dataclass per config section with every field defaulting to None ("leave the library default"), plus a train() wrapper accepting Params or a dotted-key dict, both rendered to the unchanged (str, str) pairs wire format (accepted publicly in the first cut, retired the same day; the Consequence records the turn). The dataclasses are not written by hand: a _bonsai._params_schema() binding folds the same all_sections tuple dump_toml folds, emitting name, C++ type, and default per field, and scripts/gen_params_py.py renders bonsai/_params.py from it at build time, ordered before the nanobind stub the way the stub is ordered after the extension. Behavior (to_dict/from_dict, | merge with right-side-wins, the sparse repr) lives on a committed mixin, so the generator stays a renderer.
Consequence. The registry stays the single source: a new field<&SubConfig::name>() line appears in Params on the next build with its real C++ type, with no Python mirror to drift (the TOML-inference alternative types lambda_l1 = 0.0's whole-number rendering as int; the registry binding types it float). Misspelled knobs fail at Params/from_dict construction with the section's legal names in the message instead of at fit time in C++. Params | {"tree.max_depth": d} is the sweep idiom, and the dotted key doubling as the optuna trial name makes objectives one merge long. The pairs wire format is untouched, so every model-hash gate holds; data.* and CLI-only sections generate like the rest rather than maintaining a curated subset. The bench seating landed in the same change set: interop.to_* accepts a Params (the dict(pairs) normalization grows one isinstance), the *_core builders state their cells as Params.from_dict literals (retiring the _BONSAI_KEY hand mirror and _translated), BONSAI_CAMPAIGN_PARAMS derives its values from CAMPAIGN under registry validation, and a spec's defaults block rejects unknown keys at load. With bonsai's one production consumer being its own author, the pairs form then retired from the public wrapper in the same change set: train accepts Params | dict | None and raises on a pairs list with the dict(pairs) escape named, interop.from_* returns a Params with typed values (the round trip through to_* is now exact rather than stringified), and the pairs remain only as the native wire format under the wrapper. The config= argument then retired from train and the estimators (a mix of concerns, Daniel's call): Params.from_toml(path) carries only the keys a TOML file states — parsed by a typed_overrides walker in the C++ config layer, so no Python TOML dependency and no 3.11 floor — and from_toml(path) | overrides expresses the -c + --set layering through the one params argument. Params.from_model rides the same binding (the resolved config, every key set), closing that deferred item. The Dataset path's [bin_mapper] config-file check is subsumed: a TOML base arrives as ordinary pairs and hits the existing rejection. Still deferred: estimator re-seating (params= and fit accepting Params) and per-round callbacks for optuna pruning.
Rejected. A hand-written Python mirror (a second source of truth, the exact drift class bench/params.py's docstring documents). Runtime TOML parsing of default_config_toml() (needs tomli on 3.9/3.10, and inferred types carry the int-for-float trap). A committed generated file with a CI staleness check (reviewable, but adds a render ritual and install plumbing the stub precedent already avoids; Daniel's call, build-time only). Flat fields on one class (seed, random_seed, and feature_seed collide, and section names carry meaning the flat space loses).
108. Prediction and TreeSHAP serve the resident Dataset; SHAP takes a crown (adopted)#
Status 2026-08-25: the oblivious half of the decline recorded here is lifted by decision 111; multiclass still declines.
Status 2026-09-04: the additivity watch item below is reached earlier than recorded: decision 111's L40S session measured the worst fp32 residual at 1.0e-5 depthwise and 7.8e-6 levelwise at 200 trees depth 10, not 500 trees depth 8. The escape is unchanged: pass the raw matrix and the fp64 host walk runs.
Decision. Every X-taking Model method accepts a Dataset, and the dispatch picks the strongest route the Dataset supports: the model's own cuts route bin space (exact, no raw rows, DLPack builds included), foreign cuts fall back to the retained host matrix, neither raises with both remedies. Width-1 dense-tree models additionally route two device planes: whole-ensemble predict (a route_add generalization over the resident bins, plan receipt keyed on a booster mutation epoch) and TreeSHAP (path decomposition into 8-byte u8 bin-interval elements evaluated by a division-free closed form, thread per row-path, fp32 walk under a double-precision host epilogue). Oblivious and multiclass models decline to the host bin walk. Design record: architecture/22.
Measured (RTX PRO 6000 Blackwell Server, same pod, interleaved arms, xgboost 3.3.0 on cuda:0 confirmed via save_config). The gpu-shap axis (500 trees, SHAP over the held-out test matrix per protocol, 2 repeats, sha ffce72d): bonsai beats xgboost's GPU engine in every cell, 0.57s vs 2.38s at 1M x 128 d6 (4.2x), 1.34s vs 5.61s at 4M x 128 (4.2x), 0.84s vs 2.57s at 1M x 512 (3.0x), 2.46s vs 7.46s at 1M x 128 d8 (3.0x); context arms: CatBoost CPU SHAP 3.2-8.4s, LightGBM CPU SHAP 173-378s with the d8 cell timing out at 900s. A deeper hand ladder over the full training matrix at the same shapes: 2.32s vs 11.44s, 8.59s vs 46.25s, 10.43s vs 44.02s (4.2-5.4x). Additivity residuals same order both arms (bonsai 8.2e-6 to 1.38e-5, xgboost 3.8e-6 to 5.8e-6); bonsai's closed form is exact in exact arithmetic where xgboost's QuadratureSHAP (its 3.3 replacement for GPUTreeShap) is a quadrature approximation, and the fp32 gap against bonsai's own fp64 host walk measured 7.9e-6 at 200 trees. Predict from the resident Dataset 0.011-0.038s against xgboost inplace_predict 0.40-1.75s from host numpy; that column measures the resident-loop workload (xgboost pays the host-to-device movement per call, which is the cost this design removes), not a kernel-versus-kernel claim. Device parity held on both sm_87 and Blackwell: predict bit-equal after spelling the fma rounding out, SHAP within two orders of its tolerance. Host-side wins ride along: the per-row bias walk deleted (leafwise pred_contribs -30% on a Mac at 300k x 32 x 200) and the oblivious re-densify cached per epoch.
Consequence. The select-then-refit loop runs end to end on the resident bins: bin once, fit, eval, explain, filter outside, refit, with the only recurring host traffic being the results. The u8 bin compare and the epoch-keyed plan cache are edges no competitor algorithm swap removes: xgboost dequantizes its ellpack per read and recompresses its model every ShapValues call. Watch items, recorded not hidden: the fp32 additivity residual grows with tree count and crosses 1e-5 at 500 trees depth 8 (the escape today is passing the raw matrix, which runs the fp64 host walk; an fp64 kernel instantiation is the fix if a workload needs the device at that fidelity), and the v1 kernel geometry left shared-memory row staging, atomic-contention mitigation, and K=32 register pressure unpriced. The gpu-shap axis publishes the category with a fidelity column beside the throughput race.
Rejected. Thread-per-row iterative DFS (local-memory bound, quadratic in depth, priced in architecture/22); warp-per-path GPUTreeShap geometry at bonsai's merged path lengths (shuffle machinery to parallelize six iterations, lanes idle); a rows= filter parameter (filtering happens outside in numpy against cheap predictions); a device predicate mini-language (same reason); folding the bias into the kernel (it is one fp64 scalar per model).
Standings: gpu-shap
109. The bin store is the sharing unit; the fit keys its own labels (adopted)#
A per-member call-site census of Dataset's nine change reasons, production separated from tests, preceded the cut (the census itself was working material, not kept). The cut: BinStore owns the binned matrix (columns, plane, lazy host bins, width flag, the row mirror) and the cuts, because bins are unreadable without them; Dataset remains the composite consumers hold: labels, weights, and which rows, over a shared_ptr<BinStore const>. The name does not invert: the census showed every production consumer reads bins and labels through one object, and the Python Dataset plus 175 doc mentions make the composite the public noun. Forwarders keep all existing call sites and keep bin_at header-inline.
The behavioral half re-keys the caches. Bins key by the store's address, corroborated by geometry, and on the adopted-plane path the key holds the plane alive, so that address cannot be recycled under it. Labels and the resident arming key by MINTED tokens (LabelsId per labels block, FitId per fit specification: new for every factory product and every view, shared by copies), never by address: a first cut keyed labels by the Meta block's address and review round 3 showed allocator reuse re-creates exactly the trap being removed, one level down, and that the host-side resident_train_ pointer had the same defect with deterministic stack-slot reuse. Tokens are monotone and zero is never minted, so equality means identity with no reuse caveat: a view shares its parent's LabelsId (skips the label re-upload) but carries its own FitId (re-arms the resident state, whose row list is per-fit).
Measured: interleaved same-machine A/B (B,A,B,A blocks, 2M x 32 x 150 iters), populate min 3.45s on both arms, finalize 0.49-0.53s on both; the forwarder hop is paid per column because the fills hoist their spans. Wire identity 55c6fe308852d9bb unmoved. Rejected: renaming the store Dataset and the residue Fit (inverts the public noun against every consumer's read pattern); moving the row view to a grow() argument (churns the IBooster seam for zero census evidence); std::function in the mirror's mint seam (type erasure on a minting path for one caller).
111. The device plan input owns what it lends (adopted)#
Decision. DevicePlanInput, the one seam both device planes read, carries an optional owner beside its span<DenseTree const>. A dense booster lends a view of its own ensemble and leaves the owner null; a levelwise booster attaches the epoch-cached dense equivalent that its host TreeSHAP path already builds, and points the span at that. Nothing else changes: the packers take DenseTree whichever grower produced it, and they copy and upload at pack time, so the owner has only to outlive the pack call, which the caller's own local already does. Levelwise width-1 models therefore take device predict and device TreeSHAP from a resident Dataset with no change above the seam. Multiclass keeps declining, through the empty default and through the width gate above it.
Why it was ever declined. Not for a kernel reason. dense_equivalent has always expanded an oblivious tree into the shape TreeSHAP's cover-weighted walk is written against, which is how levelwise pred_contribs works on the host. What blocked the device was purely lifetime: the seam's contract was that the span stays valid until the booster mutates, which a booster lending its own vector can promise and one converting into a cache cannot. Recording the reason matters because the shape recurs: a borrow-versus-own mismatch at a type-erased seam reads like a missing capability from either side of it.
Consequence. Densification mints a perfect tree, so a depth-d levelwise tree packs 2^d paths whatever its live coverage. An oblivious tree splits one feature per level and may split the same feature at two levels, so the expansion contains corners asserting f <= t_i and f > t_j at once: the dead slots are unreachable by construction, not merely unvisited, and a measured fixture has 106 of its 256 leaves dead with no input of either distribution routing to one. What the device therefore meets is the unsatisfied case, a zero-cover element in a path the row does not follow, and it meets it constantly. The two walks reach it differently: the host form divides by the cover fraction and so has to guard the branch off, while the device closed form only ever multiplies by it and needs no guard. That they agree anyway is what the parity fixtures check, and a host case pins the structural claim so the device fixtures cannot quietly stop carrying dead leaves. Correctness is device-verified on the Orin, and the throughput question the 2^d raised is now measured and answered the other way. Same L40S, arms interleaved, 1M x 128 at 200 trees, TreeSHAP over the held-out matrix, the levelwise device path against the released wheel where it declines: 22.0x at depth 4, 50.8x at 6, 75.2x at 8, 83.4x at 10, the ratio growing with depth. Levelwise on the device also beats DEPTHWISE on the device from depth 6 up, 5.40s against 10.24s at depth 10, which is the opposite of what packing 2^d paths predicts. The cause is the structure that mints the dead slots: an oblivious tree repeats features across levels, a path merges one element per DISTINCT feature, so its merged paths are short where a depthwise path can carry one element per level. Merged length picks the kernel template and the polynomial degree, so levelwise packs more paths and pays less for each, and the per-path saving wins. The same shortness shows up in fidelity: worst additivity residual 7.8e-6 against depthwise's 1.0e-5 at depth 10, which is decision 108's watch item reached at 200 trees rather than 500. The control is depthwise, which takes the device path in both arms and reads -0.1% to -1.0% across the cells that resolve, so the levelwise effect is not pod drift. One host-side cost is charged here rather than left to be discovered: the plan input stopped being free for an oblivious booster, so predict_on_device and contribs_on_device now ask for it only after the gates that do not need it, or a levelwise model predicting from a host-binned Dataset would build and retain a dense ensemble it never packs.
Rejected. Making the input own always, with dense synthesizing a non-owning aliasing shared_ptr (dresses a borrow as ownership and churns every consumer for a distinction none of them reads); a variant of span and owner (forces visitation at each read site, and the owner is a lifetime anchor rather than state a reader branches on); pruning the dead paths at pack time (a row can route into one, and the contributions must still sum to the prediction).
112. Benchmark data is drawn in fixed blocks, and the recipe is numbered (adopted)#
Decision. bonsai.bench.synth.gen_data draws its rows in N_BLOCKS fixed contiguous blocks, one spawned SeedSequence stream each, over a thread pool; a stream of its own carries the whole-matrix draws (the informative-feature choice, and the sigma the noise is scaled by). The block count is a constant in the module, never a core count, so the same cell produces the same bytes on a 27-core pod and a 128-core one; the worker count is sized from runlog.cpu_quota() and never reaches the output. Both properties are tests, not comments. DATA_RECIPE is 2, every emitted row carries it, and it is part of the BONSAI_BENCH_DATA_CACHE key.
Why re-anchor rather than parallelize bit-exactly. PCG64 exposes advance, so workers could jump to their block offsets and reproduce recipe 1 byte for byte. That version would hard-code how many raw draws numpy consumes per generated element, which is exactly the thing NEP 19 reserves the right to change: RandomState is frozen, Generator streams may move across feature releases. The archive's byte-identity already holds only within a numpy version, which is why every row records libs.numpy. A numbered recipe with a deliberate, recorded break is more honest than an implicit dependency that a routine numpy bump can shift underneath the goldens.
Measured (M2, 8 cores, interleaved arms, min of 3): 1M x 100 recipe 1 0.34s against recipe 2 0.08s (4.1x), 2M x 128 0.77s against 0.16s (4.7x). The block fill scales near-linearly because numpy's Generator releases the GIL in its bulk fill path and each block owns its own bit generator, so the per-generator lock is never contended: measured 1.86x at 2 threads, 5.57x at 8, flattening at 16 where the fill is memory-bandwidth-bound. What this buys is not the seconds: at the extreme cell the old recipe spent roughly 30 to 45 minutes of a 48-minute sweep drawing random numbers on one core, and a shorter sweep is a smaller window for a pod to die mid-run, which has cost a session once already.
Consequence. Recipe-1 and recipe-2 rows are not comparable and the protocol says so where the data is described. The registry does not gate on this: plane_digest covers src/, include/, and scripts/model_hash.py, so a recipe change staleness-flags nothing, and the discipline that keeps a results directory honest is landing the change with a full refresh rather than between refreshes. scripts/model_hash.py's frozen linear variant is untouched by design; the wire-identity gate is unaffected and 55c6fe308852d9bb is unmoved.
Rejected. Bit-exact parallelism via advance (couples the goldens to numpy's per-element draw count, above); deriving the block count from the host's cores (a 27-core pod and a 128-core pod would then generate different data for one cell, which is strictly worse than generating serially); processes instead of threads (the extreme cell's matrix is 64GiB and would have to cross a pickle boundary, and the GIL is already released where the time goes); blocking the train and test ranges separately to make the train rows independent of n_test (the old recipe did not have that property either, since y.std() spans both, and nothing reads it).
113. The refresh is re-anchored on one card and one draw per cell (adopted)#
Decision. Three changes to the standings refresh, taken together because a full re-measure was already due and a comparability break is paid for once. The extreme axis moves to a single card. Its RAM floor was 320GB, sized to catboost's 196.3GB of ingest copies rather than to bonsai, which peaks at 66.7GB on the same 2^34-cell input; that floor forced a two-GPU draw at twice the rate. The floor is now 150GB, one 188GB card clears it, and catboost publishes an OOM beside xgboost's, which the protocol already treats as a result because capacity is a claim. The data cache is exported, and loads whole. It was refused entirely because it handed back memmaps, which fault pages inside fit() and so moved measured fit_s unequally across libraries, only some of which re-touch the raw arrays after ingest. A full read completes before worker() opens a timer, so the fit sees memory indistinguishable from freshly drawn arrays; a cell too large to hold twice declines to the generator, since the cache is an optimization and never a reason to run out of memory. The pod waits are bounded. measure polls for the DONE marker under a per-axis deadline and a consecutive-unreachable limit, and the create ladder is walked to a deadline with backoff instead of twice.
Why now. Every axis was stale after decision 111, so the release refresh re-measures all nine whatever else changes. Landing the recipe re-anchor (decision 112), the extreme axis's host of record, and the cache in the same sweep costs one break in comparability instead of three, and each of them alone would otherwise have had to wait for a refresh someone was already paying for.
Consequence. Rows before this refresh and after are not comparable, which was already true of the recipe change and is now true for one more reason on the extreme axis: its host of record is a 188GB single-card container rather than a 351GB two-card one, and catboost's row there changes from a finish to an OOM. The published extreme table keeps a throughput ratio, since lightgbm's 116.2GB still fits, so the axis reads as bonsai against a survivor plus two arms that cannot run rather than as bonsai alone. Cost falls roughly in half on that axis, and the per-worker regeneration the cache removes was the sweep's largest untimed cost after decision 112 halved it: on gpu-tall, twelve draws become one.
Rejected. Sizing the extreme cell to bonsai's own ceiling so every competitor OOMs (about 1.6 to 2.2x the current rows before host generation binds, and it costs the ratio: one number and three OOMs is a weaker table than a measured 7.2x against a survivor, and a cell chosen so competitors fail invites the objection that it was); keeping the 320GB floor and accepting the two-GPU rate (it buys nothing bonsai needs); a memmap-mode cache with a correction factor (the distortion is unequal across libraries, so no single factor exists).
114. The architecture directory is dissolved; claims are routed and linted (adopted)#
Decision. docs/architecture/ (23 files, 3,264 lines) is deleted. A five-way audit measured it 76% cuttable, found four docs asserting the opposite of the shipped code (a storage design recorded as rejected that shipped as BinColumns; a 230-line deliberation over a four-axis dispatch that shipped as three; an API sketch with zero matching symbols; stale "not here" lists naming shipped features), and mapped 19 claims restated across 94 sites. Content now routes by the table in docs/STYLE.md "Where things live": conventions to CLAUDE.md, single-file constraints to comments at the definition site, cross-file contracts to docs/invariants.md under a docs-check lint that fails when a cited path or symbol stops resolving, rationale here, pedagogy to guide/ and learn/. This supersedes the "design rationale lives in docs/architecture/, told once" convention.
Consequence. The two homes that stay must be kept honest by machine: invariants.md by the resolution lint, this log by append-only banners (this entry adds four). Historical citations of architecture docs resolve via links pinned to the last commit carrying the directory. The docs corpus drops by roughly a third; the failure mode where a normal PR strands three or more restatements of one claim now fails docs-check instead of waiting for a reader.
Rejected. Moving architecture content into docstrings: no pipeline renders docstrings to the site, so the move would hide the content, and the comment convention is constraint statements, not essays. Consolidating into this log: entries 26 and 27 were stale in lockstep with the docs they ratified, so the archive is a record, not a maintenance surface. Keeping the directory with a staleness lint: the lint would have flagged most of the directory, which is the same verdict as deletion with extra machinery.
115. Levelwise honours monotone constraints by projecting its leaves (adopted)#
Decision. The levelwise (oblivious) grower no longer rejects monotone_constraints. Enforcement is a weighted isotonic projection of the finished leaf table (src/monotone.cpp, project_monotone), not a veto during growth: the tree's structure is exactly what the unconstrained search would have chosen, and only the values at the bottom move. A levelwise leaf index is the bit vector of level outcomes, so constrained levels induce a partial order over leaves and free levels cut them into independent groups; pool-adjacent-violators along a linear extension of each group, weighted by the leaves' hessians, is the nearest table satisfying every constraint. Hessians are the right weights because weighted isotonic regression on the Newton step is the constrained minimiser of the same second-order objective the splits were scored under. Interaction constraints stay rejected: they constrain which features may share a path rather than how leaf values are ordered, and no projection expresses that.
Consequence. The guarantee is exact rather than approximate. Monotone functions are closed under addition and positive scaling and a boosted model is init + lr * sum(trees) with lr > 0, so per-tree projection makes the ensemble monotone with a worst violation of 0.0, measured on all three growers. Both planes get it for no kernel work, because the leaf table is built on the host in the CUDA path too and only then uploaded, so the projection lands before finalize_leaves. Unconstrained fits are byte-identical: scripts/model_hash.py holds at 55c6fe308852d9bb. Priced against each grower's own unconstrained baseline at 200 rounds, lr 0.05, depth 6: California Housing with +1 on MedInc costs depthwise 1.73% RMSE (corroborating decision 35's recorded ~2% for the veto scheme) and levelwise 3.38%; a synthetic whose truth really is monotone costs depthwise 1.90% and levelwise -0.06%; a deliberately misspecified constraint whose truth runs the other way costs 518% and 546%. Projection is free when the constraint matches the data and costs a little more than the veto when it fights it, which is the trade the two mechanisms make in opposite directions: the veto declines splits, the projection moves values.
Two limits are stated rather than hidden. With two or more constrained features the leaves form a partial order and the projection runs along one linear extension, so every constraint holds but the result is not the L2-nearest monotone table; a single constrained feature is exact. CatBoost's SymmetricTree path accepts the same approximation. And leaf renewal (MAE, Huber, Quantile) overwrites leaf values after the grower returns, so levelwise projects a second time over the renewed table with row counts as weights. Measuring that turned up a pre-existing defect: the node-splitting growers have no second pass and do violate under those objectives today, tracked as issue #442.
Rejected. Rejecting the renewing objectives outright instead of projecting twice: the rejection would have to live in the booster, which is where the second projection lives anyway, so it costs the same and delivers less. Porting the projection to depthwise and leafwise: their leaves are an irregular partition with no lattice to project onto, which is the same reason CatBoost cannot offer the feature on their non-symmetric policies. Expressing the old rejection as a compile-time typelist filter, proposed by the retired dispatch doc: the rejection was never a property of the grower, only an unexamined gap, and decision 35 recorded the behaviour without a reason.
116. Monotone dispatch stays a value, not a type (declined by measurement)#
Decision. monotone_constraints is checked at runtime, not dispatched on at compile time. No MonotoneObliviousGrower beside ObliviousGrower, and no monotone axis in the registry's typelist product.
Measured ceiling. The question is whether a templated grower could delete the guarded block in update_best_for_feature_for_node (src/split.cpp), which sits in the innermost split loop and runs roughly 32k times per node at 64 features and 255 bins. Patching mc to a compile-time zero hands the optimizer exactly what a <false> specialization would, so the resulting delta is the most any compile-time dispatch could ever buy. Same-host interleaved, 1M x 64, 100 rounds, 8 threads: depthwise 4.835s with the branch against 4.850s without it (-0.30%, inside its own 0.81% and 1.36% spreads), leafwise 6.164s both ways (+0.00%). The ceiling is zero. The branch is loop-invariant and perfectly predicted, which is the branch predictor doing for free what a template would buy at twice the binary. Levelwise never had a hot-path check at all: its projection gate runs once per tree, measured at +0.02% of train_s on an L40S.
Consequence. The registry stays at 7 objectives x 6 growers x 3 samplers, 126 booster instantiations; a monotone axis would double it to 252, doubling template compile time and the booster share of a 9.6MB CLI and 4.9MB extension, for a measured zero. The rule this case establishes, against sampler_traits as the contrast: compile-time dispatch pays when the property belongs to the TYPE, since AllRowsSampler reads no gradients under any configuration and the compiler can know it. A monotone direction belongs to the DATA, so the projection from a per-feature vector to a boolean has to happen at runtime whatever the grower's type is; a type parameter moves that check earlier and duplicates everything downstream rather than removing it. The registry is also keyed by name (dispatch.grower_name), and a monotone axis has no name to dispatch on.
Rejected alternatives. Reading the disassembly to decide whether clang unswitches the loop: that answers a proxy, where forcing the constant answers the design question directly and stays valid whichever way the unswitching goes. Templating the split finder alone on a bool Monotone, one axis on one small type rather than a grower axis on the cartesian product: still the correct shape if the branch ever costs anything, and recorded here as the reopening condition, but nothing to buy at the measured ceiling.
What would reopen this. A profile showing the monotone guard above the noise floor on a real workload, or a future constraint whose per-candidate work is more than one predicted branch.
117. +inf is a very large number, not a missing value (adopted)#
Decision. BinMapper::transform bins +inf into the FLT_MAX top band, so NaN and only NaN bins as missing. This completes decision 74 rather than reversing it: 74 added the FLT_MAX closer to remove a train/predict routing skew, where a leaked row trained down the learned default_left branch but predicted right of every threshold by raw comparison, and it closed that skew for every finite value. +inf was the residual case, because it compares equal to the sentinel cut and lower_bound therefore returned the missing bin while the raw walk still routed it right. 74's title claim, that the missing bin is NaN-only on every path, is true only now.
The divergence, reproduced. One model, one row, two answers: predict on a raw numpy array returned 0.884 for a +inf feature (routing right, as inf > threshold), and the same row through a prebinned Dataset returned -0.505, bit-identical to what NaN returns. The prebinned path is a documented performance escape hatch, so a user who took the advice silently got different predictions. The binned-walk-bit-identical-to-raw-walk invariant asserted this could not happen; its probe generator skipped the closer and the sentinel, on the reasoning that one ulp above FLT_MAX is infinity and no fitted domain contains it. The probe now covers both, which is what makes the invariant pin its own claim.
Consequence. A feature value of +inf now trains and predicts as a very large number everywhere, which is the arithmetic every other path already assumed. Models change only where training data contained +inf, so the canonical hashes are unmoved (55c6fe308852d9bb). -inf was never affected: it sorts below the first cut, bins to 0, and routes left on both paths. The clamp is one std::min against the top band and costs nothing measurable on a path already dominated by the lower_bound.
Rejected alternatives. Making the raw walk treat +inf as missing instead, so both paths agree the other way: it makes infinity and unknown the same claim about a feature, which is false, and it would have required the raw walk to test for non-finite values on the hot path. Refusing non-finite features at the boundary: strictly more disruptive to callers whose pipelines emit infinities from a divide or an overflow, and it answers a question about semantics with an error message.
118. A config file states a key as strongly as --set does (adopted)#
Decision. config::stated_keys collects the dotted keys an invocation names from both sources, the TOML file and the --set overrides, and the warm-start reconciliation treats them identically. Writing quantile_alpha = 0.5 in a config file against a model fit at 0.9 now refuses, exactly as --set objective.quantile_alpha=0.5 already did.
Why it was split. The reconciliation distinguishes a value the user chose from one that is merely sitting at its default, because the default triple is indistinguishable from silence by value alone. It learned which keys were chosen from the --set list, which carries key spellings, while a parsed TOML had already been flattened into a Config where a stated default and an unset field look the same. The result was invisible: the same value, in the same invocation, refused through one channel and silently inherited the model's through the other.
Precedence is unchanged. resolve still applies the file first and the overrides on top, last write wins, and stated_keys collects key names only, never values. A file saying 0.5 with --set saying 0.9 resolves to 0.9 and passes against a 0.9 model; the reverse resolves to 0.5 and refuses. The reconciliation compares the already-resolved config, so the two mechanisms never contend.
Rejected alternatives. Leaving the split as a documented asymmetry, on the reasoning that a file is a weaker statement of intent than a flag: nothing else in the config layer makes that distinction, and a user cannot see it. Threading explicitness through resolve itself by returning both the config and its stated keys: a wider signature on the one function every entry point calls, to serve the single caller that needs the extra return.
119. Predict walks are packs, and each tree family gets its own loop shape (adopted)#
Decision. Batch predict no longer walks one tree at a time over the ensemble. Each tree family packs its trees once per booster epoch into a walk object (DenseWalk for depthwise and leafwise, ObliviousWalk for oblivious) and the pack chooses the loop shape its cost model wants. The contracts, bit-identity with the per-tree walk and the epoch-keyed staleness rule, live above the two classes in include/bonsai/tree.hpp; this entry holds the measurements and the shapes that lost.
Dense trees: lockstep groups, not loop inversion. A dense tree's cost is the chain of data-dependent node loads, not the loop shape, so inverting the ensemble loop to rows-outer alone buys nothing: 2231 vs 2206 ns/row on M2 (1 thread, 64 cols, depth 8, 100 trees). The lever is walking eight trees per row in lockstep so the core always has independent load chains in flight, which took the same cell from 2206 to 1004 ns/row at batch against xgboost inplace_predict at 1015. Leaves point to themselves and a leaf's threshold slot holds its value, so a walk padded to its group's deepest tree self-loops harmlessly and the sum reads the node the walk ends on. The padding tax is bounded by the group's deepest member, and groups bound their own depth, so leafwise's ragged best-first trees tax only their own group.
Oblivious trees: rows outer, 64-row blocks transposed. Every tree's level splits pack contiguous and every leaf table concatenates, so the walk runs rows-outer in one parallel section over cache-resident arrays instead of opening a parallel region per tree. Full 64-row blocks are flipped into feature-major scratch once, so each level step is one broadcast compare over 64 contiguous floats, which vectorizes at baseline SIMD widths with no gathers; the sub-block tail walks scalar. Row-wise blocking is the one vectorization the bit-identity contract permits, because each row's accumulator remains its own tree-order fold. Measured at 1 thread on the same cell: single-row 1053 to 610 ns on M2; the blocked batch walk reaches 181 ns/row on M2 and 179 on EPYC 9654, from 505 and 874 scalar, against catboost's same-pod 784. The two hosts converging says the block walk is memory bound, not ISA bound.
Rejected alternatives. A scalar baked-constant code generator, probed at 293 ns/row: row blocking beats that ceiling along the dimension the probe did not price, and the tree stays free of a code generator. An isnan test in the walk: the two comparison forms v > t and !(v <= t) agree on every non-NaN value and disagree exactly on NaN, so default_left selects the form and the test disappears (the header guards the IEEE assumption with a preprocessor check against -ffinite-math-only). Rows-outer inversion for dense trees, refuted above.
Reopener. A host where the blocked oblivious walk stops converging across ISAs, which would mean it has become ISA bound and a wider block or an explicit SIMD path is worth pricing; or a code generator that also blocks rows, which would need to beat 181 on the same pod.
120. A row view hands its ids to the device walks, and the eval plane adopts the device plane (adopted)#
Decision. The scoring side of a Dataset row view goes to the device the way the training side already did. cuda_predict, cuda_pred_contribs and the resident eval walk take a std::span<row_id_t const> of view ids (empty meaning every plane row), the kernels read bins at the mapped plane row and write at the view position, and the two identity checks that sent a non-identity view to the host walks (ValidationScorer::arm_device, Model::device_ready) are gone. The staged map has one home, RowMap in src/cuda/detail/device_buffer.cuh, a nullable device pointer over the plane the way RowIndex is a nullable index over the host, and the three kernels share mapped_row. Separately, eval_begin adopts a validation plane that already lives on the device through matching_plane instead of retiling it through bin_at, and retiles only the view's rows when it cannot.
Measurement. Same-pod L40S, min of three interleaved reps, 4M x 64 train (device-resident), one 2M holdout binned against it, 100 rounds at depth 6, buckets from BONSAI_FIT_PROFILE and BONSAI_CUDA_PROFILE:
| build | holdout arrangement | fit | eval-route | eval-loss | eval-arm | predict 1M |
|---|---|---|---|---|---|---|
| main | two Datasets | 1.00s | 0.02s | 0.00s | 0.12s | 0.00s |
| main | one Dataset, subset(rows=) views |
1.78s | 0.67s | 0.24s | 0.00s | 0.58s |
| main | views with columns=slice(None) |
1.00s | 0.02s | 0.00s | 0.12s | 0.00s |
| this change | two Datasets | 0.89s | 0.02s | 0.00s | 0.00s | 0.00s |
| this change | one Dataset, subset(rows=) views |
0.89s | 0.02s | 0.00s | 0.01s | 0.00s |
| this change | views with columns=slice(None) |
0.88s | 0.02s | 0.00s | 0.00s | 0.00s |
The view arm's eval-route and eval-loss were the per-round host walk and host loss; its predict was the parent plane pulled home to mint the row-major mirror. All three vanish. The eval-arm 0.12s on the other two arms was the host retile of a plane already on the device, and adoption removes it from every CUDA fit with a device-resident eval set, which is the 11% the arms that were never slow gained. Predictions through a view, a copied Dataset and the raw array are bit-equal (max abs diff 0.0 over 1M rows); SHAP through the view differs from the copy by 1.4e-5, the per-path atomic accumulation order the SHAP kernel has between any two calls. Every run of this change printed cuda eval plane armed: ... adopted=1 and a cuda-predict: line with rows under plane on the view arm; no main view run printed either.
Rejected alternative. A range-offset row map for contiguous views, which would skip the ids upload for a slice. The upload does not show in the profile at 1M view rows (upload=0.000s on every cuda-predict: line above), so a second map form would be a concept without a measurement in which the plain form loses. Reopener: upload= becoming a visible share of cuda-predict: or cuda-shap: at some larger view, which would price the offset form against the ids.
Lifetime. The adopted plane is held by the eval seam until the next eval_begin or the context is torn down, the same lifetime the own tiled copy had, with one copy less on the device.
121. A renewed leaf is clamped into the fence the grower left for it (adopted)#
Decision. The depthwise and leafwise growers carry each leaf's monotone fence out of grow() in GrowResult::leaf_bounds, indexed by node id, and the booster's renewal clamps every renewed value into it before writing the leaf. The levelwise grower returns no fence and keeps the leaf-table reprojection of decision 111. The invariant renewal-keeps-monotone pins both node-splitting growers for MAE, Huber and Quantile on an eight-row case where the Newton leaves are ordered and the renewed ones are not.
Why a clamp is exact. Growth leaves every leaf in a left subtree with hi at most the split's midpoint and every leaf in the right subtree with lo at least that midpoint, for each constrained split on the path, so any assignment of leaf values inside their fences is monotone. Each renewing objective minimises a convex one-dimensional loss over its residuals (absolute, Huber, pinball), and the minimiser of a convex function restricted to an interval is its unconstrained minimiser clamped into that interval. The clamp is therefore the fenced optimum, not an approximation of it.
Rejected alternatives. Recomputing the fence in the booster from the finished tree, which would copy the arithmetic of propagate_monotone_bounds into a second home and, under row sampling, run it over row sums the grower never saw. Storing the fence on DenseTree beside split_gains and covers, which are serialized, so a per-round datum would move the model format. Reprojecting dense leaves by pool-adjacent-violators over the leaf partial order, the levelwise tool, which solves a problem the fence already solves and would change values the fence does not need to touch.
Vocabulary. LeafBounds adds bounds to the public vocabulary (vocabulary_singletons 146 to 147). It is the word SplitInput's contract already uses for lo and hi; the nearest existing words name other things, Range a run of row positions and interval a logging cadence. Reopener: a second lo/hi pair type above the engine seam, at which point the two share this name.
122. The release A/B is anchored to one fixed wheel and a moved verdict needs a citing decision (adopted)#
Decision. Every standings refresh fits three arms at the tall cell of each plane, interleaved on the pod that measures the plane: the previous release wheel, one fixed anchor wheel (1.15.0), and the commit under refresh. The statistic is the min over repeats. HEAD is read inside 5% of the previous release and inside 2% of the anchor. The rows are committed as ab-<plane>-<date>.jsonl, registered with the plane's tall axis so they supersede with it, rendered as the release drift section of the perf page, and gated: make docs-check refuses a moved cell until a decision entry tagged Standings: <axis> cites the file. The tagged entry is the one decision 103's gate already holds against the axis's as_of_decision, so one entry carries the explanation and the bump.
Why an anchor. The 2.1.0 refresh read a 1 to 2% loss on cpu-tall inside a band that is 5% wide, and a same-host Mac A/B could not resolve it. A two-arm A/B compares each release only with the last, so a loss under the band passes every time and the bands compound: 1.5% a release is 35% over twenty. Against a fixed wheel the comparison is cumulative, and the same drift shows by the second release. The 2% anchor band is the size the 2.1.0 session's min-over-reps spread on the gpu plane supports; the cpu plane's spread was wider than its band at 2 repeats, which is why cpu-tall takes 4.
Why a gate and not a warning. The driver already printed the verdict, and the 2.1.0 refresh shipped its moved cells on a reading in the PR body that the PR body alone recorded. A verdict recomputed from the committed rows by check_standings.py, in the lowest module so the driver, the renderer and the gate read one answer, cannot be read differently by the next refresh, and a citation in a Standings: entry is the form the standings already use to say why a number changed.
Rejected alternatives. A moving anchor (the release before last), which compounds at half the rate and hides the same drift over forty releases. Failing the refresh on a moved verdict, which would block a deliberate trade (a slower fit for a faster predict) that the decision entry exists to record. Keeping the A/B file out of the tree and gating on the PR body, which is what made the 2.1.0 reading unrepeatable. Reopener: the anchor wheel no longer installs on the pod image (a Python or CUDA floor moves past it), at which point the anchor advances to the oldest wheel that does and the band is re-derived from that session's spread.
123. The core tree stays array-of-structs; the structure-of-arrays probe is declined (adopted)#
Decision. DenseTree::Node keeps its array-of-structs layout and no structure-of-arrays probe is run. The question came from the TreeSHAP paper, whose tree is six parallel vectors, and asked whether that layout would simplify split and grow.
Why. The paper's vectors and Node carry the same information grouped differently, and the tree already keeps covers_ and split_gains_ as parallel vectors beside the node array (include/bonsai/tree.hpp). Where an access pattern rewards structure-of-arrays the code already has it: the histogram grad and hess arrays on the hot path, the whole CUDA plane, and the oblivious per-level arrays. What reads as elaborateness in split and grow is orchestration (frontier transactions, buffer recycling, the histogram lifecycle, dispatch), and a layout change removes none of those responsibilities; it converts struct cohesion into index discipline across arrays tied together by convention. CPU predict is a single-row branchy traversal, where array-of-structs keeps a node in one cache line and the alternative scatters it across five. The node layout is frozen into the model format, so a change ripples through serialization, SHAP, the CLI, and the fixtures. The 2026-08-27 core design review reached the same verdict for HistCell: the fill and the scan touch both fields, so splitting them buys nothing.
Rejected alternative. The one-afternoon probe the issue pre-registered: a structure-of-arrays DenseTree behind the unchanged interface, measured on core LOC, mean cyclomatic complexity, and single-thread predict throughput, with the prediction "LOC flat, CCN flat, predict a few percent slower". Declined because no measured split, grow, or predict cost has ever been attributed to node layout, so the probe would price a rewrite against a prediction no evidence contradicts. Reopener: a profile bucket attributes fill, split, or predict time to node-field gathers, at which point the probe runs as the issue wrote it, against the ledger baselines of that day.
124. Device histogram cells are int64 fixed point, so a device fit is bit-reproducible (adopted)#
Status 2026-09-05: the CPU-finder move to double totals named under "Why fixed point" is declined in decision 125; the host finder keeps float node totals.
Status 2026-09-05: measured on an RTX PRO 6000 Blackwell (sm_120, driver 595.91), main before the change and after it interleaved on one pod, min over three reps. The two-word shared add lowers to native ATOMS.ADD there as on Ada (36 ATOMS.CAST.SPIN before, 72 ATOMS.ADD after), so the reopener is not tripped. Tall 16M x 128: depthwise 4.870 s to 4.282 (-12.1%), leafwise 7.336 to 6.614 (-9.8%), levelwise 4.837 to 4.294 (-11.2%), the populate bucket -25 to -28%. Wide 131072 x 16384: depthwise 28.214 to 27.442 (-2.7%), levelwise 30.237 to 30.687 (+1.5%), leafwise 87.678 to 89.500 (+2.1%). The wide cells spend 22 to 84 s of the fit in find, and the finder's added cost is the per-bin int64 to double dequantise (I2F.F64 count 1 to 5 in find_kernel, 0 to 4 in level_find_kernel) on a part whose fp64 pipe runs at 1/64 of fp32 rate; the fill is faster there too. Every rep agreed in sign at under 0.5% spread; the before arm printed up to three r2 per wide cell, the after arm one. Three cuda_depthwise fits hashed e1a5391a, the L40S value, which is an observation and not a contract. The 2.2.0 refresh prices the wide cells against the anchored band; the lever if they trip it is fp32 gain math from the int64 prefix split into 32-bit halves, which changes the device model and is priced as its own decision.
Decision. The three CUDA fill kernels accumulate gradient and hessian in int64 cells rather than float. Once per tree and per component the fill reads M = max|g| * n_rows with a warp-reduced fabsf and one atomicMax on the float bit pattern (non-negative floats order as unsigned integers and max is order-free, so the reduction is exact), and derives one power-of-two scale 2^e with e = min(61 - ilogb(M), 126); each visit adds __float2ll_rn(v * 2^e). Any subset of the tree's rows sums to under 2^62 + n/2, so every partial, prefix and sibling difference fits int64 in any order, and the readers dequantise the prefix sums once, by one multiply, before the gain math. The contract flips from "tolerance-equal, never bit-exact" to cuda-training-bit-reproducible: three fits of one dataset serialize to identical bytes on the depthwise, oblivious and leafwise planes, with the device objective and with the host objective forced. Not claimed: cross-device or cross-toolkit identity (the gradient kernels use device transcendentals and compile with contraction on), and host-vs-device identity, which stays at 1e-4 because the host accumulates float cells.
Why fixed point. A cell is the exact integer sum of the node's quantised rows, so the chunk count (which follows sm_count), block scheduling, atomic landing order and plane choice all give the same integer. The per-row error is one rounding at max|g| * n / 2^62, which at 16M rows is 2^-38 max|g|; the float shared stage it replaces rounded every add at the running partial's ulp. Parity error is now dominated by the host's own float HistCell, so the 1e-4 host-vs-device bound stays and the leafwise flake at 1.06e-4 (one run in five, the tail of the old spread) can only shrink. The new plane test (65536 rows, min_data_in_leaf = 4) then failed at 2.4e-4 on main as well as on the fixed-point cells, and the cause was a second float on the device path: node totals crossed the host as float HistCell and were re-uploaded as the parent totals the find kernels subtract a left prefix from, so each right-child edge re-read a total rounded one level up. Totals now travel as a double NodeTotals; the CPU finder still reads float totals from its own cells, so CPU model bytes are unchanged, and moving it to double is a separate change because it moves the hash. The tile plane's shared footprint doubles (8 * stride int64, 32640 bytes at 255 bins where the float tile took 16320), so its ceiling moves from 768 to 384 bins, above which a feature takes the per-feature plane; that plane holds one int64 replica where it held two float replicas, the same bytes, so the 4096-bin case still fits the 48 KiB static budget.
Measurement. One L40S, main and branch interleaved on the same pod, the 16M x 128 ledger cells at 255 bins, depth 8, 100 trees, min over three reps (two for the 511-bin cell); seconds, hist is root_hist + adv_hist from cuda-round-decomp. The first form, a native 64-bit shared atomicAdd, missed the pre-registered bar (fit +13 to +17%, hist +26 to +30%): the SASS showed it lowered to ATOMS.CAST.SPIN.64, a compare-and-swap loop, where a 32-bit integer add is one native ATOMS.ADD. Two levers took it: the shared stage adds each cell as two 32-bit atomics with the carry taken from the returned low word (root fill 1.89 s to 0.68 s), and the tile block grows to 512 threads so three 32 KiB blocks keep 1536 threads resident (0.68 s to 0.60 s). The branch then beats main on every cell:
| cell | arm | fit | train | root_hist | adv_hist | hist | r2 |
|---|---|---|---|---|---|---|---|
| depthwise | main | 9.379 | 8.163 | 1.09 | 3.88 | 4.97 | 0.8793, 0.88 |
| depthwise | branch | 8.597 | 7.411 | 0.60 | 3.62 | 4.22 | 0.8797 x3 |
| leafwise | main | 13.020 | 11.729 | 0.88 | |||
| leafwise | branch | 12.034 | 10.569 | 0.8797 x3 | |||
| levelwise | main | 8.704 | 7.481 | 1.09 | 3.23 | 4.32 | 0.877 |
| levelwise | branch | 7.953 | 6.760 | 0.60 | 2.99 | 3.59 | 0.877 x3 |
| depthwise 511 bins | main | 11.710 | 10.184 | 1.35 | 5.05 | 6.40 | 0.8796 |
| depthwise 511 bins | branch | 10.754 | 9.376 | 0.86 | 4.74 | 5.60 | 0.8796 x2 |
Fit total -7.6 to -8.6%, hist -12 to -17%. Main's r2 moved between reps on the depthwise cell (0.8793 and 0.88); the branch printed one r2 per cell on every rep. Three cuda_depthwise fits hashed 17d29e48, 982c3d37, 525539e2 on main and e1a5391a three times on the branch, with the [cuda] suites at 350305 assertions passed. The engagement line fixed-point scale_g=2^{e} appeared in every branch run and in no main run.
Rejected alternatives. Widening the parity bound, which absorbs the tail of a distribution the test was written to bound. int32 shared cells with a second scale: chunks reach 2^18 rows, so a shared-only int32 scale leaves 12 bits of per-row resolution against float's 24, plus a requantisation at the merge. A deterministic reduction library (decision 40 declined cub, and it fixes reduction order, not scatter associativity). A native 64-bit shared atomicAdd as the shipped form: it was the first form and lost to the CAS loop above, so the two-word add stays as long as the SASS shows ATOMS.ADD for it. Two levers were left unpriced because the bar was cleared before them: a width-4 tile instantiation for stride > 512 and k_fill_blocks_per_sm 4 to 3. Reopener: a device where a 32-bit shared integer add is not one native instruction, or a cell where the fill loses to the float tile at the same shared bytes, at which point the two unpriced levers run first.
125. The CPU finder keeps float node totals; the double-totals move is declined (adopted)#
Status 2026-11-09: "the right side is that node's own total minus its own prefix" held per node, not per feature: the total came from the lowest selected feature's cells and the prefix from each feature's own, and float cells summed over a long same-sign run disagree across features by hundreds. The finder reads each feature's own totals since decision 169; the double-totals move stays declined.
Decision. Histogram::totals() keeps returning a float HistCell, cell_totals keeps handing the split finder a float pair, and the CPU model hash stays at 55c6fe308852d9bb. Decision 124 named the move to double as a separate change because it moves the hash; it was priced on 2026-09-05 and does not pay.
Why. The device bug that decision 124's NodeTotals fixed was a chain: the device planes derive each right child as the parent total minus the left prefix, so one float rounding at the root reached a four-row leaf 2.4e-4 off. The host finder has no such chain. Each node's total is summed in double from that node's own histogram and rounded to float once, the scan accumulates left_grad in double, and the right side is that node's own total minus its own prefix, so the only float in the node math is one rounding of the node's own total, a relative 6e-8 in its score. A laptop probe made the total double end to end (a totals_exact() sibling on Histogram, SplitInput::totals() reading it, NodeTotals through cell_totals and both finder entry points) and compared predictions against main on two CPU cells, depthwise, 255 bins, 8 threads, 200k held-out rows:
| cell | main r2 | double totals r2 | rows whose prediction moved | max abs move |
|---|---|---|---|---|
| 500k x 100, depth 8, 20 trees | 0.9409917 | 0.9409934 | 31325 of 200000 | 3.3 |
| 2M x 64, depth 12, 100 trees | 0.9881329 | 0.9881342 | 56550 of 200000 | 3.8 |
The shape of the delta is the verdict: a mean move near 1e-4 with a maximum over 3 means a handful of near-tie splits changed rank and rerouted their subtrees, which any ulp-level change to a gain does, and the r2 movement (1.3e-6 and 1.7e-6) sits two orders of magnitude under the 0.001 chance band the quality work treats as threshold-placement luck. The move would spend the hash gate that every PR relies on, and rewire a few dozen splits per model, to buy precision the float histogram cells do not carry.
Rejected alternative. Shipping the move anyway for type consistency, so that one NodeTotals flows through both finders. Consistency at the seam is already there: SplitInput::totals() returns NodeTotals on both planes, and the float narrowing is one function, cell_totals, at the host finder's entry. Reopener: a host-plane cell where a float node total is shown to reach a leaf, which needs the host to adopt a parent-minus-left chain, or a host-vs-device parity failure attributed to the host total rather than to the host's float cells.
126. Twenty-seven levers on the wide CUDA cell: block-parallel small fill and reduce, a blocked mapper-fit gather, fill-targeted slot zeroing, the sibling subtraction fused into the finder, a level finder that sweeps cuts instead of nodes, a mapper fit that sorts its gathered block in place, finders that spend fewer fp64-pipe ops per cut, an fp32 interval screen ahead of the node finder's fp64 scores, a prefetched cut chunk, a screen that divides and converts on the fp32 pipe, a node finder that derives the large sibling in its own sweep, and a screen that reduces on the certified bound, compares in fp32, takes its node constants from the host and its inverse scale from the quantiser, a node finder that prefetches its strip into L2 ahead of its sweep, a tile fill whose shared histogram spreads each bin over all 32 banks, a tile sixteen features wide filled by 1024 threads, a partition whose warps own contiguous rows and rank by ballot, leafwise row segments that keep their buffer side, one partition kernel with a decoupled look-back, a count plane for the unit-hessian tile fill, the small child's fill queued behind the leaf partition with its segment chosen on device, and the leaf round's arguments riding the launch with its best split delivered by event; the wide fit drops 63 to 90% and the tall train 22 to 31%, and the same screen over the level finder, the approximate divide, two cuts per lane, the occupancy bounds, 64-bit shared atomics, the wide tile without its launch bound, a root bulk zero of the leafwise pool and a 16-byte slot zero are refuted (adopted)#
Decision. Twenty-seven behaviour-preserving changes, one commit each, the seventh replacing the sixth's code, the eighth widening the third's, the fourteenth taking the fifth's derivation into the finder's sweep, the fifteenth through eighteenth cutting what the node finder's screen still spent on the fp64 pipe and per block, the nineteenth issuing the strip's L2 prefetch ahead of the sweep, the twentieth laying the tile fill's shared histogram out as word planes, the twenty-first widening that tile to sixteen features under a 1024-thread launch bound, the twenty-second giving each partition warp 512 contiguous rows and folding the segmented scan into the scatter, the twenty-third letting a leafwise split read its parent's rows from whichever buffer holds them and leave the children where it scattered them, the twenty-fourth replacing the partition's route count and scatter with one kernel whose blocks claim tiles in scheduling order and read their prefix from the tiles before them, the twenty-fifth filling the hessian plane with a row count when the resident objective is unweighted MSE, the twenty-sixth queueing the small child's fill behind the leaf partition, its segment written by the partition's last tile and its row count read through mapped memory after an event, and the twenty-seventh passing the leaf round's partition op and finder nodes as kernel parameters and delivering the leaf's best split through mapped memory after an event. partition_kernel's last tile writes the small child's segment, the fewer rows of left and right with their offset and the fresh slot the host chose before the launch, into a three-word device record (SmallChildDev); when the popped leaf's children lie below max_depth, leaf_split enqueues that slot's zero and its fill (leaf_enqueue_fill) behind the partition, records an event (StreamFence) and waits on it with the left count read from mapped pinned memory (MappedBuffer) instead of a blocking copy, so leaf_build is a no-op for that round and the stream no longer drains between the partition and the fill; hist_tile_kernel takes the direct-global branch fill_direct for a node under 512 rows, the fill hist_small_kernel runs, so the small-node choice moves on device with the segment. partition_kernel and find_kernel are templates on an accessor type: the level path passes pointer-form accessors over its device tables (PartOpTable, FindNodesRef), the leaf path passes value-form accessors built on the host stack (PartOpValue, LeafFindNodes) that the launch copies into the kernel's parameter space, so the five pinned uploads a leaf round staged before its partition and finder could launch (the op, the sums and bounds, the screens, the slots, the sibling derivation) are gone; LeafFindNodes selects between its two nodes with a compare rather than a dynamic index, which keeps the parameters in constant memory. The second find_kernel instantiation cost sweep_strip its single caller: LLVM outlined it and its NodeCut and ScreenNode arguments crossed a 256-byte local frame, 91 STL per kernel on sm_87 against 6, so the finder chain from screen_node down is forced inline and each instantiation is one 22k-line body with 6 to 9 STL, the shape of the single finder it replaces. The leaf's reduce_kernel writes its best split into mapped pinned memory (MappedBuffer, which also carries the left count) and the host waits on an event for it instead of a synchronous cudaMemcpy into a pageable vector. hist_small_kernel fills each node under 512 rows over the tile kernel's block geometry, one block per (feature tile, node), instead of one block per node. reduce_kernel picks the best of the per-feature candidates with a two-stage block reduction ordered by first_max_better (larger gain, then smaller feature slot on an exact tie) instead of one thread walking the row. BinMappers::fit gathers eight adjacent columns per row pass with the row sixteen ahead prefetched, instead of walking each column down the row-major matrix alone. zero_slots_kernel zeroes only the histogram slots a fill will land in (the small slot of each level triple, the fresh slot of a leafwise split) where the level advance zeroed every child slot and the leafwise root zeroed the whole pool; the large slot is never read before it is derived. The two subtract kernels are gone: each find block writes the large strip it is about to read, parent minus small, before its scan, from a per-node SiblingDerive table the level plane stages with its triples and the leaf plane resolves from the pending pair leaf_build records; advance_level therefore leaves a level complete only once the find that always follows has run on it. A level too narrow to hide that work (fewer than k_derive_blocks_per_sm find blocks per SM, 4) derives with a warp-per-strip kernel ahead of the finder instead. level_find_kernel runs 256 threads per feature with a thread per cut: for each node the block reads the strip's 256 consecutive cells in one coalesced sweep, forms the per-cut prefix with a warp shuffle-up scan plus cross-warp totals (LevelPrefixTotals, double buffered by node parity, one barrier per node), scores its cut, and keeps the per-cut sum over nodes in registers, with the per-node scalars staged 256 nodes at a time into shared memory; one warp per feature with a lane per node had walked every cut serially, each deep-level load touching 32 node strips 2 * stride cells apart. The fp64 sum over nodes visits them in bit-reversed order within each batch of 32 and folds them by ShuffleTreeSum, a binary-counter merge of five partials that adds the same pairs in the same order the old shfl_down tree did, inactive nodes contributing +0.0 as the idle lanes did. The mapper fit gathers 32 columns per row pass into one block whose column streams sit rows + 32 floats apart, drops a NaN with an unconditional store and a conditional advance, and hands each column to BinMapper::from_sample as a span it sorts in place; the radix sort takes all four byte histograms from its key transform pass and skips a scatter whose byte every key shares, and the run lengths are written as run ends with no branch, where the third lever's gather had pushed eight columns into growing vectors that from_sample took by value and sorted with a count pass per byte. The finders spend fewer fp64-pipe ops per cut, every one bit-identical to the old arithmetic: split_sums_dev selects between pg and pg + miss instead of adding a selected 0.0 to every sum (x + 0.0 == x for every x but -0.0, and no gradient or hessian sum reaching it is -0.0: the cells are integers times a positive scale, real - p with equal operands rounds to +0.0, and the root accumulator starts at +0.0); cut_score<k_l1> specialises lambda_l1 == 0, the default and the ledger setting, so the two-compare soft threshold becomes an integer-pipe NaN test that keeps the NaN-to-zero semantics, dispatched once per launch in the find_kernel and level_find_kernel wrappers so no launch site changes; ShuffleTreeSum::push walks the binary counter with an early return instead of five predicated adds (31 DADDs per 32 pushes where there were 160); level_pass_sums adds the tree total only on the lane that holds it and guards the second direction on n_dirs, so a feature with no missing bin skips that direction's two divides. bounded_leaf_weight is untouched, since a leaf value keeps the sign of its zero. find_node bounds every (cut, direction) score in fp32 before it scores it in fp64: directed-rounding intrinsics (__fadd_rd, __fmul_ru, __fdiv_rd and their partners) on the sums, the squares and the quotients give an interval that contains the exact fp64 score, the warp keeps a running certified lower bound l_star, and a cut whose upper bound falls below l_star, or whose child hessian surely misses min_child_hess, never reaches the fp64 pipe; the survivors are compacted per lane with a ballot and a shuffle so the fp64 scoring sees a dense list. The screen is a proof and not a heuristic, since an interval that contains the exact value can only drop a cut that cannot win, and it disarms itself (everything survives) when a node sum is not finite, when float(inv) is inexact, or under BONSAI_CUDA_FINDER_EXHAUSTIVE=1, which the test uses as its oracle; a mutated screen that drops at 2 * l_star fails all six sections. sweep_cuts loads each lane's cut as one 16-byte longlong2 (a strip is (g, h) pairs, so every cut pair sits on a 16-byte boundary, pinned by a static_assert on the pair width) and issues the load for the next chunk before it scans the current one, so the load's latency overlaps the two shuffle scans instead of heading them. The screen's directed quotients come from a plain fp32 division bracketed by one float step in each direction (the operands are non-negative and the round-to-nearest quotient lies within half an ulp of the true value, so the next float up and down bracket it, infinity returned as is and the zero quotient floored at zero), and its int64 cells reach fp32 as a signed high int32 and an unsigned low uint32 recombined by one directed fma (hi * 2^32 is exact in fp32 for any int32, so the fma's single rounding is the only one and the bound keeps its side); __launch_bounds__(32, 16) pins find_kernel at 128 registers. The finder dispatches the sibling blocks of one feature adjacently (find_grid is 2 * n_sel by ceil(n_nodes / 2), node = 2 * blockIdx.y + (blockIdx.x & 1), the root's odd block returning), and the large sibling's block forms parent minus small per longlong2 chunk in registers during its sweep, storing the difference only where a later reader exists (always in leafwise, whose slot outlives the find, and in depthwise only while a next level derives from it, tracked by a depth counter on the level pipeline), with the store test a template argument so the sweep loop carries no runtime branch; the bins past the sweep and the strips of nodes that do not sweep are derived by a plain strided loop, and the separate derive pass of the fifth lever is gone from the node finders (the level finder keeps derive_level_strips). warp_max_nonnegative folds the warp's certified lower bound with one REDUX.MAX.U32 on the float bit pattern (a non-negative float orders as its unsigned bits, and the bound is floored at zero) instead of a five-step shuffle tree. screen_node widens each node's thresholds once into a directed fp32 Interval (the score to beat, min_child_hess, min_gain, each end rounded outward) and screen_cut compares in fp32 against the conservative end, certifying against the rounded-up threshold and dropping against the rounded-down one, so a cut in the ulp between the two ends falls through to the exact path; that replaces six F2F.F64.F32 and six DSETP per cut per direction. The per-node screen constants come from the host: a NodeScreen per node (score, and the outward-rounded fp32 brackets of the score and the node sums) is filled where the node sums are already staged, a ScreenConst of the four config brackets rides as a kernel argument, and the device keeps only the brackets that depend on the histogram; the host score is the CPU finder's score(g, h, l1, l2), bit-identical to the device cut_score. Winning splits compare by their int64 bit pattern (split_better, key_of_positive_gain), since a gain is stored only when positive and __double_as_longlong is order-preserving there. GhQuant carries the fp32 inverse scale beside the double (inv_f, written once per tree by gh_quant_kernel), because SASS showed the compiler rematerialising float(inv) as two F2F.F32.F64 per 32-cut chunk inside the sweep. find_node issues prefetch.global.L2 over the whole (node, feature) strip right after it opens it, before the miss load and the sweep: each lane prefetches one 128-byte line, so one warp instruction covers 4 KB and a loop covers longer strides, for the cells and the small strip alike, and the sweep's chunk loads then hit L2 in place of a chain of eight DRAM misses per block. hist_tile_kernel keeps its shared histogram as four planes of 32 words per 32-bin group (gradient low and high word, hessian low and high word) in place of adjacent int64 cells, so the 32-bit atomics of bin b hit bank b mod 32 where they hit bank 4b mod 32 before, eight bins to a bank; the plane offsets are constants the compiler folds into the atomic's address immediate, so one base pointer per feature stays live, the tile is padded to a multiple of 64 cells per feature (tile_stride), and the merge reassembles each cell from its two words before the global add, so the global slots keep their layout. hist_tile_kernel<16> visits sixteen features per row from one 16-byte strip load, so each row's strip load, gradient load and two quantise ops serve twice the features; its 64 KiB shared tile is one block per 100 KiB SM, and that block runs 1024 threads under __launch_bounds__(k_tile_fill_threads), which holds the kernel at 64 registers with no spills where the 72 it takes unbounded cannot launch 1024 threads at all; launch_hist admits the tile against the device's opt-in shared limit, which init_shared_limit raises for the tile kernel with the attribute call the per-feature kernel already had. route_count_kernel gives each warp 512 consecutive rows with lane l on row j * 32 + l (part_lane, part_row), loads the sixteen row ids into registers before any bin gather so the sixteen gathers are in flight together, stores the flag bytes coalesced, sums the flags by warp shuffle (warp_sum_u32) and reduces the eight warp sums through shared once (warp_prefix_in_block), so a block writes one count where each thread had walked sixteen consecutive rows and every warp instruction touched 32 sectors; scatter_kernel derives its segment's prefix and total from the op's block counts in-block (segment_lefts), takes a ballot per row group, ranks each lane by __popc under its lane mask, and writes rows and gradients coalesced to lefts + rank or total + (i - here), so the segmented scan kernel and its launch are gone and the scatter writes n_left itself. The leafwise plane keeps a side bit per histogram slot (slot_in_b): a split reads the parent's rows and gradients from the buffer its slot names and scatters both children into the other, both children take the flipped side, leaf_build fills from the small slot's side, and leaf_stamp stamps each side's slots in its own launch, so the two device-to-device copies per split that moved each child's segment back to the front buffer are gone with their stream serialisation. Integer histogram cells commute (decision 124), a fixed-point difference is the same bytes wherever it is taken, the tie order is the serial walk's, each column's sample keeps its row order and its sort is a total order on the same floats, the untouched slots were dead bytes, and the streamed tree sum is the shuffle tree's pairs in the shuffle tree's order, each finder cut is the same double as before, the screen only removes cuts the exact score would have rejected, a fixed-point difference formed in a register is the bytes the derive pass wrote, the halves recombine to a bound on the same side, the warp maximum of non-negative floats is the same float by either reduction, an outward-rounded fp32 threshold admits every cut the fp64 compare admitted, the host score is the device score's bytes, an int64 compare of positive doubles is their fp64 order, a power-of-two inverse is exact in fp32, a prefetch moves no byte into a register, a cell reassembled from two words is the same integer wherever those words sit, a wider tile adds the same rows' integers into the same slots, a partition that ranks by ballot keeps each side's rows ascending as the scan did, a segment holds the same rows in the same order on either side, the one-pass partition reverses the right side's rows but nothing reads a segment's order (the fill adds integers per row, the finder reads histograms, the stamp is per row), the count plane multiplies by the hessian quantum, a power of two, and the queued fill adds the same rows into the same fresh slot (the device picks the child with fewer rows as the host did, an event wait and a mapped read deliver the count the copy did), the kernel parameters carry the values the uploads carried and the mapped best split is the record the copy returned, so the histogram bytes are those of the general path; the model hashes are unchanged: CPU 55c6fe308852d9bb, device e1a5391a7beea349 (depthwise), d4d1539061bd3d36 (leafwise), 56c3d85ec0e37094 (levelwise), each equal between arms on the RTX PRO 6000 and on sm_87.
Why. Decision 124's Blackwell status banner left the wide cell (131072 x 16384) at -2.7 to +2.1% with the finder named as the suspect. A per-kernel decomposition (nsys, one RTX PRO 6000 pod, used to price the levers and not quoted as a delta) found two serial kernels ahead of it: the single-block small fill at 18.8 ms per launch (405 launches, 7.6 s of a 27.4 s depthwise fit; 6817 launches, 44.4 s of the 88 s leafwise fit) and the single-thread reduce at 3.6 ms per launch (840 launches, 3.0 s depthwise; 12386 launches, 27.0 s leafwise). One SM, or one thread, did work the whole device waited on. With those gone the fit's own profile put the next two in the ingest and the memsets: ingest_fit (the host mapper fit, 5.9 s of every wide fit, dbin a further 0.55 s) and the level memset at 1.00 s, streaming 134 MB per op over 12700 ops, which is 1.7 TB in 1.00 s, the GDDR7 roofline, so only traffic reduction could move it.
The same-pod A/B, RTX PRO 6000 Blackwell Server Edition, driver 595.91, three arms interleaved (before be39d55, the two kernel levers at a834923, and the mapper gather at 688c925), min over three reps, r2_test equal per plane in all arms; train is fit minus ingest:
| cell | plane | fit before | fit kernels | fit gather | train before | train kernels | train gather | ingest before | ingest gather |
|---|---|---|---|---|---|---|---|---|---|
| 16M x 128 | depthwise | 4.397 s | 4.394 s (-0.1%) | 4.378 s (-0.4%) | 3.657 s | 3.661 s | 3.658 s | 0.739 s | 0.713 s |
| 16M x 128 | leafwise | 6.685 s | 6.547 s (-2.1%) | 6.479 s (-3.1%) | 5.958 s | 5.798 s | 5.753 s | 0.728 s | 0.722 s |
| 16M x 128 | levelwise | 4.435 s | 4.423 s (-0.3%) | 4.373 s (-1.4%) | 3.674 s | 3.681 s | 3.684 s | 0.749 s | 0.680 s |
| 131k x 16384 | depthwise | 26.510 s | 17.649 s (-33.4%) | 14.092 s (-46.8%) | 20.880 s | 11.708 s | 11.708 s | 5.631 s | 2.367 s |
| 131k x 16384 | leafwise | 88.189 s | 20.920 s (-76.3%) | 17.418 s (-80.2%) | 82.012 s | 14.995 s | 14.961 s | 6.103 s | 2.412 s |
| 131k x 16384 | levelwise | 30.265 s | 21.659 s (-28.4%) | 18.149 s (-40.0%) | 24.417 s | 15.726 s | 15.716 s | 5.847 s | 2.431 s |
The split says which lever did what: the kernel levers moved train alone (wide depthwise 20.88 to 11.71 s, ingest 5.63 to 5.92 s, the difference rep noise) and the gather moved ingest alone (5.92 to 2.37 s, train 11.708 s in both arms to the millisecond). The tall rows sit inside the 2% band on train throughout (leafwise -3.4% is the small fill, which that plane launches per split); the tall ingest is 0.7 s on every arm because the sampled mapper fit was already cheap there.
The slot zeroing ran as its own two-arm session on the same pod, 688c925 against 688c925 plus the zeroing, min over two interleaved reps, wide cell only (the tall cell's slot is 0.5 MB and its memset is under the profile's resolution): train depthwise 11.711 to 11.200 s (-4.4%), leafwise 15.077 to 13.973 s (-7.3%), levelwise 15.714 to 15.165 s (-3.5%); ingest inside rep noise (2.30 to 2.42, 2.39 to 2.45, 2.38 to 2.38 s). The priced saving was half the 1.00 s level memset for the two level growers and most of the leafwise per-tree pool memset (256 slots of 67 MB, 17 GB, against about 123 fresh slots actually filled); measured 0.51, 0.55 and 1.10 s. Composed across the two sessions, the wide fit sat at about 13.6 s depthwise (-49%), 16.4 s leafwise (-81%) and 17.5 s levelwise (-42%) against the before arm.
The fused subtraction ran as two further sessions on the same pod type. The first, the four-lever arm (af16942) against it plus the fusion, min over three wide and two tall reps: wide train depthwise 11.575 to 10.054 s (-13.1%), leafwise 14.410 to 13.414 s (-6.9%), levelwise 15.809 to 14.635 s (-7.4%), priced at the subtract's 1.65, 1.39 and 1.79 s; the depthwise finder bucket moved +0.05 s while its wait moved -1.57 s, so the derivation hides under the fp64-bound scan almost entirely, where leafwise and levelwise show +0.4 and +0.5 s of visible kernel time against -1.4 and -1.7 s of wait. The tall cell read depthwise -0.3%, leafwise 0.0% and levelwise +2.0% (3.719 to 3.836 s): level_find_kernel runs one warp per selected feature, so 128 warps on a 188-SM part derived every large strip of a level serially by node. The second session added the narrow-level policy as a third arm, min over two reps of each cell: tall levelwise 3.724 / 3.800 / 3.735 s (before / fused / policy, +0.3% at the end), wide levelwise 15.534 / 14.378 / 14.373 s (-7.5%), the other four rows unchanged between the last two arms (tall depthwise 3.698 / 3.687 / 3.689, leafwise 5.920 / 5.928 / 5.928; wide depthwise 11.432 / 9.895 / 9.893, leafwise 14.280 / 13.256 / 13.297). Both branches of the policy are hash-gated: the 100-feature hash cell takes the pre-kernel on Blackwell (threshold 752 warps) and the fused path on the 8-SM Jetson (threshold 32). Composed, the wide fit sits at about 12.1 s depthwise (-54%), 15.5 s leafwise (-82%) and 16.3 s levelwise (-46%) against the before arm.
The finder lanes ran as a sixth session, be22344 against it plus the remap, min over two interleaved reps, r2_test equal per plane: wide levelwise train 14.414 to 13.272 s (-7.9%), tall levelwise 3.685 to 3.563 s (-3.3%), the four other rows inside +0.6%; the whole delta sits in the device bucket (11.36 to 10.24 s) with ingest unmoved. The lever was priced from lane-iterations, 3048 to 2025 per feature per tree on the depth-8 wide cell (the five levels with n <= 16 were 1275 of them, most idle), which would have been a third of the finder; it returned a tenth, because the count treats a deep level's iteration as a shallow one's when a deep level's load touches 32 node strips where a shallow level's touches one. Composed, the wide fit sits at about 12.1 s depthwise (-54%), 15.5 s leafwise (-82%) and 15.2 s levelwise (-50%).
The cut sweep ran as a seventh session, 5ab8363 against it plus the rewrite, min over two interleaved reps, r2_test equal per plane: wide levelwise train 13.266 to 12.139 s (-8.5%), tall levelwise 3.571 to 3.267 s (-8.5%), the four other rows inside +0.2%; grow_find carries the whole delta (-1.12 s and -0.31 s) with every other bucket flat. The rewrite removes the sixth lever's lane remap along with the serial walk it was patching, since a block that owns cuts has no idle lanes at any level; the sixth session stays in the record as the measurement that priced the deep levels. The kernel's fp64 scratch buffer (level_score, one double per node per cut) goes with it, since the sum lives in registers and only the per-feature best is written. Kernel resources on sm_87 read 128 registers, no stack, 11200 bytes of shared memory. The first build lost the candidate's feature index on lane 0 of the winning warp, whose in-warp reduce shuffles only gain, bin, direction and validity, and split on feature 0 with feature 2's bin; the Jetson parity suite caught it at the fifth level of a 4096-row scenario, and the fix initialises every thread's candidate with its block's feature. Composed, the wide fit sits at about 11.9 s depthwise (-55%), 15.3 s leafwise (-83%) and 14.5 s levelwise (-52%); train 20.9 to 9.7 s, 82.0 to 13.0 s and 24.4 to 12.1 s.
The in-place mapper fit ran as an eighth session, 988f2e6 against it plus the rewrite, min over two interleaved reps, r2_test equal per plane: wide ingest 2.317 to 1.865 s depthwise (-19.5%), 2.363 to 1.815 s leafwise (-23.2%), 2.414 to 1.836 s levelwise (-23.9%), with ingest_fit 1.89 to 2.08 s per rep before and 1.38 to 1.49 s after on every plane and dbin unmoved at 0.55 s; wide train inside -0.9% and the tall rows inside the 2% band on fit, train and ingest. The wide fit reads 12.211 to 11.590, 15.592 to 14.996 and 14.717 to 14.020 s. The lever was priced on the M2 at -43% of the mapper fit (0.91 to 0.61 s per Dataset at 32768 x 16384, 8 threads) and returned -30% on the pod's 16 vCPU host, whose caches differ and whose normal data takes no uniform-byte skip. Composed, the wide fit sits at about 11.6 s depthwise (-56%), 15.0 s leafwise (-83%) and 14.0 s levelwise (-54%); ingest 5.6 to 1.8 s on every plane.
The finder op cuts ran as a ninth session, 0725c04 against it plus the cuts, min over two interleaved reps, r2_test equal per plane: wide fit 11.149 to 10.283 s depthwise (-7.8%), 14.843 to 13.765 s leafwise (-7.3%), 13.748 to 10.835 s levelwise (-21.2%); wide train 9.670 to 8.751, 13.286 to 12.058 and 12.194 to 9.264 s; the tall rows inside the 2% band on fit, train and ingest, and the wide ingest (host code the lever does not touch) spread 1.48 to 1.73 s across reps in both arms. The lever was priced from static op counts at -1, -1 and -2 s and returned -0.9, -1.1 and -2.9 s: GB202 runs fp64 at 1/64 rate, so on the wide cell the finders are bound on that pipe, and the level finder, which scores every cut of every node per pass, carried the most of it. The SASS on sm_87 for the lambda_l1 == 0 instantiation against the old kernel reads DADD 43 to 29 and DSETP 49 to 39 in level_find_kernel, DADD 41 to 29 and DSETP 47 to 43 in find_kernel, with no local memory in either and 128 and 90 registers as before. Composed through nine levers, the wide fit sits at about 10.3 s depthwise (-61%), 13.8 s leafwise (-84%) and 10.8 s levelwise (-64%).
The interval screen ran as a tenth session, 6593222 against it plus the screen, min over two interleaved reps, r2_test equal per plane: wide fit 10.564 to 9.036 s depthwise (-14.5%), 13.714 to 11.943 s leafwise (-12.9%), 11.226 to 11.124 s levelwise (-0.9%, that plane's finder untouched and the delta inside the ingest's rep spread); wide train 8.735 to 7.229, 11.762 to 10.086 and 9.254 to 9.250 s; find_kern 5.27 to 3.76 s on the depthwise plane and the leafwise cuda_gpu bucket 7.86 to 6.28 s, every other bucket flat; the tall rows within 0.4% on train. Device hashes hold with and without the toggle on Blackwell and on sm_87 (on a Python module relinked for the gate: the earlier Jetson gates rebuilt the test binary and not the module, so their suite evidence stands and their hash lines do not); the sm_87 SASS carries the rounding-mode variants, no local memory, and find_kernel grows from 90 to 124 registers. The lever was priced at -4 s on find_kern from the fp64 op count and returned -1.5 s; this entry first read the shortfall as a byte floor (the finder issues about 42 GB of strip reads per tree, 2.6 s at the memset's roofline), and the fourteenth session below refutes that reading: at a 64 MB node histogram the 128 MB L2 absorbs the finder's re-reads, so the kernel is bound by latency at 16 warps per SM and the shortfall was the screen's own instructions, which the twelfth and thirteenth levers cut. The fill's gpu_wait (2.87 s) sits at about 45% of its own byte floor (9.6 GB of bins and 8.5 GB of strips per tree), so that bucket is bound on its int64 shared atomics and not on bytes. Composed through ten levers, the wide fit sits at about 9.0 s depthwise (-66%), 11.9 s leafwise (-86%) and 11.1 s levelwise (-63%). Composed through fourteen levers, the wide fit sits at about 8.6 s depthwise (-68%), 11.2 s leafwise (-87%) and 11.1 s levelwise (-63%); train 20.9 to 6.7 s, 82.0 to 9.2 s and 24.4 to 9.3 s.
The prefetch ran as an eleventh session, 544f691 against it plus the prefetch, min over two interleaved reps: wide depthwise find_kern 3.76 to 3.69 s (-1.9%, every changed rep under every base rep), train 7.218 to 7.146 s; wide leafwise train 10.116 to 10.039 s, cuda_gpu flat; the tall rows flat. find_kernel reads 124 to 131 registers on sm_87 with no local memory and 128 with no stack on sm_120. The session also priced the finder's occupancy: find_kernel at 128 registers runs 16 warps per SM, and a dummy dynamic shared allocation that caps it at 11 and at 7 warps (the probe prints find_kernel occupancy N warps/SM) reads 4.19 and 5.84 s on the same cell, so each resident warp is worth about 0.1 s of the finder and the kernel is latency-bound, not byte-bound.
The fp32-pipe division ran as a twelfth session. On sm_120 clang lowers __fdiv_ru and __fdiv_rd to a 116-instruction software subroutine (CALL.REL.NOINC, looped, the slow-path FCHK inside), four calls per cut per lane, where a plain fp32 division is an inline MUFU.RCP plus FFMA chain. The inline division costs two registers, and find_kernel at 130 rounds to 136 per lane, 15 warps per SM instead of 16; measured alone that step cost more than the subroutine saved (wide depthwise find_kern 3.69 to 3.85 s, +4.3%). With __launch_bounds__(32, 16) pinning 128 registers and 16 warps the lever pays: find_kern 3.69 to 3.63 s, depthwise train 7.15 to 7.09 s, leafwise train 10.06 to 9.91 s, tall flat; sm_87 also compiles to 128.
The 32-bit conversion ran as a thirteenth session, on top of the twelfth. interval_of took each int64 prefix cell to fp32 with the directed 64-bit conversions, four per cut per lane, and on sm_120 I2F.S64 runs on the same 1/64-rate pipe as fp64 arithmetic. Same pod, interleaved, two reps each: wide depthwise find_kern 3.63 to 3.25 s (-10.5%), depthwise train 7.09 to 6.71 s, leafwise train 9.91 to 9.40 s, leafwise cuda_gpu 6.00 to 5.65 s; tall flat. The SASS reads I2F.S64.RM/RP gone from find_kernel with I2F.RM/RP and I2F.U32.RM/RP in their place, 128 registers held on sm_120 and sm_87.
The paired finder ran as a fourteenth session, 74298db against it plus the pairing, min over two interleaved reps: wide depthwise find_kern 3.25 to 3.19 s, train 6.71 to 6.65 s; wide leafwise train 9.44 to 9.18 s (-2.7%), cuda_gpu 5.6 to 5.35 s; tall flat on both planes. It was priced from bytes at about 1.3 s (the derive pass's write and read-back plus the last level's 4 GB of writes per tree) and returned 0.06 s on the depthwise finder, which is the refutation of the byte floor: the node histogram is 64 MB against a 128 MB L2, so the write-then-read-back and the small strip's second read were already L2 hits, and the only DRAM traffic the lever removes is the last level's write. A variant that carried the store decision as a runtime pointer test inside the sweep loop measured the same (3.20 s) with 72 bytes of stack per thread; the template form spills 48 on sm_120 and 8 on sm_87 at 128 registers, where the base spilled none, because the derived sweep carries three strip pointers and two prefetched chunks under the register cap.
The certified-bound reduce ran as a fifteenth session, 140428a against it plus the reduce, min over two interleaved reps, every changed rep faster than its interleaved base rep, r2_test equal per plane: wide depthwise find_kern 3.28 to 3.20 s, train 6.789 to 6.686 s (-2.4% / -1.5%); wide leafwise cuda_gpu 5.44 to 5.39 s, train 9.367 vs 9.397 s; tall flat (1.16 = 1.16 s, 3.658 vs 3.640 s). It was priced at -10 to -25% from the shuffle count and returned -2.4%.
The fp32 thresholds ran as a sixteenth session, c3e7118 against it plus the thresholds, min over three interleaved reps, every changed rep faster than every base rep: wide depthwise find_kern 3.20 to 2.03 s, train 6.683 to 5.500 s (-36.6% / -17.7%); wide leafwise cuda_gpu 5.49 to 4.06 s, train 9.363 to 7.999 s (-26.0% / -14.6%); tall flat on one rep. SASS on sm_120: F2F.F64.F32 50 to 14 in the module, DSETP 359 to 323, find_kernel STACK 48 to 16 bytes at 128 registers. That corrects the fourteenth session's reading of the spill: the fp64 threshold compares held the registers, not the strip pointers.
The host-staged screen ran as a seventeenth session, 927dd4d against it plus the staging, min over three interleaved reps, every changed rep faster than every base rep on the four wide metrics: wide depthwise find_kern 2.03 to 1.84 s, train 5.502 to 5.321 s (-9.4% / -3.3%); wide leafwise cuda_gpu 4.09 to 3.84 s, train 8.048 to 7.812 s (-6.1% / -2.9%); tall 3.625 vs 3.638 s. The int64 key compare measured alone was flat (2.01 vs 2.03 s) and stays because the measured arm carries it and it removes 84 DSETP. SASS: F2F 54 to 20, DSETP 323 to 237, STACK 16 to 24.
The fp64-pipe throughput model those three levers were priced on (16 SM-cycles per warp fp64 instruction on sm_120, a removed per-cut instruction worth its count times the cut count) predicted the fifteenth and sixteenth within 10% and priced the seventeenth at -20% for a -9.4% return: a per-block prologue overlaps with the other resident warps, where a per-cut instruction sits on every warp's chain. A counting probe on the seventeenth arm (a direct worker run of the wide depthwise cell) read 385.7M sweeps, 393.8M flushes (1.02 per block), 2.06G survivors (5.3 per block, 2.1% of the cuts) and 3.086G chunk directions; the exhaustive finder reads 5.65 to 5.68 s against 1.89 to 1.95 s screened, so a warp flush costs about 610 SM-cycles, about 38 fp64 instructions, and the exact path is about a quarter of the finder.
SASS of that arm's chunk loop (788 instructions on sm_120) carries 230 NOPs, all but four in the exact path as runs of four WAIT15 stalls behind each dependent DFMA, DMUL, DADD or DSETP: fp64 dependent-op latency written out by the scheduler. The screened path is 342 instructions with four NOPs, about 0.3 instructions per scheduler-cycle at the measured 230 to 300 SM-cycles per chunk, so the finder is neither issue-bound nor fp64-bound; it is bound by each warp's latency chain at 16 warps per SM. The same dump showed float(inv) rematerialised per chunk as two F2F.F32.F64 from uniform registers, which the eighteenth lever removes.
The fp32 inverse ran as an eighteenth session, four arms interleaved over three wide reps and one tall rep, f4c8c54 against it plus the inverse and against two occupancy arms, every changed rep faster than every base rep on depthwise find_kern and train and on leafwise train: wide depthwise find_kern 1.84 to 1.77 s, train 5.316 to 5.246 s (-3.8% / -1.3%); wide leafwise cuda_gpu 3.84 vs 3.82 s, train 7.848 to 7.738 s (-1.4%); tall 3.611 vs 3.631 s. SASS: F2F 20 to 4 in find_kernel, STACK 24 to 40.
The L2 prefetch ran as a nineteenth session on the same pod type, four arms interleaved over three wide reps and one tall rep: aec2e9e (the eighteenth lever), it plus the L2 prefetch, it plus a two-deep register prefetch, and both. Min over reps: wide depthwise find_kern 1.77 to 1.60 s (-9.6%), train 5.238 to 5.087 s (-2.9%), fit 6.876 to 6.800 s; wide leafwise cuda_gpu 3.70 to 3.53 s (-4.6%), train 7.533 to 7.440 s (-1.2%), fit 9.318 to 9.246 s; tall depthwise train 3.615 vs 3.611 s and leafwise 5.695 vs 5.713 s. Every wide rep of the prefetch arm beats every base rep on depthwise find_kern (1.60, 1.60, 1.62 against 1.77, 1.77, 1.80 s), depthwise train (5.087 to 5.104 against 5.238 to 5.287 s) and leafwise cuda_gpu (3.53 to 3.68 against 3.70 to 3.87 s); leafwise train separates on the min only (one prefetch rep at 7.579 s sits above the base's 7.533 s). r2_test reads 0.8597 on every record, and all 24 device hashes are equal across the four arms in both finder modes. SASS: four CCTL.PF2 in find_kernel, 128 registers and 40 bytes of stack unchanged, STL 26 to 22. The gain is the per-block DRAM chain the sweep serialised: eight chunks per strip, each load a DRAM miss the sweep waited on before issuing the next, and the prefetch turns that into one miss and seven L2 hits, which is what a finder bound on each warp's latency chain at 16 warps per SM should return. The prefetch arm's bench processes took about 9 s longer in wall clock than the other three arms in every rep, all of it before the first timed record (process start, data load, the untimed micro-fit), while its timed fit, predict and ingest read equal or better and the arm carrying the same lever plus the register form showed no such gap; it is read as a per-directory artefact of the pod, not the code, and is recorded because it was not explained.
The word planes ran as a twentieth and a twenty-first session on the same pod type. The first, cf468ec against it plus runtime-addressed planes (four plane bases per feature computed from stride / 2) and against it plus 64-bit shared atomics on the same planes, three wide and two tall reps interleaved: the runtime form read wide depthwise train 5.072 to 4.967 s (-2.1%), gpu_wait 2.87 to 2.81 s, wide leafwise train 7.475 to 7.341 s and tall depthwise 3.608 to 3.553 s, every changed rep under every base rep on depthwise train, but its SASS read 94 registers against 36 (the compiler hoists 8 features x 4 plane pointers), one 512-thread block per SM in place of three, so the bank win was capped by the lost residency. An nsys pass on that pod put the wide depthwise kernel time at hist_tile_kernel 2.04 s (39%, 828 launches at 2.47 ms), find_kernel 1.64 s (31%), hist_small_kernel 0.82 s (16%), zero_slots_kernel 0.52 s (10%) and bin_rows 0.14 s, and the tall depthwise time at hist_tile_kernel 2.10 s (60%), the scatter 0.57 s and the route count 0.55 s; the gpu_wait bucket (2.87 s) is the two fills (2.04 + 0.82 s) to the hundredth, so the parts explain the whole, and the tile fill reads its 2 GB of bins per level at about 0.87 TB/s on a 1.6 TB/s part. The second session, cf468ec against the runtime form and against the grouped form (32-bin groups of four 32-word planes, constant plane offsets), three wide and two tall reps interleaved, every grouped rep under every base and runtime rep on train in all four cells: wide depthwise train 5.073 to 4.854 s (-4.3%), fit 6.726 to 6.467 s; wide leafwise train 7.390 to 7.226 s (-2.2%), fit 8.971 to 8.850 s; tall depthwise train 3.608 to 3.318 s (-8.0%), fit 4.240 to 3.949 s; tall leafwise train 5.738 to 5.450 s (-5.0%), fit 6.344 to 6.073 s. grow_populate carries the whole delta (wide 0.54 to 0.32 s, tall 0.70 to 0.48 s) with find_kern and r2_test (0.8597 wide, 0.8797 tall) equal on every record, and the six device hashes are equal in both finder modes. SASS on sm_120: 66 ATOMS.ADD in hist_tile_kernel<8> as before, LDS 8 to 16 for the merge, 37 registers against 36, no stack; sm_87 reads 37 registers where the runtime form read 64.
The wide tile ran as a twenty-second and a twenty-third session on the same pod type, the tall cell (16M x 128) first. The first, 754c335 against it plus a 16-feature tile at 512 threads, plus the same at 1024 threads unbounded, and two bound arms (the atomics replaced by a per-thread register sink, and the atomics with their return discarded), three tall and two wide reps interleaved. The bound arms change the tree, so their timed rows are not evidence, but their nsys root fills are: with no atomics the 16M-row root fill reads 1.65 ms where the head reads 5.48 ms, so the strip loads and the quantise run near the byte floor and the shared atomics are about 70% of the fill. The 16-feature tile at 512 threads read tall depthwise train 3.333 to 3.099 s and hist_tile_kernel 1.83 to 1.44 s (829 launches, 2.20 to 1.74 ms), its 64 KiB shared tile one block per 100 KiB SM in place of three, so the per-row fixed cost (one strip load, one gradient load, two quantise ops per sixteen features instead of per eight) outweighed the lost residency; the unbounded 1024-thread arm failed every fill launch (72 registers x 1024 threads is more than the 65536-register block file, too many resources requested for launch). An nsys pass on that pod put the tall depthwise kernel time at hist_tile_kernel 1.83 s (57%), the scatter 0.58 s, the route count 0.55 s and the route add 0.10 s, and the tall leafwise at hist_tile_kernel 1.83 s (49%, 12672 launches at 144 us), the route count 0.75 s (26400 launches), the scatter 0.66 s and find_kernel 0.17 s, 3.73 s of kernels under a 4.53 s train: 0.8 s of the leafwise plane's 1.2 s over depthwise is launch gaps across about 132000 launches per 100 trees (two route counts, two scatters and two segmented scans per split), the rest more partition kernel time. The second session, 754c335 against the 512-thread tile, against a 768-thread tile (72 registers x 768 fits the file unbounded) and against a 1024-thread tile under __launch_bounds__(k_tile_fill_threads) (64 registers, no stack), three tall and two wide reps interleaved, every 768 and 1024 rep under every 512 rep and every 512 rep under every base rep on train in all four cells: tall depthwise train 3.319 to 3.088, 2.901 and 2.879 s (-13.3%), fit 3.939 to 3.497 s; tall leafwise train 4.523 to 4.394, 4.208 and 4.204 s (-7.1%), fit 5.165 to 4.831 s; wide depthwise train 4.901 to 4.667, 4.578 and 4.562 s (-6.9%), fit 6.297 to 5.972 s; wide leafwise train 6.154 to 5.857, 5.636 and 5.617 s (-8.7%), fit 7.553 to 7.020 s; the wide levelwise plane was not timed in these sessions. gpu_wait (the fills) carries it: tall depthwise 1.56 to 1.07, 0.99 and 0.98 s, wide depthwise 2.86 to 2.55, 2.50 and 2.50 s; nsys reads hist_tile_kernel 1.23 s on the bounded 1024-thread arm's tall depthwise (1.48 ms per launch, root fill 3.24 ms against the 1.65 ms no-atomics bound) and, on the 512-thread arm's wide depthwise, 1.83 to 1.55 s with hist_small_kernel<16> 0.83 to 0.88 s. The strip is now 16 bytes per row, two rows per 32-byte sector where there were four, and the partition kernels that gather one byte per row pay for it on every 16-wide arm alike: the tall route count 0.55 to 0.69 s, the route add 0.10 to 0.12 s, the gpu bucket 1.16 to 1.30 s on tall depthwise. find_kern and r2_test (0.8797 tall, 0.8597 wide) are equal on every record, and the six device hashes are equal in both finder modes on every arm. SASS on sm_120: hist_tile_kernel<16> 130 ATOMS.ADD, 32 LDS, no stack, 72 registers unbounded and 64 under the bound; sm_87 reads 62 under the bound, no stack.
The coalesced partition ran as a twenty-fourth session on the same pod type, ee4ae3e against it plus the partition, three tall and two wide reps interleaved, min per arm. Tall depthwise train 2.886 to 2.256 s (-21.8%), fit 3.506 to 2.885 s; tall leafwise train 4.185 to 3.506 s (-16.2%), fit 4.803 to 4.127 s; tall levelwise train 2.755 to 2.112 s (-23.3%), fit 3.378 to 2.737 s; wide depthwise train 4.497 to 4.534 s (+0.8%, inside the two-rep spread, the partition under 0.06 s at 131072 rows) and wide leafwise 5.584 to 5.524 s (-1.1%). The gpu bucket carries it (tall depthwise 1.30 to 0.66 s, leafwise 2.37 to 1.69 s, levelwise 1.39 to 0.75 s) with gpu_wait and find unmoved. nsys on the tall depthwise arm reads route_count_kernel 0.693 to 0.388 s (825 to 462 us over 840 launches), scatter_kernel 0.577 to 0.250 s (687 to 298 us), the segmented scan gone and hist_tile_kernel 1.229 s unmoved, 2.78 to 2.15 s of kernels; on the tall leafwise arm the route count 0.907 to 0.482 s and the scatter 0.663 to 0.435 s over 26400 launches each, the 26400 scan launches (0.042 s) gone, 3.42 to 2.72 s of kernels with hist_tile_kernel 1.34 s (49%) and find_kernel 0.166 s. The saving was priced at about 0.45 s from the sector count alone and measured 0.63 s on tall depthwise train, the rest being the sixteen loads in flight where the one-loop form serialised them behind the flag store it could not prove disjoint. r2_test (0.8797 tall, 0.877 tall levelwise, 0.8597 wide) is equal on every record and the six device hashes are equal in both finder modes on both arms. SASS on sm_120: route_count_kernel<uint8_t> 30 to 56 registers, 5 SHFL, 1 barrier where the old form had 9, scatter_kernel 40 to 64 registers, 16 VOTE, 31 POPC, 3 barriers where the old form had 17, no stack on either; sm_87 reads 48 and 64, no stack.
The leafwise buffer side ran as a twenty-fifth session on the same pod type, bac9715 against it plus the side, three reps interleaved on each leafwise cell, min per arm. Tall leafwise train 3.505 to 3.282 s (-6.4%), fit 4.052 to 3.843 s, the gpu bucket 1.69 to 1.51 s with gpu_wait 1.13 to 1.09 s; wide leafwise train 5.381 to 5.335 s (-0.9%), fit 6.693 to 6.639 s. nsys on the tall leafwise cell reads 52905 device-to-device copies of 3.3 us (0.177 s) on the base arm and 105 of 90 us (0.009 s) on the arm carrying the side, cudaMemcpyAsync 146100 to 93300 calls, the kernel sum 2.66 to 2.60 s with hist_tile_kernel 1.31 s (49%), route_count_kernel 0.48 s and scatter_kernel 0.42 s over 26400 launches each, find_kernel 0.16 s. The saving was priced at the copy time and measured 0.22 s, the difference being the copies' place in the stream between the scatter and the fill of the same slot. r2_test is equal on every record and the six device hashes are equal in both finder modes on both arms. The api sum names what the leafwise plane still spends: 41181 blocking cudaMemcpy of 50.6 us (2.08 s) and 13382 cudaDeviceSynchronize of 84.7 us (1.13 s) per 100 trees, one fetch per split for the child counts and one per find for the winner, which only a grow loop that takes several splits per fetch removes.
The one-pass partition ran as a twenty-seventh session on the same pod type, 51d0d42 against it and against it plus the count plane, three reps interleaved on each tall cell and two on each wide cell, min per arm, then two more sessions over the tile shape. The partition's two kernels were 0.890 s over 26400 launches each on the tall leafwise cell and 0.634 s over 840 on the depthwise, and every launch re-gathered the split feature's bins. A single kernel that claims a tile from a device counter, classifies, publishes an aggregate, walks the status words of the tiles before it 32 at a time until an inclusive entry, and scatters lefts up from the segment start and rights down from its end, is priced at the second gather and half the launches. At 16 rows per thread the rows, bins and ballot masks held across the look-back cost 107 registers on sm_120, two blocks per SM, and the tall train read 2.239 to 2.412 s depthwise (+7.7%), 3.944 to 3.840 s leafwise (-2.6%) and 2.110 to 2.244 s levelwise (+6.4%): the level partitions at 16M rows are bandwidth-bound and lost half their occupancy, the leaf partitions are launch-bound and gained. The count plane on top of that form took the tall train down a further 0.063 s depthwise, 0.079 s leafwise and 0.065 s levelwise, about 3% each, hist_tile_kernel 1.273 to 1.170 s leafwise and 1.212 to 1.135 s depthwise, and the later arms all carry it. Against 51d0d42 reading 2.240 / 3.984 / 2.106 s, __launch_bounds__(256, 4) gave 64 registers with 40 bytes of stack and 2.279 / 3.782 / 2.123 s, (256, 3) gave 80 registers and 2.292 / 3.753 / 2.135 s, and 8 rows per thread gave 64 registers with no stack and 2.249 / 3.542 / 2.102 s. Against 51d0d42 reading 2.245 / 4.004 / 2.115 s, 4 rows per thread gives 40 registers and 2.236 s (-0.4%), 3.499 s (-12.6%) and 2.108 s (-0.3%), partition_kernel 0.605 s leafwise against the 0.890 s of the two kernels and 0.715 s depthwise against 0.634 s, the kernel-time loss at the level partition paid back by the launches it no longer makes; 8 rows at a 512-thread block reads 2.230 / 3.578 / 2.088 s, the leafwise 0.08 s behind the 4-row form and the others inside the rep spread. The wide cells read 4.491 to 4.438 s depthwise and 6.337 to 6.164 s leafwise on the 8-row arm; the engagement line under BONSAI_CUDA_PROFILE ends in unit-hessian count plane on the arm that carries it and not on the others (the bench harness keeps the profile counters and drops the text lines, so the line was proven on a direct worker run). r2_test is equal on every record and the six device hashes are equal in both finder modes on every arm.
The queued fill ran as a thirtieth session on the same pod type, f7b4946 against it plus the queue, three reps interleaved on each tall cell and two on each wide cell, min per arm. Every leafwise expansion had drained the stream twice, leaf_split fetching the left count with a blocking copy and leaf_build waiting on its segment upload before the fill could launch, so the tall leafwise train spent about 1.3 s of 3.5 s idle with the partition bucket reading 1.11 s against 0.605 s of kernel. With the partition's last tile writing the small child's segment and the fill queued behind it, the tall leafwise train reads 3.021 to 2.758 s (-8.7%), fit 3.667 to 3.402 s, the gpu bucket 1.29 to 1.11 s, populate 0.48 to 0.41 s and partition 0.96 to 0.83 s; the wide leafwise train reads 5.390 to 5.134 s (-4.7%), populate 0.37 to 0.29 s and partition 0.48 to 0.33 s. The depthwise and levelwise trains never take the leaf path and read 2.275 to 2.273 s and 2.141 to 2.160 s tall and 4.496 to 4.529 s wide, inside their rep spread; the 16-feature tile kernel, which gained the sub-512-row branch, reads 63 registers on sm_120 against 62 and 64, and partition_kernel 40 against 40. The engagement line under BONSAI_CUDA_PROFILE ends in nl by event on the arm that carries it and not on the other (proven on a direct worker run). r2_test is equal on every record and the six device hashes are equal in both finder modes on both arms and on sm_87.
Both halves of the launch lever ran as a thirty-first session on the same pod type, 71dec59 (k0) against it plus the kernel parameters (l27a) and plus the parameters and the event (l27b), three reps interleaved on each tall cell and two on each wide cell, min per arm. Tall leafwise train 2.791 to 2.673 to 2.627 s (-4.2%, -5.9%), the finder bucket 1.46 to 1.37 to 1.32 s and the partition staging bucket 0.04 to 0.00 s; wide leafwise 5.103 to 4.967 to 4.887 s (-2.7%, -4.2%), its finder bucket 4.67 to 4.52 to 4.46 s. The depthwise and levelwise planes never take the leaf path: tall depthwise 2.295 / 2.281 / 2.284 s, tall levelwise 2.144 / 2.169 / 2.165 s, wide depthwise 4.484 / 4.466 / 4.469 s, inside the rep spread. On sm_120 find_kernel<LeafFindNodes> reads 128 registers with a 24-byte frame and find_kernel<FindNodesRef> a 32-byte frame against the single finder's 40, partition_kernel 40 registers on all four instantiations, level_find_kernel unchanged, no warnings. The engagement line under BONSAI_CUDA_PROFILE names the kernel parameters on l27a and l27b and the event on l27b only, never on k0 (proven on a direct worker run). r2_test is equal on every record and the six device hashes are equal in both finder modes on all three arms and on sm_87.
Refuted: 64-bit shared atomics on the planes. Native atomicAdd(unsigned long long) into structure-of-arrays int64 planes: sm_120 lowers a 64-bit shared atomic to a compare-and-swap spin as sm_89 does (32 ATOMS.CAST.SPIN.64, 59 to 61 registers, 16 bytes of stack), and it read wide depthwise train 5.46 s (+8%) and tall +13% against the base.
Refuted: occupancy bounds on the tile fill. On the runtime-addressed form __launch_bounds__(512, 3) gave 40 registers with 184 bytes of stack (45 STL, 45 LDL) and read wide depthwise train 5.454 s (+7.7%), wide leafwise 8.093 s (+8.5%), tall depthwise 3.915 s (+8.6%) and tall leafwise 6.566 s (+15%) against the base's 5.065, 7.459, 3.604 and 5.691 s; __launch_bounds__(512, 4) left the kernel at 114 registers (the cap is dropped rather than met) and read 4.954, 7.276, 3.511 and 5.604 s, the runtime form's numbers to the hundredth, so residency past 64 registers is one block per SM whatever the count, and the register diet had to come from the layout.
Refuted: the 1024-thread tile without its launch bound. The 16-wide tile compiles to 72 registers, and 72 x 1024 exceeds the 65536-register block file, so every root fill launch fails with too many resources requested for launch and the fit errors out; __launch_bounds__(k_tile_fill_threads) is what lets the block launch, not a tuning, and it lands at 64 registers with no stack on sm_120 and 62 on sm_87.
Refuted: a second cut chunk prefetched into registers. sweep_cuts holding two chunks ahead instead of one (after beside next) pushed the stack from 40 to 64 bytes (STL 40, LDL 48, LDG 54 to 60) at the 128-register cap and read find_kern 1.78 vs 1.77 s, train 5.248 vs 5.238 s depthwise and cuda_gpu 3.76 vs 3.70 s, train 7.574 vs 7.533 s leafwise: the extra chunk spilled, so the prefetch became a global load plus a local store and reload and hid nothing. Stacked on the L2 form it read 1.60 / 5.080 / 3.57 / 7.400 s with 56 bytes of stack, the L2 arm's numbers, so the register form adds nothing the L2 prefetch does not already give.
Refuted: the derivation fused into the sweep without the prefetch, and wider finder blocks. The first form of the fourteenth lever (the difference formed per cell inside the sweep, with leafwise deriving in place, and no prefetch) measured wide depthwise find_kern 3.76 to 3.98 s (+5.8%) and leafwise train 10.12 to 10.23 s on the eleventh session's pod, and 144 registers on sm_120 (14 warps per SM); the eleventh session split it, kept the prefetch, and the fourteenth rebuilt the derivation on top of the twelfth and thirteenth levers with the register cap. Four and two features per 128- and 64-thread find block, so a block amortises its launch over more warps, measured 4.09 and 4.00 s against 3.76 s (+8.8% and +6.4%) at equal occupancy (__launch_bounds__(128, 4), 128 registers with 16 bytes of stack), which places the finder's cost in each warp's own latency chain and not in block turnover; the first build of that probe stepped derive_large_strip by the warp width and made the 256-thread level finder derive each strip eight times over (wide levelwise +55%), an artefact the parameterised stride removed and the rerun confirmed flat.
Refuted: the same screen over the level finder. The level finder was 6.2 s of the levelwise grow after the ninth lever with the same 2.6 s byte floor, so it was the one finder still bound on the fp64 pipe, and the interval screen looked like the same -1.5 s or more. It was built in full: a first pass over every node bounds each cut's level gain in fp32 (IntervalTreeSum, the shuffle tree over intervals, with the feature-independent parent sum hoisted into a one-block level_parent_kernel that replays the walk's push order so the bytes stay the walk's), a keep mask, and a second pass that scores only the survivors exactly, with per-(node, warp) exclusive prefix checkpoints so the second pass can skip a cut's neighbours; the level suite passed on sm_87 and all six hashes held with and without the toggle on Blackwell. Same pod, 951f8ce against it plus the level screen, min over two interleaved reps: wide levelwise fit 11.140 to 14.230 s (+27.7%), train 9.314 to 12.419 s (+33.3%), cuda_gpu 6.27 to 9.38 s, grow_find 9.20 to 12.42 s; tall levelwise fit 3.934 to 4.018 s (+2.1%, cuda_gpu 1.13 to 1.19); the depthwise and leafwise rows flat on train (wide depthwise fit -2.6% is the ingest's rep spread). The mechanism is the shape of a level gain: it is a sum over 2^d nodes of split scores less a parent sum of the same size, two nearly equal totals, and the fp32 interval's width grows with the node count while the gap between competing cuts at depth does not, so at the deep levels that carry the cost almost nothing certifies (gain.hi < lower rarely holds), the second pass rereads every strip it would have read anyway, and the first pass (a full strip read plus the interval arithmetic) is pure overhead. A node's score is one quotient and an interval screens it well; a level's gain is a difference of two long sums and an interval cannot. Two facts from the build stand on their own: ptxas targets 128 registers for a __launch_bounds__(256) kernel so that two blocks fit an SM, and spills to reach it (the two-pass kernel read 392 STL/LDL at 128 registers, 49 once the parent sum was hoisted; __launch_bounds__(256, 1) gave 157 registers and no spills at half the occupancy), and the hoisted parent sum is a self-contained cut of about 2% of the level kernel's arithmetic that was not measured on its own and is not adopted here.
Refuted: the screen's divisions on the approximate divide with a certified bracket. The screen's four fp32 IEEE divisions per chunk (MUFU.RCP, an FFMA refinement and an FCHK guard with a slow-path call) were replaced by the two-instruction approximate divide bracketed two float steps each way, twice on the same pod type: on the fifteenth arm 3.21 vs 3.28 s find_kern, train 6.729 vs 6.765 s depthwise and 9.408 vs 9.371 s leafwise; on the sixteenth arm 2.04 vs 2.02 s, 5.520 vs 5.500 s, leafwise 8.014 = 8.014 s with cuda_gpu 4.08 vs 4.19 s. MUFU.RCP rose 112 to 136 and nothing moved past rep noise: the guard's slow path is never taken on these operands, so the IEEE divide already costs its reciprocal.
Refuted: two cuts per lane. A sweep with two longlong2 per lane, 64 cuts per chunk and one scan over the pair, so each warp holds two independent chains: at 128 registers it spills 96 bytes of stack and reads 2.20 vs 2.03 s find_kern, train 5.667 vs 5.510 s depthwise and 8.193 vs 7.941 s leafwise (cuda_gpu 4.32 vs 3.97 s); under __launch_bounds__(32, 12) it holds 168 registers with 8 bytes of stack and reads 2.10 / 5.570 / 8.068 s (cuda_gpu 4.08 s); tall flat. The doubled chain either spills under the cap or costs four resident warps without it, and either loses more than the second chain hides.
Refuted: the occupancy bounds. On the eighteenth arm __launch_bounds__(32, 24) gives 80 registers with 184 bytes of stack (154 STL, 174 LDL) and reads 1.78 s find_kern, 5.257 s train depthwise, 4.11 s cuda_gpu and 8.052 s train leafwise against 1.77 / 5.246 / 3.82 / 7.738 s: the spills eat the eight extra warps. __launch_bounds__(32, 32) does not cap at 64 registers; ptxas chose 144 with no stack, 14 warps per SM, and it reads 2.10 / 5.581 / 4.06 / 8.100 s. Two fewer resident warps cost 0.26 s of a 1.84 s finder, about 0.13 s per warp, which confirms the eleventh session's ladder. All six device hashes are equal across the four arms in both finder modes.
Refuted: the last level's finder reading the sibling difference. At the last level of a tree the children are leaves and their histograms are never read again, yet find_node derived every larger sibling (parent minus smaller) into its slot before sweeping it, a write of the whole strip and a read back: 64 of the 126 derives per tree at depth 8, 16384 features by 4 KB, about 4.3 GB of writes per tree and 0.27 s per fit at the memset's roofline. It was built: find_node took a StripSource (a cell pointer and an optional subtrahend), the pipeline counted its own depth, and at the last level the finder pointed at the parent and the small sibling and formed the difference per cell as it loaded, storing nothing; the leafwise finder always stored, since its slots outlive the find. The suites passed and the device hashes held in both toggle modes on Blackwell and, on a relinked module, on sm_87. Same pod, 113a421 against it plus the change, min over two interleaved reps, r2_test equal per plane: wide depthwise fit 9.097 to 9.480 s (+4.2%), train 7.292 to 7.672 s (+5.2%), find_kern 3.81 to 4.15 s; wide leafwise fit 12.274 to 12.715 s (+3.6%), train 10.398 to 10.973 s (+5.5%), cuda_gpu 6.41 to 7.16 s; wide levelwise flat (+0.5%, its finder untouched); the tall cells within the band on every plane, and every base rep faster than every changed rep on the two moved buckets. The mechanism is where the subtrahend test landed: the null-tested pointer sits inside the per-cell load, so both sweep passes at every level evaluate it, find_kernel grew from 124 to 129 registers on sm_87, and the leafwise plane, which never takes the new path, paid the same tax, which places the cost in the load and not in the difference. That tax is several times the priced saving, so whether any write saving sat underneath cannot be read from the session. A StripSource<bool> that compiles the test away was named and not built: the last level's sweep would then issue two loads per cell in each of its two passes on a kernel near its byte floor, which is the write it removed, read twice. Reopener: a finder that reads each strip once (a sibling pair per block, the parent and the small child loaded once and both children scored from them), where the last level's difference comes free. The fourteenth lever takes this reopener with the sibling blocks adjacent in the grid rather than sharing one, and the byte saving it priced did not appear, for the reason the fourteenth session records.
Refuted: a root bulk zero of the leafwise pool. One cudaMemset over every slot a tree can reach at leaf_begin_root, so leaf_build launches no zero kernel until a slot is reused: priced at the 0.30 s of zero launches on the wide cell, it read wide leafwise train 5.335 to 6.325 s (+17.5%) on the twenty-fifth session, tall leafwise 3.282 to 3.278 s (noise), the other planes flat. grow_populate carried 0.38 to 1.32 s of it, the memset of about 2 GB per tree sitting on the critical path where the per-build kernels ran between fills, and hist_small_kernel carried the rest, 78.8 to 129.0 us per launch (0.54 to 0.88 s over 6817 launches): a slot zeroed by a kernel just ahead of its fill is L2-resident (128 MB of L2 on this part) for the small fill's scattered int64 atomics, and a slot memset at the root is DRAM-cold by the time its fill lands. The zero kernel is a prefetch as much as a write, and the fill-targeted form of the fourth lever stays.
Refuted: a 16-byte slot zero. zero_slots_kernel storing ulonglong2 pairs over a 1024-block grid in place of scalar int64 over 256 blocks: sm_120 SASS shows the pair store lowered to two STG.E.64 ... RZ at offsets 0 and 8 (registers 12 to 14, no STG.E.128), and a twenty-sixth session on the same pod type, four arms three reps interleaved on the wide leafwise cell, reads the kernel at 24.2 us per launch on the base grid, 28.3 us for the pair form, 22.8 us for the scalar store on the wider grid, and 25.5 us for an inline st.global.v4.u32 that does emit STG.E.128, over 12281 launches; train min 5.333, 5.329, 5.306 and 5.297 s in that order, inside the 3% rep spread. The wider grid alone is worth 0.017 s per 100 trees, under the bar for a commit, and neither vector form beats the scalar store, so the kernel is unchanged.
On the eighth arm the small fill reads 2.0 ms per launch, the reduce 0.05 ms, and kernel time sums to within a second of the depthwise grow, so the parts explain the whole. What remains of the wide cell is the finder (find_kernel 6.6 s of the depthwise grow and level_find_kernel about 9 s of the levelwise grow on that arm, less the 0.9 and 2.9 s the ninth lever returned, the 2.1 s the tenth through fourteenth returned, the 1.4 s the fifteenth through eighteenth returned and the 0.17 s the nineteenth returned on the node finder, which now reads 1.60 s; the node finder is bound by the latency of each warp's chain at 16 warps per SM (the screened path issues about 0.3 instructions per scheduler-cycle, and the exact path, a quarter of the finder, stalls four deep behind each dependent fp64 op), since each resident warp is worth about 0.13 s on the occupancy ladder, and the level finder keeps one barrier per node per pass and its fp64 gain math on a 1/64-rate pipe) and an ingest of about 1.4 s of mapper fit plus 0.55 s of dbin, both host work whose remaining cost is the sort of 16384 columns of 131072 floats. The tile fill was 2.04 s of the wide depthwise kernel time and 2.10 s of the tall before the twentieth lever, at about half its byte floor; the small fill (0.82 s) and the slot zeroing (0.52 s) are the next two kernels on the wide cell by the nsys decomposition.
Two build facts the kernel levers carry. The strip loader unpacks its vector load from registers by shift rather than storing through the bin array, because LLVM's SROA pre-split that store into the array's two-byte reads and the uint16 tile kernel lost its single 16-byte load; on sm_87 and sm_120 both tile kernels keep LDG.E.128 (uint16) and LDG.E.64 (uint8) with the 32-atomic inner loop at 245 instructions against 244. The block-uniform full-strip test is hoisted out of the row loop as a template flag so the hot loop holds one load shape; the partial-strip copy runs only on the last tile of a feature count the tile width does not divide. The gather's shape was swept on an M2 at 32768 x 16384 (blocks of 8, 16, 32, 64 and 1024 columns read 0.29, 0.38, 0.46, 0.49 and 0.65 s for the gather; 4, 8, 16 and 32 rows ahead read 0.53, 0.29, 0.29 and 0.38 s), a laptop sweep used to choose the constants, not quoted as a delta. That sweep's ordering was an artefact of the write side: at a power-of-two row count an unpadded dense block puts every column stream in one cache set, so 16 and 32 columns read 0.44 s where 8 read 0.26 s; with the streams 32 floats past a multiple of the row count apart, 16, 32 and 64 columns read 0.121, 0.101 and 0.116 s and the block width settled at 32. Single-thread sort plus run lengths on 256 columns of 131072 normal rows read 0.247 s with a count pass per byte and a push_back run-length loop, 0.133 s with the four histograms from the key pass and run ends written without a branch (0.478 to 0.157 s on integer-valued columns, where two of the four scatters skip); a per-block gather buffer costs 5% over a thread-local one and keeps no scratch alive after the fit.
Rejected alternatives. Routing every node through the tile kernel, so the small kernel disappears: the tile kernel zeroes and merges a shared histogram per block, which for a 20-row node is more work than the atomics it saves, and the 512-row threshold is the one decision 106 (the hist chunk axis) swept, every cutoff above it worse at every cell. A wider small block (1024 threads) without the tile split: one SM still carries the node. A warp-shuffle reduce with no shared stage: 16384 candidates over 32 lanes is 512 strided steps per lane before the shuffle, where 256 threads take 64 steps and an 8-level tree. Reducing in find_kernel itself: it would put the cross-feature order inside the per-feature kernel and end the one-launch-per-node shape the leafwise plane relies on. A dense mapper-fit write with one NaN compaction pass per column instead of push_back: 0.51 s against 0.29 s on the M2 sweep, and the unpadded dense stride that sweep used is the cache-set aliasing the eighth lever's padding removes. Copying each column out of the gathered block into its own vector so from_sample could keep taking a vector by value: +0.032 s on the 32-wide gather sweep and a second copy of every column, where a span over the block sorts the bytes where they landed. Raising the subtract kernel's 256-block grid cap: the subtract already streamed 12700 x 200 MB in 1.65 s, the memory roofline, so more blocks could not move it, and the fusion removed the pass instead. A wider level_find_kernel block so more warps derive, while the lanes still owned nodes: the finder's registers are allocated per block, so a 128-thread block whose three extra warps exit after the derivation would have cut the resident warps four-fold on the kernel that was 11 s of the levelwise grow; the seventh lever widens the block to 256 threads that all do finder work instead. Shuffling the feature index in the warp reduce to fix the lost candidate: the index is block-uniform, so initialising it makes the loss impossible where a fifth shuffle would only carry it. Filling both children directly when both are under 512 rows, so the op needs neither subtract nor a zeroed large slot: 28.3% of the wide cell's ops (3316 of 11721, a Model.dump() cover walk), but a scattered int64 atomic costs about 8x a streamed byte, so the direct fill only wins when the large child is under about 50 rows, and at level 6 the small child alone averages 585. A ShuffleTreeSum whose five partials sit in an array walked by an early-return loop: the compiler collapsed the loop into a count-trailing-zeros index and put the array in local memory (166 STL and 20 LDL in the level finder), where five named scalars and a hand-unrolled chain compile to a uniform branch chain with one DADD per level and no local memory. Erasing + 0.0 under fast-math instead of the select form: device code builds with -ffp-contract=fast and no fast-math, so x + 0.0 is not foldable, and the select is the only form that removes the add while the sign argument holds. Specialising lambda_l1 in bounded_leaf_weight too: a leaf value keeps the sign of its zero, so the integer NaN test would change the bytes of a zero leaf. Scoring the node finder's survivors in fp32 instead of screening them: it changes which cut wins on a near tie, so it is a model change and its own decision. Letting the inline division take its two registers (136 per lane, 15 warps per SM): +4.3% on the finder, more than the 116-instruction subroutine cost, so the register cap is part of the lever. Deriving the sibling without the prefetch, or in one block per sibling pair: the first measured +5.8% and the second is the wider-block probe measured at +6 to +9%. A bulk L2 prefetch (cp.async.bulk.prefetch.L2) in place of the per-lane form: it is sm_90 and later, and the sm_87 gate would lose the kernel. Word planes addressed at runtime, or bounded to three or four blocks per SM: 94 registers, spills, or an ignored cap, each measured above. The 16-wide tile at 512 threads, or at 768 without a bound: 0.21 s and 0.02 s behind the bounded 1024-thread form on tall depthwise train, and the bound is what makes 1024 threads launch at all. Reopener: a wide cell where the level finder's fp64 gain math is priced against an fp32 form (model-changing, its own decision), or a level screen that bounds each node's contribution against a per-node bound rather than the level total, or a mapper fit whose remaining 1.4 s (the sort of 16384 columns of 131072 floats) is priced against a device sort of the gathered block, which would trade the host's per-column radix passes for one upload of the sampled columns, or a node finder that fits more than 16 warps per SM without spilling (the 24-block bound spilled 184 bytes and two cuts per lane spilled 96 or cost four warps, so the register diet has to come from the exact path's live state), since the occupancy ladder prices each resident warp at about 0.13 s of the 1.6 s finder, or an exact path with a shorter dependent fp64 chain, since the flush stalls four deep behind each of its 38 fp64 instructions and is a quarter of the finder, or a tile fill whose shared atomics are the last half of its root fill (3.24 ms against a no-atomics bound of 1.65 ms at 16M rows), or the partition kernel's level form (0.715 s at 16M x 128 against 0.634 s for the two kernels it replaced, the look-back's serial chain over 16384 tiles of 1024 rows being the cost that its halved launches pay for), or the leafwise plane's blocking fetches (about 39800 per 100 trees at 16M x 128, one per split for the child counts and one per find for the winner, 2.08 s of cudaMemcpy and 1.13 s of cudaDeviceSynchronize in the api sum, removable only by a grow loop that takes several splits per fetch, which is a change to the shared grow loop and its own design), or the 0.54 s of small fill and 0.30 s of slot zeroing the wide leafwise decomposition names, or the 1.2 s of tile fill (52% of the tall leafwise kernel time) whose shared atomics are its last half, three per row-feature under the count plane.
127. The 2.2.0 refresh ships the tall CUDA cells 34 to 60% faster; the CPU cell read over its anchor is one repeat's spread (adopted)#
Decision. The 2.2.0 standings supersede 2.1.0's on every axis with every moved cell of the release A/B shipping as measured: the four gpu-tall cells sit 33.6 to 60.3% under the previous release and 33.7 to 60.0% under the 1.15.0 anchor, and the cpu-tall depthwise cell reads 3.7% over the anchor against a 2% band while reading 0.3% under the previous release. The device moves are decision 126's twenty-seven levers reaching the tall cell, which is what that entry measured (tall train 22 to 31% on its own same-pod ladder) and what this refresh confirms on the standings host. The CPU reading is not re-measured before the release: the anchor arm's four depthwise repeats span 10.58 to 11.41 s, a 7.8% spread, and the min-over-repeats statistic the gate reads took the low outlier; the new arm's four repeats (10.97 to 11.16 s) all sit inside that spread, the previous release's (11.01 to 11.19 s) likewise, and medians read anchor 11.03 s against new 11.09 s (+0.5%). The 2.1.0 release settled the same question on a CPU pod with no quota (cumulative 1.15.0 to 2.1.0 read -0.2 to -0.7%), and 2.2.0's diff against 2.1.0 is the device plane, with the wire identity unmoved.
Why the CPU band cannot be read on this host. A GPU pod meters its CPU plane by a bandwidth quota (13.6 cores against the 128 nproc advertises), so a host measurement there wanders between repeats in a way a CPU pod's cpuset does not; the leafwise cell in the same file reads +4.5% over the previous release and -0.4% over the anchor, and the levelwise cell 0.0% and -0.5%, three growers whose readings against two references disagree by more than the band in both directions, which is the host's spread and not three different engines. The gate is kept at 2%: on a CPU pod it resolves that band (the 2.1.0 session's per-rep spread was under 1%), and a refresh whose CPU plane runs on a GPU pod ships its moved cell under this entry's reading, per repeat and against both references, rather than under a wider band that would also hide a real 3% on the pod that can see it.
Measured (RTX PRO 6000 Blackwell Server Edition, one pod, ab-gpu-2026-09.jsonl and ab-cpu-2026-09.jsonl, min over interleaved repeats): gpu-tall cuda_depthwise 1M x 100 anchor 0.50 s, old 0.51 s, new 0.29 s; cuda_levelwise 0.93, 0.93, 0.37 s; 16M x 100 cuda_depthwise 3.91, 3.90, 2.59 s; cuda_levelwise 3.99, 3.97, 2.51 s; peak host RSS -4.5% at 1M and -0.3% at 16M. cpu-tall 2M x 128 depthwise 10.58, 11.01, 10.97 s; leafwise 10.83, 10.32, 10.79 s; levelwise 10.08, 10.03, 10.03 s. Parity PASS at the anchor cell (fused 2.60 s against two-step 2.58 s, -0.8%).
Rejected. Re-renting a CPU pod for the cpu-tall cell before tagging: the previous-release reading (-0.3%) is the one that carries this release's change, the anchor reading is one repeat of a quota-metered host, and the CPU-pod session that would settle it was run for 2.1.0 on the same anchor. A wider CPU band on GPU-pod refreshes: the band would then also be the band on the CPU pod, where it is the drift the gate exists to catch. Reading the mean instead of the min: noise on a fixed workload only adds time, so the min is the statistic nearest the engine, and the fix for a lucky repeat is more repeats on a host that resolves the band, not a statistic that averages the host in.
Reopener. A CPU-pod three-arm session that reads the depthwise cell more than 2% over the 1.15.0 anchor, at which point the reading is the engine's and gets its own entry.
Standings: gpu-tall, cpu-tall
128. The device quality axis is gated inside the host's own seed spread per task; the pre-registered fixed 1e-3 band is refuted by the metric's resolution (adopted)#
Decision. quality-grinsztajn-gpu sweeps the Grinsztajn suite (55 tasks, 3 seeds, the campaign knobs) with bonsai's three CUDA growers alone, ships as its own standings axis on the gpu plane, and is read against quality-grinsztajn pair by pair: same suite, dataset, seed, and growing strategy. A pair holds when its gap, device metric minus host metric, sits inside the host's seed-to-seed spread of that task and strategy (max minus min of the metric over the CPU rows' seeds) plus 1e-4, the host-vs-device prediction tolerance, so a task measured at one seed still has an allowance. The gate runs at claim time and release time, and the quality page tables per grower the mean gap, the pair nearest its allowance, and the spread it is read against. A pair past its task's spread is a device-plane bug until an entry here says otherwise.
Why the fixed band failed. The gate was pre-registered at 1e-3 in metric units, ten times the prediction tolerance, before the first sweep. The sweep (RTX PRO 6000 Blackwell Server Edition, 495 pairs, quality-grinsztajn-gpu-2026-09.jsonl against quality-grinsztajn-2026-09.jsonl) put 33 pairs past it: 15 depthwise, 15 leafwise, 3 levelwise, none at 1e-2, 100 pairs at exactly zero, and the per-grower mean gaps -2.9e-5, -4.1e-5 and -1.2e-5. The largest, -8.1e-3 on wine seed 0 for both depthwise and leafwise, is one task whose three host seeds read 0.4556, 0.3779 and 0.4603, a spread of 8.2e-2, so the device sits inside the host's own scatter by a factor of ten. That holds across the 33: each one is inside its task's seed spread, at ratios from 1.15 (road-safety seed 2, leafwise: 4.7e-3 against 5.4e-3) to 145 (median 10), and over all 495 pairs one exceeds its spread, levelwise on Bike_Sharing_Demand seed 1 at 1.40e-4 against 1.33e-4, by 7e-6. The mechanism is the metric's resolution: these are fits capped at 10k training rows (wine has 2043) scored on held-out rows, the device's fixed-point cells and tie order pick a different cut where two are near-tied, and on a small task one such cut moves the held-out score by more than 1e-3, which is the same mechanism that scatters the host's seeds on those tasks. A fixed band in metric units cannot see the difference between a device that moves quality and a task that resolves coarsely; the host's seed spread is measured on the same rows and carries exactly that difference.
Rejected. A fixed band widened to 1e-2: it would pass this sweep and be blind on the quiet tasks, where the spread is 1e-4 and a 5e-3 device move would be a real regression. Gating the mean gap per grower: the means are 1e-5 and a per-task bug of 5e-3 on one task hides under 164 zeros. Folding the CUDA rows into the CPU quality file: the CPU axis's rows are read by the standings pages as the host's standing, and a device row in that file would need every consumer to filter it; a second axis with a partner name is the same join the ab files already use. Reading the largest gap as the worst pair: under a per-task allowance the largest gap (wine, 8e-3 inside 8e-2) is the pair that matters least, and the pair pressing the gate is the one nearest its allowance, so the table shows that one with its spread.
Reopener. A sweep where a pair exceeds its task's spread by more than 1e-4, at which point it is a device-plane bug to be found, not a band to be widened; or a suite whose tasks are single-seeded, where the floor alone gates and this entry's allowance is re-derived from a seed sweep of that suite.
129. The GPU plane has its own Grinsztajn standings, every library on its GPU build; an arm whose library does not take the campaign knobs on its device is measured but not ranked (adopted)#
Decision. quality-grinsztajn-gpu sweeps the suite (55 tasks, 3 seeds, the campaign knobs) with six arms on one GPU host: bonsai's three CUDA growers and the three references on their own GPU builds, xgboost device=cuda, lightgbm device_type=cuda, catboost task_type=GPU at border_count=254. The quality page and the README rank the GPU plane by the rule the CPU table already uses (decision 68: mean over seeds per task, best variant per library, average rank across tasks, a win is rank exactly 1), so the two tables read in the same words and each ranks one plane against its own peers. The drift table reads every device arm against its own library's CPU rows task by task, and only bonsai's three arms are gated by decision 128's allowance; a reference's gap is shown with the same columns and verdict wording but never fails a build, because its distance from its own CPU build is that library's to explain. An arm whose library does not apply the campaign knobs on its device is swept and read in the drift table but left out of the ranking, with the rank it would have taken stated under the table (QUALITY_UNRANKED in scripts/check_standings.py); a rank at matched knobs cannot hold an arm at other knobs. A reference arm that silently falls back to the CPU fails its row instead of ranking a host fit under a device label (xgboost's post-fit save_config check, the guard the perf runner already carries).
Measured (RTX PRO 6000 Blackwell Server Edition, driver 595.91.07, one pod, xgboost 3.3.0, lightgbm 4.7.0, catboost 1.2.10, quality-grinsztajn-gpu-2026-09.jsonl, 990 rows, 0 errors). The ranked GPU table: bonsai 1.24 with 42 outright wins, xgboost 2.29 with 7, catboost 2.47 with 6; per suite bonsai 1.00 on cat_clf, 1.31 on cat_reg, 1.33 on num_clf, 1.20 on num_reg. The CPU table on quality-grinsztajn-2026-09.jsonl reads bonsai 1.49 with 35, lightgbm 2.40 with 6, xgboost 2.93 with 5, catboost 3.18 with 9. Ranked among all six arms the table would read lightgbm 1.71 with 38, bonsai 1.93 with 11, xgboost 3.11 with 2, catboost 3.25 with 4, and the drift table is where that reading falls apart: lgbm_cuda against lightgbm's own CPU rows over 165 pairs has mean gap +6.5e-3 and worst +2.6e-2 (compass seed 0, 0.8008 to 0.8270) against a host spread of 8.3e-3, with 123 pairs past 1e-3 in magnitude, where bonsai's three arms read -2.9e-5, -4.1e-5 and -1.2e-5, xgboost's -5.8e-4 and catboost's +2.7e-4. That is not a device rounding effect. On the laptop, lightgbm 4.6.0 and 4.7.0 CPU give identical numbers to four decimals on wine_quality, compass and Mercedes_Benz_Greener_Manufacturing, so the version step is not the cause; and setting max_depth=-1 alone on the CPU build reproduces the CUDA numbers (wine_quality seed 0: 0.5399 against CUDA 0.5363, host as-is 0.4992; compass seed 0: 0.8271 against 0.8270, host 0.8008; Mercedes seed 0: 0.5642 against 0.5586, host 0.5897), where deterministic=False, lambda_l2=0, min_data_in_leaf=1, max_bin=63 and force_col_wise each leave the as-is value. lightgbm 4.7.0's source agrees: the only max_depth check is SerialTreeLearner::BeforeFindBestSplit (src/treelearner/serial_tree_learner.cpp, if (config_->max_depth > 0) against leaf_depth), and CUDASingleGPUTreeLearner::Train loops num_leaves - 1 splits without calling it; cuda_single_gpu_tree_learner.cpp, cuda_best_split_finder.cpp, cuda_best_split_finder.cu and cuda_leaf_splits.cpp contain no occurrence of depth. At the campaign knobs (depth 6, num_leaves 63) the CUDA arm therefore grows 63 leaves at any depth where every other arm is capped at depth 6, which is a different model class, not a device build of the same one. Its rows stay in the file and in the drift table, which is where a lightgbm release that applies the cap will show the arm holding its host spread.
Rejected. Ranking bonsai's CUDA arms against the references' CPU rows: the first GPU file did that by construction (bonsai's three CUDA growers alone, 495 rows) and a table built from it compares a device fit to a host fit, which is the drift question, not a standings question. Ranking lightgbm's CUDA arm at its own capacity: it would crown a 63-leaf unbounded-depth learner over five depth-6 learners and call it a GPU build effect; the mean rank the rule declines (1.71) is printed under the table so the reader has the number with the reason. Restating the knobs so lightgbm's CUDA arm takes them (a num_leaves that emulates depth 6): there is no such value on a leafwise learner, and it would move lightgbm's CPU rows off the campaign the other libraries run. Gating the references' device drift: catboost's GPU build quantises with border_count capped at 254, lightgbm's CUDA learner is its own tree learner, and a gate on either would fail bonsai's release for someone else's regression. One file holding both planes: the CPU axis's rows are the host's standing and every consumer would filter on a plane column; a second axis with a partner map is the join the ab files already use (decision 128).
Reopener. A lightgbm release whose CUDA learner applies max_depth, seen as the drift table's lgbm_cuda row holding its host spread, at which point the arm leaves QUALITY_UNRANKED and enters the ranking; a reference's device gap past its own host spread on a task where bonsai's arms hold, reported with the task named and the library's tracker cited in the PR, never gated; or a fourth reference library, which enters the partner map in scripts/check_standings.py with its CPU spelling and its own device arm in the bench registry.
Standings: quality-grinsztajn-gpu
130. bonsai leafwise meets lightgbm's CUDA learner at its own cap: a leaf-capped regime on its own GPU axis, one parameter change, ranked head to head (adopted)#
Decision. python -m bonsai.bench.grinsztajn --device cuda --regime leaf-capped sweeps the suite (55 tasks, 3 seeds) with the campaign's 63 leaves under a depth cap of 62, the deepest a 63-leaf tree can reach, so the leaf count is the only binding cap on both learners. That is one parameter change on bonsai's leafwise grower, max_depth=62 in place of 6, and lightgbm's own max_depth=-1 fits the same trees (wine_quality seed 0 reads 0.5399 on the CPU at both). Only the learners a leaf count alone can cap run in the regime, bonsai_cuda_leafwise and lgbm_cuda on the GPU, bonsai_lw and lgbm on the CPU; a depthwise or symmetric tree at depth 62 is a different experiment, so bonsai's other growers, xgboost, and catboost are absent by design. The rows ship as quality-grinsztajn-leaf-capped-gpu, an axis of its own on the gpu plane, ranked by the standings rule (decision 68) with lgbm_cuda in the ranking, because under these knobs the arm takes every knob it is given. The quality page carries the ranked table, the per-suite table, and a task-by-task head-to-head table (wins, mean gap, widest lead and deficit, gap as bonsai's mean over seeds minus lightgbm's); the README carries the two-line table. The regime is never merged into the campaign standings and never drift-paired: its question is head to head on one device, not device against host.
Measured (RTX PRO 6000 Blackwell Server Edition, driver 595.91.07, one pod, lightgbm 4.7.0, quality-grinsztajn-leaf-capped-gpu-2026-09.jsonl, 330 rows, 0 errors). Ranked: bonsai 1.42 with 32 outright wins, lightgbm 1.58 with 23; per suite bonsai leads on cat_clf (1.29 against 1.71, 5 tasks to 2), num_clf (1.40 against 1.60, 9 to 6), and num_reg (1.35 against 1.65, 13 to 7), lightgbm leads on cat_reg (1.38 against 1.62, 8 to 5). Mean gap +0.0006 over the 55 tasks, median absolute gap 0.0006, widest lead +0.0256 (sulfur, num_reg), widest deficit -0.0130 (house_16H, num_reg). What the parameter change bought: paired on the same 55 tasks under the campaign knobs (quality-grinsztajn-gpu-2026-09.jsonl), lightgbm's uncapped trees beat bonsai leafwise at depth 6 on 41 tasks to 14 with a mean gap of -0.0056; freeing the depth cap moved bonsai leafwise by +0.0063 on average (up on 38 tasks, from -0.0311 to +0.0436) and flipped the count to 32 to 23. Lightgbm's own rows moved by 0.00006 on average and at most 0.0011 between the two sweeps, one at max_depth=6 and one at 62: the on-GPU confirmation of decision 129, the knob does nothing to its CUDA learner. On 54 of the 55 tasks the gap between the two means sits inside the wider arm's own spread over its three seeds (medical_charges is the exception, a lightgbm lead of 0.0005 r2 against spreads of 0.0005 on both sides, at the metric's resolution); the ranking is real but the margin is thin, and the honest summary is parity with a lean to bonsai.
Rejected. Ranking lgbm_cuda inside the campaign GPU table at its own capacity (decision 129's rejected alternative, unchanged). Setting max_depth=-1 on bonsai: the leafwise grower takes a depth cap, and 62 is the value at which the cap cannot bind for 63 leaves, so the equivalence is exact and stated rather than a sentinel to explain. Adding bonsai's depthwise or levelwise growers to the regime: a depth-62 depthwise tree has no leaf cap to meet and would measure something else. Running the regime on the CPU plane as a second axis: it would answer the drift question the regime is not asking; the CPU arms exist so a laptop can check the equivalence, not for a table.
Reopener. A lightgbm release whose CUDA learner applies max_depth, at which point the campaign table ranks it (decision 129's reopener) and this regime becomes a second view rather than the only one; a third learner a leaf count alone can cap on its GPU build, which enters the regime's arm map in python/bonsai/bench/grinsztajn.py with a test pinning its knobs; or a gap on a task past its seed spread on either side, which is a quality finding for that learner, named in the ledger, never a gate.
Standings: quality-grinsztajn-leaf-capped-gpu
131. One wait per leaf expansion: declined by measurement (adopted)#
Decision. The CUDA leafwise plane keeps decision 126's round: partition, a wait for the left count, fill, find, a wait for the best split. Lever 28 of that decision, resolving each child's histogram slot on device so partition, fill, find and reduce enqueue together behind one wait, was built and measured (PR #478, closed unmerged, branch perf/leaf-fused-wait at 8baad6a on origin). It was priced at 0.2 to 0.4 s of the tall leafwise train from decision 126's residual; it measured 0.04 s on the standings card, inside one arm's spread over three repeats, and nothing on the L40S.
Measured (RTX PRO 6000 Blackwell Server Edition, driver 595.91.07, one pod, interleaved k0/fw/fw/k0/k0/fw, min over repeats, train_s; k0 is main at 681b4f2, fw is the branch). Tall leafwise (gpu-tall, 16777216 x 128) 2.969 against 2.925, -1.5% or 44 ms, with k0's three repeats spanning 37 ms (2.969, 2.994, 3.006) and fw's 58 ms (2.925, 2.981, 2.983); fit 3.649 against 3.606. Wide leafwise (gpu-wide, 131072 x 16384, two repeats) 5.660 against 5.636, -0.4%; fit 7.474 against 7.435. Controls: tall depthwise 2.252 against 2.260, tall levelwise 2.130 against 2.129; ingest flat. On an L40S (driver 570.195.03, one pod, same interleave, never compared across pods): tall leafwise 5.616 against 5.631, +0.3%, with k0's repeats spanning 125 ms; depthwise 4.729 against 4.732, levelwise 4.306 against 4.313; the wide spec is refused by the leaf plane on that card's 48 GB on both arms (the pool would exceed a quarter of free memory), so it has no wide number. The buckets say why nothing moved. On main the leafwise host reads partition 0.89 to 1.01 s, find 1.4 to 1.5 s and populate 0.46 to 0.50 s on the standings card, and of the 2.4 s of leaf rounds the engine's gpu_wait already accounts for 1.1 to 1.2 s against 1.16 to 1.28 s of cuda_gpu: the second wait was a wait on a busy device, not on an idle one, because lever 26 had already queued the fill behind the partition. The branch folds the two host buckets into one expand bucket reading 2.39 to 2.44 s, with cuda_gpu at 2.16 to 2.19 s and gpu_wait at 0.04 to 0.05 s: the same kernel time, now behind one wait instead of two. On the L40S the shape is the same (k0 gpu_wait 2.5 s of 4.5 s of rounds, fw expand 4.47 to 4.55 s with cuda_gpu 4.08 to 4.17 s). The 0.2 to 0.4 s price assumed device idle between the fill and the find; there was none left to remove. Engagement was proven by a direct worker run on both cards (the fused line prints twice on fw, for the micro-fit and the fit, and never on k0, which prints decision 126's lever 26 and 27 lines); r2_test is equal on every record (0.8797 tall depthwise and leafwise, 0.877 levelwise, 0.8597 wide); the three device growers hash equal across arms on both cards; the branch's [cuda] suite passes in both finder modes on both pods and on sm_87.
What the branch also changed, kept out of the tree with it. The fused round reports one host bucket, expand, in place of partition and find, and its part_stage counter includes the round's fill and find launches: a reader of a profile from that branch is looking at different buckets, which is why the comparison above is read as sums. Reordering the driver to inherit the parent's state before the partition returned exposed SplitInput::totals() gating the cached sums on a positive row count; a device child's sums arrive before its count in that order, so the branch gates on the histogram being present instead and pins it with a test. Main's order propagates after the partition and never trips the gate, so no fix ships with this entry; the branch carries it for the day the order is revisited.
Rejected. Merging the lever for its 44 ms: the number is inside the spread and the branch is 368 lines added over 14 files across the engine seam, the leaf driver and the profiler, which is a cost the residual does not pay for. Re-measuring at a larger cell: the buckets on both cards already put the device, not the host, on the critical path of the leaf rounds, and a larger cell moves more work to the device side. Keeping the totals() gate change alone: it changes nothing observable on main.
Reopener. A card or a cell where main's leafwise gpu_wait reads near zero over the leaf rounds, meaning the host and not the device paces the expansion; then the branch at 8baad6a is the implementation to re-measure same-pod, and the profile-bucket change it carries is the first thing to state in the entry that adopts it. The device-bound residual itself (2.2 s of kernel time across the leaf rounds on the standings card, find the largest share) is the next target, and it is a kernel question, not a host-latency one.
132. A leaf budget that cannot bind takes the depthwise plane (adopted)#
Decision. A leafwise configuration whose budget cannot bind (max_leaves of 0, or of 2^max_depth and above) is grown by the depthwise grower of the same engine. resolve_dispatch(cfg) is the one home for the rule; make_booster, save_dispatch and load_dispatch search the dispatch table with it. cfg.dispatch and the saved model keep the name the user wrote, so a warm start, Params.from_model and a loaded model see leafwise unchanged and a load searches with the same routed name the save did. BONSAI_GROW_PROFILE=1 prints the route once per booster.
Why. A depth-D tree has at most 2^D leaves, so a budget of 2^D or above never stops an expansion: every leaf with positive gain splits, which is exactly the set the depthwise grower splits in one level round. Leafwise grew that tree one leaf at a time, paying a find, a partition and a fill round per leaf (255 rounds at depth 8 against 8), and the leaf pool it sizes for 2^D live slots refused the wide cell on a 48 GB part where the depthwise plane fits. Every gpu standings leafwise cell uses num_leaves = 2^depth, so the leafwise rows were paying the per-leaf tax to grow the depthwise tree. On the host the two planes agree to float rounding across the options that could have separated them: 4096 x 6 at depth 5 with a budget of 32 or 0, with and without min_data_in_leaf, monotone bounds, interaction groups and a feature draw, every sampled leaf value within 1e-5 and the same leaf count and depth; a budget of 15 under depth 4 still binds (16 against 15 leaves). At 100k x 32 and depth 6 the planes differ 4.8e-7 at 64 leaves and 0.34 at 63.
Measurement. Same-pod on one RTX PRO 6000 Blackwell (US-NC-1), main 681b4f2 against aad4e66, interleaved reps, min over reps, fit total in seconds; the depthwise rows are the control.
| cell | plane | main | routed | delta |
|---|---|---|---|---|
| tall 16M x 128 | leafwise | 3.694 | 2.971 | -19.6% |
| tall 16M x 128 | depthwise | 2.968 | 2.974 | +0.2% |
| wide 131k x 16384 | leafwise | 7.521 | 6.141 | -18.3% |
| wide 131k x 16384 | depthwise | 6.187 | 6.172 | -0.2% |
| extreme 16M x 1024 | leafwise | 15.357 | 14.843 | -3.3% |
| extreme 16M x 1024 | depthwise | 14.841 | 14.982 | +1.0% |
On train alone the leafwise rows read -24.4% tall, -21.8% wide and -4.7% extreme (2.993 to 2.262, 5.688 to 4.450, 11.352 to 10.823 s). r2 is identical to four decimals across both arms and both planes at every cell (0.8797, 0.8597, 0.8788), and the three device model hashes (depthwise, leafwise, levelwise) are equal between the arms. The tall and wide reps were three and two, extreme one, which is why its 1% is read as the spread and not as a cost. The routed leafwise row lands on its depthwise row because it is the depthwise plane: on every gpu standings cell the leafwise row now measures depthwise, and the results pages say so. The leaf-capped regime (decision 130, 63 leaves under depth 62) is unaffected because that budget binds.
Rejected alternatives. Batching a level's worth of expansions inside the leafwise grower when the budget cannot bind: it rebuilds the depthwise plane's level transaction a second time behind the leaf interface, and the depthwise plane already exists. Speculative batched expansion for a binding budget (grow a level, then prune back to the budget): the pruned tree is not the leafwise tree, since a leaf that would have been expanded ahead of its siblings under the gain order can lose its slot to a sibling split first, so it changes the model and needs its own quality study. Refusing a budget that cannot bind: a user who writes max_leaves=256 at depth 8 has asked for the depthwise tree, and refusing is the answer nobody wants.
Reopener. A binding budget's per-leaf residual (the leaf plane's find, partition and fill rounds against the depthwise plane's level rounds at the same knobs) is the remaining gap and is measured, not routed: when a leafwise cell with a binding budget lands within the depthwise row's noise, the leaf plane has closed it; while it does not, the leaf plane is the target.
133. Device ingest above 8 GiB stages raw chunks through a pinned ring (adopted)#
Decision. When the raw float matrix exceeds 8 GiB, cuda_ingest copies each 64 MiB chunk into one of three pinned host slots with a parallel host memcpy, uploads it with cudaMemcpyAsync on the slot's own stream, bins it on that stream and records a fence; a slot is reused only after its fence has been waited on. Below 8 GiB each chunk uploads with a pageable cudaMemcpy through one device slot on the default stream, the path that shipped before. Both overloads (row-major features_view, feature-major ColumnBatch) share the ring, and BONSAI_CUDA_INGEST_RING forces it below the threshold for the invariant test. Binning per element is unchanged, so the bin planes are byte-identical to the host fill on both paths (the chunk-reuse invariant pins it across four chunks row-major and sixteen columns feature-major, with and without the ring).
Why. Every gpu standings cell paid ingest_dbin for a pageable upload: extreme 3.58 s of a 14.98 s fit (68.7 GB raw at 19.2 GB/s), tall 0.39 of 2.99, wide 0.53 of 6.17, read from the branch arm of decision 132's session on one RTX PRO 6000. Pinned staging was priced at the extreme cell's copy rate against the tall cell's, about 12% of the extreme fit if the extreme's upload reached the tall's rate.
Measurement. Same-pod on one RTX PRO 6000 Blackwell Server Edition (US-NC-1, driver 595.91.07), main 681b4f2 against the ring at f159ece (before the threshold), interleaved reps, min over reps, seconds; ingest_dbin from the ingest profile, fit total from the bench row, depthwise plane, r2_test identical per cell on both arms (0.8788, 0.8797, 0.8597) and the three CUDA model hashes equal.
| cell | ingest_dbin main | ingest_dbin ring | fit main | fit ring | fit delta |
|---|---|---|---|---|---|
| tall 16M x 128 (8 GiB) | 0.32 | 0.33 | 2.908 | 2.967 | +2.0% |
| wide 131072 x 16384 (8 GiB) | 0.43 | 0.42 | 6.162 | 6.251 | +1.4% |
| extreme 16M x 1024 (64 GiB) | 3.57 | 2.78 | 14.871 | 14.121 | -5.0% |
The extreme cell gains 0.79 s of ingest (-22%), half the priced figure. At 8 GiB the ring's rate matched the pageable rate on both cells (tall 27 GB/s on both arms, wide 20 GB/s on both), so those cells had nothing to take from it; at 64 GiB main's upload fell to 19 GB/s and the ring held 25 GB/s. Their fit deltas sit inside the rep spread (main's tall ingest reps span 0.66 to 0.78 s). A 128 MiB engagement cell (1M x 32, 10 rounds) read ingest_dbin 0.01 s pageable and 0.06 s through the ring, three 64 MiB pinned slots allocated for a two-chunk matrix; that 0.05 s is why the ring engages only above 8 GiB, where the cells that measured flat keep the shipped path and the cell that measured a gain takes the ring.
Rejected alternatives. cudaHostRegister of the caller's array in place: page-locking the source is the same work the slots amortise, paid once per byte for a single upload. One pinned slot with no overlap: the DMA rate without the host memcpy running under it. Larger chunks: 64 MiB already amortises launch and fence cost, and three slots hold 192 MiB of pinned memory. A ring at every size: the 128 MiB cell above. Priced dead on this session's buckets, not built: fp32 gain math in the finders, which would change the model: the tall finder is 0.03 s of the fit, and the wide finder (1.6 s of 6.16) already screens in fp32 and scores only the survivors in fp64, with its residual attributed to the warp latency chain rather than to bytes (decision 126), so no priced win remains that is worth a model change; a further split of the fill's shared atomics (the shipped fill already adds each 64-bit cell as two 32-bit ATOMS.ADD with a carry, on sm_120 as on sm_89, and the sm_120 SASS carries no CAST.SPIN, so the fill is at its atomic ceiling); a count plane for unit-hessian objectives, already shipped in the tile fill (decision 126).
Reopener. A host whose pageable upload reads below 20 GB/s at 8 GiB, where the threshold moves down on a same-pod measurement of that cell; a container whose pinned budget refuses 192 MiB, which is a fallback to the pageable path, not a redesign; a pinned slot cache that survives across ingests, which removes the allocation the 128 MiB cell paid and would let the threshold go, priced only once a workload of repeated small device fits shows the 0.05 s in its profile.
134. The fixed-point exponent stays at decision 124's sum bound; capping the row below 2^27 to skip the high-word atomic is declined by measurement (adopted)#
Decision. The device histogram keeps e = min(61 - ilogb(max|g| * n), 126) from decision 124. Lever 30, capping each quantised row below 2^27 so that the shared fill's second 32-bit atomic fires only on a low-word wrap, was built and measured (branch perf/fixed-point-row-bits at 52ff11b on origin, one file, ten lines). It was priced against the word-split's own record: the split took the 16M-row root fill from 1.09 to 0.68 s on an L40S by replacing a compare-and-swap loop with two native adds, and with the sum-bound exponent the largest row lands near 2^61 / n (2^37 at 16M rows, 2^44 on the micro-fit's scale line), so the high add fired on every visit; removing it bounded the saving by the difference between one and two native adds per visit, a share of populate, which reads 0.43 s of a 2.98 s tall fit and 1.60 s of a 14.8 s extreme fit on the standings card. It measured at most two hundredths on populate and nothing on the fit.
Measured (RTX PRO 6000 Blackwell Server Edition, driver 595.91.07, one pod, arms interleaved k0/pr/pr/k0 per cell, min over repeats, seconds; k0 is main at 681b4f2, pr is the branch; buckets from the grow and engine profiles, fit is fit_s). Tall depthwise (16777216 x 128, three repeats each) fit 2.977 against 2.957, -0.7%, with k0's repeats spanning 6 ms (2.977, 2.980, 2.983) and pr's 36 ms (2.957, 2.965, 2.993); populate 0.43 against 0.42, find 1.01 both, gpu_wait 0.96 against 0.95, partition 0.74 both. Wide depthwise (131072 x 16384, two repeats) fit 6.107 against 6.256, +2.4%, all of it in ingest (dbin 0.44 against 0.53, with k0's second repeat reading 0.61): train 4.455 against 4.434, populate 0.28 against 0.27, find 4.31 against 4.30, gpu_wait 2.49 against 2.50. Extreme depthwise (16777216 x 1024, two repeats) fit 14.809 against 14.851, +0.3%; train 10.823 against 10.743; populate 1.60 and 1.60 against 1.64 and 1.51, so the -0.09 s minimum is one repeat against a 0.13 s spread on its own arm; find 8.43, gpu_wait 8.28 and partition 0.74 on both arms. Tall leafwise (two repeats) fit 3.663 against 3.675, train 2.965 against 2.968, populate 0.44 against 0.46, find 1.50 against 1.47. r2_test is equal to five digits on every record (0.8797 tall, 0.8597 wide, 0.8788 extreme). Engagement was proven by the profile's scale line on a direct worker run: the micro-fit prints scale_g=2^37 and the fit 2^44 on k0, 2^22 on pr, and the hash cell prints 2^41 against 2^25. The branch's [cuda] suite passes on sm_120 (382217 assertions) and sm_87, and its sm_120 SASS carries 398 ATOMS.ADD and no CAST.SPIN. The reading is that the shared add count was not what the fill was paying for: halving the atomics per visit, proven by the exponent, moved populate by one to two hundredths at three cells, inside the counter's resolution, while the extreme cell's fill of 1.60 s did not move outside one arm's spread. The 0.41 s the word-split saved came from the instruction class (a native add against a compare-and-swap loop), not from the count, and the count is not on the critical path at any standings cell.
What the branch also changed, kept out of the tree with it. The per-row rounding coarsens from max|g| * n / 2^62 to max|g| / 2^28, the subset-sum bound shrinks from 2^62 to 2^59 for 2^32 rows, and the model bytes move at the float32 ulp on some inputs: the three device growers hash equal across arms on scripts/model_hash.py's cell, and a 200000 x 40 fit of 20 trees at depth 8 differs in 46 of 5000 predictions by 5.96e-8, one ulp. The 1e-4 host parity bound and bit-reproducibility on one device hold on both arms, but a change to what the device fit computes is a wire change for the GPU standings hash set, which a refuted lever has no reason to carry.
Rejected. Merging the lever for its hundredths: the populate deltas sit at the profile counter's two-decimal resolution and the fit deltas inside spread, against a change that moves model bytes. Measuring on an L40S as well: the instruction class is the same (ATOMS.ADD on sm_89 and sm_120, per decision 124's status banner) and the standings card is where the claim would have been made. A middle exponent that keeps the high word zero for positive rows only: it has the same count on every visit that matters and the same byte movement.
Reopener. A cell or a card where populate is the largest bucket of the fit and its SASS shows two ATOMS.ADD per visit, at which point the branch at 52ff11b is the ten-line implementation to re-measure same-pod, with the byte movement above stated in the entry that adopts it. On the standings card the extreme cell's residual is gpu_wait at 8.28 s of 14.8 s behind a find of 8.43 s, so the next lever is in the finder, not the fill.
135. Each node's fill is chunked by its own rows, at the rows per block the largest node gets (adopted)#
Decision. launch_hist keeps its grid (tiles x nodes x chunks, the chunk count sized from the level's largest node) and passes the kernels chunk_rows = max_rows / n_chunks, the rows one block of the largest node covers. Every block computes its node's own chunk count, clamp(ceil(count / chunk_rows), 1, n_chunks), exits when its z index is past that count, and strides the node's rows by that count. The largest node runs exactly the blocks it ran before, so its fill is bit-identical; a smaller node runs as many blocks as its rows fill at the same rows per block, and the rest of its grid slice exits before the shared-memory zero. The cells are int64 fixed point (decision 124), so the sum is the same integer in any block order and the model bytes cannot move: model_hash.py --grower cuda_depthwise reads e1a5391a7beea349 on both arms, r2 equal per cell. The per-level profile counters (rows_lN, blocks_lN on the cuda-level-decomp line, added in this change) now count active blocks, computed on the host from the level's row counts; a blocks_lN read from before this change counted grid blocks.
Why. The extreme cell (16M x 1024) spent 8.25 s of a 14.9 s fit in adv_hist, and the per-level split showed where: rows filled per level are flat at about 4.65M per tree (the smaller sibling at every split), yet the fill's time rose from 5.5 ms per tree at level 1 to 20.1 at level 7, and the block count rose 26x (3973 to 103823), because the chunk count was sized from the largest node and every block with any rows ran, at 45 rows per block by level 7 against 1171 at level 1. Each block zeroes and merges 8160 shared cells (16 features x 2 x 255 bins) whatever its row count, so level 7 merged 847M cells per tree to fill the same rows level 1 filled through 32M. Priced from a linear fit across the levels at 18 us per million merged cells, the lever was worth about 4 s of the extreme fit; the measurement below says the fit across levels overstated the merge and the deep levels carry a second cost.
Measurement. Same-pod on one RTX PRO 6000 Blackwell Server Edition (US-NC-1), 1986d78 (main plus the counters) against b8d7ef0, interleaved reps, min over two reps, seconds; find and adv_hist from the round decomposition, hist_l7 from the level decomposition, fit total from the bench row.
| cell | fit A | fit B | fit delta | find A | find B | adv_hist A | adv_hist B | hist_l7 A | hist_l7 B |
|---|---|---|---|---|---|---|---|---|---|
| extreme 16M x 1024 dw | 14.87 | 13.79 | -7.3% | 8.43 | 7.34 | 8.25 | 7.17 | 2.01 | 1.61 |
| tall 16M x 128 dw | 2.92 | 2.85 | -2.3% | 1.02 | 0.98 | 0.96 | 0.92 | 0.24 | 0.21 |
| wide 131072 x 16384 dw | 6.04 | 6.03 | -0.2% | 4.30 | 4.29 | 2.00 | 1.99 | 0.76 | 0.76 |
| tall 16M x 128 lw | 3.64 | 3.69 | +1.3% | 1.53 | 1.62 |
The extreme cell per level, blocks and merged cells per tree, min hist seconds over 100 trees:
| level | rows/tree | blocks A | blocks B | Mcells A | Mcells B | hist A | hist B | delta |
|---|---|---|---|---|---|---|---|---|
| 1 | 4651350 | 3973 | 3973 | 32 | 32 | 0.55 | 0.55 | 0% |
| 2 | 4215091 | 7540 | 5412 | 62 | 44 | 0.61 | 0.60 | -2% |
| 3 | 4450903 | 14249 | 6891 | 116 | 56 | 0.79 | 0.76 | -4% |
| 4 | 4683568 | 25984 | 8198 | 212 | 67 | 1.10 | 0.99 | -10% |
| 5 | 4739758 | 43899 | 9362 | 358 | 76 | 1.44 | 1.23 | -15% |
| 6 | 4650977 | 68608 | 10185 | 560 | 83 | 1.74 | 1.43 | -18% |
| 7 | 4649717 | 103823 | 11596 | 847 | 95 | 2.01 | 1.61 | -20% |
Level 1 is unchanged in blocks and time, the largest-node identity the design promised. Level 7 dropped 752M merged cells per tree and 4.0 ms, so the merge costs about 5 us per million cells, a third of what the fit across levels implied; the other two thirds of that slope was a cost that rises with depth for a different reason. After the lever, level 7 still reads 16.1 ms per tree against level 1's 5.5 at the same rows and a comparable cell count (95M against 32M), so about 10 ms per tree of the deep-level fill is the row loop itself, three times the level-1 row loop for the same rows spread over the level's node segments instead of one. That is the residual and the next target; its mechanism is not measured here. On the tall cell the same shape at a tenth of the features (levels 5 to 7 read -6, -10, -12%) is 0.04 s of adv_hist and the fit moves at the edge of its rep spread (A 2.92 and 2.98, B 2.85 and 2.90). The wide cell is flat by construction: from level 5 every counted node already ran one chunk (blocks identical on both arms). Its level-7 cost, 7.6 ms per tree, is not attributed by these counters: the level timer spans the tiled fill and hist_small_kernel together, while rows_lN and blocks_lN carry only the nodes at or above the 512-row cutoff, so the 27k counted rows sit in about 16 nodes (16507 blocks over 1024 tiles) and the rest of the level's filled rows go through the small-node kernel uncounted. At 5 us per million cells the 135M counted cells are under 1 ms of the 7.6, so most of that cost is somewhere the counters do not reach. The leafwise fill takes the same kernels and its fit reads +0.05 s inside its own spread (A 3.64 and 3.75, B 3.69 and 3.78).
Rejected alternatives. A larger k_fill_chunk_rows (fewer chunks for every node): it shrinks the largest node's chunk count with the rest, and that count is what fills the SMs at the top levels, where one or two nodes carry the level. One launch per node sized to its own rows: 128 launches at level 7 per tree, and the largest node's chunking would move with it; the per-block exit gets the per-node count from the same grid at no host cost. Routing more nodes to hist_small_kernel by raising its 512-row cutoff: the 2026-08-17 sweep measured every higher cutoff worse at every cell, and the node this change leaves expensive at level 7 averages over 30k rows (4.65M rows over at most 128 nodes), far above any cutoff that sweep considered. Counting active blocks on the device: the host has the level's row counts already (row_counts.host), and the count is profile-only.
Reopener. The deep-level row loop, 10 ms per tree at level 7 on the extreme cell against 5.5 at level 1 for the same rows, which needs a counter that separates the row loop from the zero-and-merge before it is designed against; and the wide cell's deep levels, where the small-node kernel's rows are not counted and the level timer spans both kernels: a small_rows_lN counter and a timer split between the two launches come first, before any lever is designed for that cell.
136. The wide cell's deep-level fill is the small-node kernel; the extreme cell's is the tiled row loop (adopted)#
Decision. The level decomposition splits its fill timer: small_lN is the device time of the hist_small_kernel launch and small_rows_lN the row sum of the nodes under the 512-row cutoff, so hist_lN - small_lN is the tiled kernels' share and rows_lN + small_rows_lN the level's rows. Read once on the three ledger cells, the split attributes the two deep-level costs decision 135 left open to different kernels, so they are two levers with two designs. On the wide cell (131072 x 16384) the small-node kernel carries 0.84 s of the 2.00 s adv_hist, and 5.1 of the 7.6 ms per tree at level 7, for under 10k rows per tree; on the extreme (16M x 1024) and tall (16M x 128) cells its share is 0.00 s at every level, so the deep-level residual there sits in the tiled kernel's row loop. The wide small-node path is the next fill lever, priced at 0.84 s of small-kernel time plus the 0.50 s wide adv_memset it shares a slot with, out of a 6.29 s fit; the extreme row loop follows, once a counter separates it from the zero-and-merge.
Why. The wide cell's level 7 read 7.6 ms per tree with 27k counted rows in about 16 nodes; the counted merge cells price at under 1 ms, and the rest of the level's rows sat in nodes the counters did not see, in a launch the timer spanned but did not separate. Each hist_small_kernel block owns one (16-feature tile, node) pair and adds every visit straight into the global slot with two int64 atomics, one per gradient component, with no shared stage and no merge; whether that path or the tiled kernel's merge carried the level could not be read from a timer over both.
Measurement. One RTX PRO 6000 Blackwell Server Edition (US-NC-1), head 8f60a76, one arm (the counters change no model byte; model_hash.py --grower cuda_depthwise on the pod build read e1a5391a7beea349), min over two reps, 100 trees. Fit totals 13.62 s extreme, 2.99 s tall, 6.29 s wide. Round decomposition (seconds over the fit): extreme root_sums 1.44, root_hist 1.36, adv_memset 0.03, adv_hist 7.16; tall 0.26, 0.19, 0.01, 0.92; wide 0.20, 0.20, 0.50, 2.00.
Wide, per level, rows and blocks per tree, seconds over 100 trees, tiled = hist - small:
| level | tiled rows/tree | blocks/tree | small rows/tree | hist s | small s | tiled ms/tree | small ms/tree |
|---|---|---|---|---|---|---|---|
| 1 | 32239 | 1454 | 0 | 0.08 | 0.00 | 0.8 | 0.0 |
| 2 | 35721 | 2427 | 7 | 0.10 | 0.00 | 1.0 | 0.0 |
| 3 | 35696 | 3953 | 75 | 0.13 | 0.01 | 1.2 | 0.1 |
| 4 | 34262 | 6820 | 268 | 0.18 | 0.02 | 1.6 | 0.2 |
| 5 | 33772 | 10670 | 1001 | 0.29 | 0.08 | 2.1 | 0.8 |
| 6 | 31321 | 14715 | 2624 | 0.46 | 0.22 | 2.4 | 2.2 |
| 7 | 27026 | 16507 | 5894 | 0.76 | 0.51 | 2.5 | 5.1 |
The small kernel's cost per row is flat where it is measurable, 0.80, 0.84 and 0.87 us at levels 5, 6 and 7, against 0.025 us per tiled row at level 1 and 0.09 at level 7 (merge included). At level 7 the 5894 small rows per tree are 18% of the level's filled rows and 67% of its time. Counting the atomics the kernel issues, 5894 rows x 16384 features x 2 components is 193M global int64 atomic adds per tree in 5.1 ms, 38 G per second; what bounds that rate (atomic unit throughput, or the DRAM sectors a random 8-byte read-modify-write touches across a slot 16384 features wide) is not measured here.
Extreme, the same split:
| level | tiled rows/tree | blocks/tree | small rows/tree | hist s | small s | tiled ms/tree |
|---|---|---|---|---|---|---|
| 1 | 4651350 | 3973 | 0 | 0.55 | 0.00 | 5.5 |
| 2 | 4215091 | 5412 | 0 | 0.60 | 0.00 | 6.0 |
| 3 | 4450903 | 6891 | 0 | 0.76 | 0.00 | 7.6 |
| 4 | 4683568 | 8198 | 0 | 0.99 | 0.00 | 9.9 |
| 5 | 4739758 | 9362 | 2 | 1.22 | 0.00 | 12.2 |
| 6 | 4650977 | 10185 | 48 | 1.43 | 0.00 | 14.3 |
| 7 | 4649717 | 11596 | 395 | 1.61 | 0.00 | 16.1 |
Tall reads the same shape: small rows 0 through level 5, 57 and 412 per tree at levels 6 and 7, small seconds 0.00 at every level, hist 0.07 s at level 1 rising to 0.21 at level 7 for flat rows (4.3M to 4.8M per tree). On both cells the small-node kernel never reaches a hundredth of a second, so the rise from 5.5 to 16.1 ms per tree at equal rows is inside the tiled kernel, and decision 135 found the merge accounts for a third of it.
The wide adv_memset is the second bucket the read exposes: 0.50 s on wide against 0.03 s on extreme and 0.01 s on tall. zero_slots_kernel zeroes the two child slots of every split node at every level, each slot the full feature width times the bin stride, so its bytes per level scale with the feature count (16384 against 1024 and 128) and not with the rows; on wide that is 5 ms per tree, more than any single level's fill below level 7.
Rejected alternatives. Designing the wide lever against the level timer, on the assumption that the tiled merge carried level 7: the split shows the tiled share (row loop and merge) at 2.5 ms per tree and the small kernel at twice that. A same-pod A/B for this commit: the counters record only under the profile flag and change no model byte, so there is no arm to compare against and the read is one arm's attribution. Pricing the small kernel from the round decomposition alone: adv_hist at 2.00 s does not say which of two launches per level carries it.
Reopener. The wide small-node path: a node under 512 rows is filled into a slot 16384 features wide by global atomics, one block per tile with no shared stage, and 0.84 s of small-kernel time plus a share of the 0.50 s memset is the ceiling on the saving (the small-kernel time alone is 13% of the 6.29 s fit), less whatever the design costs. The design is chosen by a probe that separates atomic throughput from the sector footprint, on a pod, not in the tree. The extreme tiled row loop: 16.1 ms per tree at level 7 against 5.5 at level 1 for the same rows, of which the merge is a third; a counter that splits the row loop from the zero-and-merge comes before any design, as decision 135's did.
137. A small node's block owns its slot, so it stores the tile whole and the level memset skips that slot (adopted)#
Decision. A node under the 512-row cutoff has exactly one block per (16-feature tile, node), so that block is the only writer of its slot's cells. On the tiled plane hist_small_kernel now builds the tile in shared memory (fill_plane, the same stage hist_tile_kernel runs) and stores every cell of the slot, zeros included (emit_plane with a plain store), instead of adding each row visit into a slot the level memset zeroed. zero_slots_kernel clears only the slots of the nodes the tiled kernel fills (lvl.slots, one per tiled node), since the small kernel's store is the zero for the rest. On the per-feature plane (a feature over about 384 bins, where the tile does not fit shared memory) the direct global-add kernel and the full memset stay as they were. The fill is a template parameter of one kernel (SmallFill::direct, store, store_unit_h) over one argument struct, and the profile plane line reports which path ran (small nodes stored whole or added in place). Integer sums commute, so no model byte moves: model_hash.py --grower cuda_depthwise read e1a5391a7beea349 on both arms of the pod build.
Why. Decision 136 read the wide cell's small-node kernel at 0.84 s of the 2.00 s adv_hist, flat at 0.80 to 0.87 us per small row, and the level memset at 0.50 s, and left open whether the atomic unit or the DRAM sectors under a random 8-byte read-modify-write bounded the kernel. The store design removes both mechanisms at once, and the memset of the same slot with them, so that probe was not needed to choose it: on wide a slot is about 64 MiB (16384 features at stride 2 x 256 cells of 8 bytes), the memset writes it once, the small kernel then touches it again at random, and the store writes it once in tile order with the memset gone.
Measurement. Same-pod on one RTX PRO 6000 Blackwell Server Edition (US-NC-1), 04da8e4 (A, the decision 136 head) against e9d35f4 (B), interleaved reps, min over two reps, seconds; find from the grow profile, adv_memset and adv_hist from the round decomposition, small the sum of small_lN over the levels, fit total from the bench row. r2 equal to four places on every cell and rep; B printed small nodes stored whole on every run and A never did.
| cell | fit A | fit B | fit delta | find A | find B | adv_memset A | adv_memset B | adv_hist A | adv_hist B | small A | small B |
|---|---|---|---|---|---|---|---|---|---|---|---|
| wide 131072 x 16384 dw | 6.08 | 5.45 | -10.3% | 4.30 | 3.50 | 0.50 | 0.22 | 2.00 | 1.51 | 0.84 | 0.36 |
| tall 16M x 128 dw | 2.84 | 2.89 | +1.6% | 0.98 | 0.98 | 0.01 | 0.01 | 0.92 | 0.92 | 0.00 | 0.00 |
| extreme 16M x 1024 dw | 13.85 | 13.68 | -1.2% | 7.34 | 7.35 | 0.03 | 0.02 | 7.16 | 7.17 | 0.00 | 0.00 |
| wide 131072 x 16384 lw | 7.33 | 7.37 | +0.5% | 5.18 | 5.14 |
Wide per level, small rows per tree, seconds over 100 trees, and the small kernel's cost per small row where the count is measurable:
| level | small rows/tree | small A | small B | hist A | hist B | us/row A | us/row B |
|---|---|---|---|---|---|---|---|
| 3 | 75 | 0.01 | 0.00 | 0.13 | 0.12 | ||
| 4 | 268 | 0.02 | 0.01 | 0.18 | 0.17 | ||
| 5 | 1000 | 0.08 | 0.03 | 0.29 | 0.24 | 0.80 | 0.30 |
| 6 | 2624 | 0.22 | 0.09 | 0.46 | 0.33 | 0.84 | 0.34 |
| 7 | 5894 | 0.51 | 0.23 | 0.76 | 0.47 | 0.87 | 0.39 |
The B small_lN seconds include the slot bytes the store now writes in place of the memset, so the two buckets move together: the memset gave up 0.28 s and the small kernel 0.48 s, 0.76 s in all against the 0.80 s the grow profile's find lost and the 0.83 s the fit profile's grow lost (4.64 to 3.81). The fit total moved 0.63 s; the other 0.2 s sits in the ingest profile (mapper-fit 1.28 to 1.38, dbin 0.46 to 0.53), host-side stages the change does not touch, read here as the run's spread and not attributed. Tall and extreme have no small rows to speak of (decision 136), and the lever leaves them where they were: tall's +1.6% is 0.045 s between arms whose own reps spread 0.05 s, with adv_hist and find identical. Wide leafwise does not run the level kernels and reads flat.
Rejected alternatives. The decision 136 reopener's probe (atomic throughput against sector footprint, on a pod) before designing: both mechanisms are the same code path, the random global read-modify-write into a slot the memset had just written, and a store into an owned slot removes the path rather than tuning it, so the probe would have chosen between two costs that both go. Keeping the memset and storing only nonzero cells (the tiled kernel's if (v != 0) emit): the store's bytes are the memset's bytes, so the full store costs nothing the memset did not, and it frees the memset. A second kernel for the store path: it duplicated the small kernel's prologue and the design lint's clone count rose 108 to 110; one kernel templated on the fill brought it back to 108. Extending the owner store to the per-feature plane: that plane holds a single feature's cells in shared memory per block, so the tile it could store is one feature wide and the memset it could skip is one feature of the slot; not priced, no ledger cell runs there.
Reopener. The wide cell's find is 3.50 s of a 5.45 s fit: root_sums 0.19, root_hist 0.19, adv_memset 0.22, adv_hist 1.51, and find_kern 1.61 s (the finder, which reads the parent and small-child strips, derives the large sibling on the fly and stores it while its children are still to be found, then the reduce), which this lever does not move. By the slot arithmetic above the finder touches on the order of 30 GB of slot bytes per tree (one strip read per small child, two read and one written per large child, 254 children found per tree at 64 MiB a slot) in 16 ms per tree, which would put it at the DRAM ceiling of the part; that is arithmetic, not a measurement, and the next step is the finder's bytes against its time on wide, before a byte-cutting design is chosen. The same owner argument applies to a tiled node whose chunk count is one (decision 135 gives each node its own count): its blocks are also the only writers of its slot, so its tiles could be stored whole and its slot dropped from the memset, priced at the 0.22 s of memset that remains on wide.
138. The wide finder is DRAM-bound at the subtraction scheme's byte floor, and the sibling block pairing is its L2 hit (study)#
Decision. The profile gains two counters per level, find_lN (seconds the level's find_splits_many launch takes, from the profile-only device sync that already timed find_kern) and find_gb_lN (the slot strip bytes that launch touches: one strip of n_selected x stride x 8 bytes for a node whose slot the fill wrote, three for a node derived from its sibling while its own children are still to be found, since it reads the parent, reads the sibling and stores itself, two at the last level where it does not store). find_kern is unchanged and the seven per-level arrays of the profile became one LevelCounters struct per level. No byte-cutting finder design is chosen: the read below puts the finder at the DRAM ceiling of the part on the bytes the subtraction scheme needs at 8 bytes a cell, and every design that cuts counted bytes either cuts none from DRAM or costs more in the fill than it saves. The finder's __launch_bounds__(32, 16) stays: the two alternatives measured below both lose.
Why. Decision 137 left find_kern at 1.61 s of the wide cell's 5.45 s fit and estimated the finder near the DRAM ceiling by slot arithmetic. A design chosen against that estimate would have been a bet on which of three mechanisms (bytes, latency, occupancy) bounds the kernel, so the counters came first, then two pod probes that are not kept in the tree.
Measurement. One RTX PRO 6000 Blackwell Server Edition (US-NC-1), the counters commit, depthwise, 255 bins, depth 8, 100 trees; wide 131072 x 16384 read fit 5.373 and 5.521 over two reps with find_kern 1.61 and 1.63 s. Per level, seconds and counted GB over the 100 trees, then the DRAM share the pairing paragraph below establishes (three of four counted strips at levels 1 to 6, two of three at level 7) and the rate that implies. Levels 1 and 2 sit at the two-decimal resolution of the lap timer and are not read.
| level | find_s | counted GB | counted GB/s | DRAM GB | DRAM GB/s |
|---|---|---|---|---|---|
| 1 | 0.02 | 26.7 | 20.0 | ||
| 2 | 0.04 | 53.5 | 40.1 | ||
| 3 | 0.06 | 107.0 | 1783 | 80.3 | 1338 |
| 4 | 0.12 | 213.4 | 1778 | 160.1 | 1334 |
| 5 | 0.23 | 421.1 | 1831 | 315.8 | 1373 |
| 6 | 0.44 | 807.5 | 1835 | 605.6 | 1376 |
| 7 | 0.70 / 0.68 | 1128.6 | 1612 / 1660 | 752.4 | 1075 / 1106 |
| sum | 1.61 | 2757.8 | 1713 | 1974.3 | 1226 |
The ceilings of the same pod, measured in situ by a standalone program over 2 GiB buffers, min of three reps: cudaMemset 1.53 TB/s written, cudaMemcpy device to device 1.47 TB/s read plus written, a grid-stride copy kernel 1.39 TB/s, and a grid-stride sum with one 8-byte load in flight per thread 1.25 TB/s, which is a latency-bound kernel and not a ceiling. No kernel reaches the part's 1.79 TB/s specification. The finder's counted rate at levels 3 to 6 exceeds every one of them, so counted bytes include cache hits.
Which bytes hit was settled by a probe: find_grid is {2 x n_selected, (n_nodes + 1) / 2} and find_block maps blockIdx so that the two siblings' warps for one feature are adjacent blocks; the probe kept the grid and the counted bytes and scheduled every small node's warp before every large node's, so a sibling pair no longer shares residency in L2. Same pod, same session, model_hash.py --grower cuda_depthwise equal on both arms (e1a5391a7beea349): find_kern 1.62 to 2.13 and 2.14 s (+32%), level 4 0.12 to 0.16, level 5 0.23 to 0.31, level 6 0.44 to 0.59, level 7 0.69 and 0.70 to 0.90 and 0.91, fit 5.641 and 5.753 to 6.100 and 5.957. Read as DRAM rates on the counted bytes the unpaired kernel runs at level 4 1334, level 5 1358, level 6 1369 and level 7 1254 GB/s: the same rates the paired kernel reaches on three quarters of its counted bytes. The derived node's read of its sibling's strip is therefore an L2 hit today, its cost is the extra 32%, and the pairing is a lever already taken by the grid shape. Levels 3 to 6 then run at 1.33 to 1.38 TB/s of DRAM, between 96% and 99% of the copy kernel and 90% of the memset, and level 7 at 1.08 to 1.11 TB/s, 78% of the copy kernel, not attributed.
The finder is a wide-only cost: tall 16M x 128 reads 0.02 s of finder over a 2.857 s fit (23 GB counted) and extreme 16M x 1024 reads 0.12 s of 13.881 (186 GB), because a strip is 4 KB per feature per node and only the feature count scales it.
Register and occupancy facts from cuobjdump --dump-resource-usage on the sm_120 module: both find_kernel instantiations and level_find_kernel compile to 128 registers with 24 and 32 bytes of stack; __launch_bounds__(32, 16) on the finder caps registers at 65536 / (32 x 16) = 128, so at most 16 one-warp blocks are resident per SM. The occupancy probe, same pod and session, interleaved with the base arm, wide fit seconds and find_kern per rep: base 5.633 and 5.534 with 1.63 and 1.61; __launch_bounds__(32, 24) compiles the finder to 80 registers with 168 bytes of stack and reads 6.470 and 6.237 with 2.48 and 2.34 (+45% on the finder, level 7 1.11 and 1.04 against 0.70 and 0.68); __launch_bounds__(32, 32) leaves the two instantiations uncapped at 138 and 142 registers with no stack, 14 resident warps per SM at that count (arithmetic), and reads 6.094 and 5.725 with 1.84 and 1.80 (+12%, level 7 0.82 and 0.80). Every arm prints the base hash e1a5391a7beea349 and r2 0.8597; tall reads 2.975, 2.990 and 2.985 and extreme 13.802, 13.960 and 13.825 (base, 24, 32), inside their spread. So the kernel does answer to warps in flight, two fewer cost 12%, but the spill that buys eight more costs 45%, and 128 registers is the working point of the live state this finder carries.
Rejected alternatives. Fusing the two siblings' warps into one that reads the parent and the small strip once and emits both: it cuts a quarter of the counted bytes and none of the DRAM bytes, since the read it removes is the L2 hit the probe priced, and it is not proposed. Not storing the large strip and deriving it from the grandparent when its children are found: a store and a read become two reads, the same strip count (arithmetic). Filling both children and deriving none: the finder's DRAM strips per pair go from three to two at levels 1 to 6, about 0.3 s at the measured rate, against a fill that would roughly double adv_hist from 1.51 s (arithmetic), a net loss. Narrower cells (int32 slots, half the bytes of every strip): a change to the fixed-point scale, so model bytes move at the float32 ulp on some inputs as decision 134's row-cap arms did; it is a wire change with its own decision, not a finder design.
Reopener. Level 7 runs at 78% of the copy kernel where levels 3 to 6 run at 96% and above; its 0.70 s holds about 0.2 s against the rate of the levels above it (arithmetic), and nothing here attributes the gap. The byte floor itself moves only with the cell width. A finder that keeps fewer live registers per warp without spilling would raise occupancy where the launch bound cannot; which live state the 128 registers pay for is not read here, and a SASS read of find_node is the step before that design. The remaining wide levers outside the finder are the single-chunk owner store priced at decision 137's 0.22 s of adv_memset, and adv_hist at 1.51 s.
139. The wide mapper fit moves to the device as a per-column radix sort over a raw matrix uploaded once, and the pageable ingest upload is host-memory-bound (adopted)#
Decision. The bin mapper fit for the CUDA plane sorts on the device. When the raw feature matrix fits device memory it is uploaded once, column chunks are transposed, sorted by a hand-rolled per-column LSD radix sort, cut by a kernel that reproduces create_cuts bit for bit, and then the resident raw matrix is binned in place. When it does not fit, the host gathers the 200000-row sample as today and uploads only that. The host mapper fit stays the path of the CPU plane, the ColumnBatch input, and user-supplied edges. The change is priced at wide ingest (mapper-fit plus dbin) 1.93 s to 0.8 to 0.9 s, about -1.0 s of the 5.45 s fit, and is built after this entry with the same-pod A/B as its merge gate. Two side findings close levers on the way: the ingest upload of pageable input is bound by host memory bandwidth at about 28 GB/s pipelined, so neither cudaHostRegister nor a deeper pinned ring moves it, and the tall and extreme mapper fits are mostly the serial seeded sample draw, which no device sort touches.
Why. Decisions 135 to 138 took the wide fit to 5.45 s with the finder at its byte floor and the fill chunked per node. The ingest profile of the wide cell, read in the same class of pod session as decision 138 (not in that entry), shows mapper-fit 1.39 s and dbin 0.54 s, 35% of the fit, the largest buckets outside the round. Pricing a device fit needed three measurements no prior entry carried: what the host fit spends its time on, how fast the device sorts the same keys, and what an upload costs against the host's own copy rate.
Measurement. Host split (M2 laptop, 8 threads, a temporary probe hunk around BinMappers::fit that is not kept in the tree, two fits per cell, structure only, no laptop number is quoted as a pod number):
| cell | sample draw s (serial) | gather thread-s | sort and cuts thread-s |
|---|---|---|---|
| wide 65536 x 8192 | 0.000 | 0.83 / 1.04 | 4.66 / 4.74 |
| tall 4M x 128 | 0.064 / 0.066 | 0.11 / 0.27 | 0.25 / 0.26 |
On wide every row is used, there is no draw, and the sort with its cuts is 82 to 85% of the fit's thread time. On tall the draw is std::ranges::sample over iota(n) with one mt19937 per fit, O(n) and serial; at 16M rows it is about 0.26 s by arithmetic, most of the pod's 0.32 s tall mapper-fit and about half of extreme's 0.48 s.
Device sort ceiling: one RTX PRO 6000 Blackwell Server Edition (US-NC-1), a standalone program, cub::DeviceSegmentedRadixSort::SortKeys over float keys with every fourth column integer-valued, used as the ceiling only since decision 40 keeps cub out of the library, min of three reps, a descent count of 0 on every arm:
| keys | count | sort ms | Gkeys/s | tmp |
|---|---|---|---|---|
| wide 16384 cols x 131072 rows, 512-column chunks | 2.15 G | 107.4 | 20.0 | 268 MB |
| same, 2048-column chunks | 2.15 G | 108.6 | 19.8 | 1.07 GB |
| same, 8192-column chunks | 2.15 G | 109.4 | 19.6 | 4.3 GB |
| tall sample 128 x 200000 | 25.6 M | 1.6 | 16.2 | |
| extreme sample 1024 x 200000 | 205 M | 10.4 | 19.7 |
cub's num_items is an int, so the whole wide matrix (2^31 keys) is sorted in column chunks; the chunk width does not move the rate.
Upload rates on the same pod for the 8.59 GB wide raw matrix: pinned cudaMemcpyAsync 152 ms, 56.4 GB/s; pageable cudaMemcpy 335 ms, 25.5 GB/s; host std::copy_n pageable to pinned 33.1 / 47.5 / 48.4 / 45.5 GB/s at 1 / 4 / 8 / 16 threads; cudaHostRegister of the pageable buffer 0.26 to 0.32 s (27 to 33 GB/s of registration), then DMA at 45.4 to 46.7 GB/s and unregister 0.11 to 0.14 s; a DMA from one pinned buffer concurrent with an 8-thread host copy into another ran at 28.4 to 30.2 GB/s and 28.0 to 33.4 GB/s, 0.30 s of wall for both. The two streams share one host memory budget, so the pipelined rate for pageable input is about 28 GB/s, and decision 133's ring (extreme dbin 2.78 s, 24.7 GB/s) is within 12% of it.
Price, arithmetic from the rows above. Wide today 1.39 + 0.54 = 1.93 s; the device path is one pageable upload 0.34 s, chunk transposes about 0.01 s, a hand-rolled sort at two to three times cub's time 0.22 to 0.33 s, a cuts kernel about 0.02 s, and binning from the resident matrix about 0.2 s (the dbin bucket less its copy), 0.8 to 0.9 s in all, so -1.0 to -1.1 s. Tall: the 1.6 ms sort replaces about 0.03 s of wall and the draw stays. Extreme: the 10 ms sort replaces about 0.2 s of host sort; the 0.8 GB sample gather and its upload stay. Device transient at wide: the 8.6 GB resident matrix plus two 268 MB chunk buffers, freed before the 2.1 GB BinStore is built.
Constraints the build holds. Edges bit-identical to the host's create_cuts, pinned by scripts/model_hash.py and a per-column edge comparison over adversarial columns: ties, -0.0 beside +0.0, fewer distinct values than the budget, the greedy path at max(counts) >= mean_bin, the stride path, NaN dropped at gather. The value of a tie run is its last element in sorted order (run_lengths writes run_val[m] = f on every element, so a -0.0/+0.0 run reads +0.0) and the stride path reads sorted values by index, so the device sort orders keys exactly as sortable_key does. The greedy path is serial over runs and runs one thread per column. The one mt19937(seed) draw over the whole matrix's rows stays on the host, so a device fit changes no sampled row.
Rejected alternatives. cudaHostRegister of the caller's array in place: registration runs at 27 to 33 GB/s, slower than the copy it would replace. Restreaming the raw matrix through the ring once for the fit and again for the bin: +2.8 s at extreme against a 0.2 s host sort. cub in the library: decision 40. Moving the sample draw to the device or to a parallel sampler: it changes which rows are sampled, so model bytes move on every CUDA cell; at about 0.26 s of tall's 2.86 s (9%) and 2% of extreme it is a separate model-changing entry. A device fit for the tall cell alone: 0.03 s.
Reopener. A user-pinned input path (a cudaHostAlloc array reaching fit unchanged) lifts the ingest bound from 28 to 56 GB/s; extreme's 2.78 s dbin would read about 1.3 s (arithmetic). The serial sample draw is the next tall and extreme mapper-fit lever, and a model-changing one. scripts/dag_model.py carries h2d 14e9 and h2d_pinned 24e9 from an older host and a mapper_fit note that predates the whole-matrix draw; both are refreshed with the build's constants.
140. The device mapper fit ships: the wide CUDA fit is 13.5% faster same-pod, the raw upload gets its own ingest bucket, and small host columns sort under the radix key order (adopted)#
Status 2026-09-10: the reopener's 0.66 s was not the sort. Decision 141's decomposition splits it into sort 0.21 s and cuts 0.40 s, and the cuts kernel's serial walk was the lever; the sort's 0.21 s against the 0.11 s ceiling stays open there.
Decision. Decision 139's design is built and measured. The CUDA plane uploads a host feature matrix once (cuda_upload, an owning handle), sorts and cuts every column on the device (cuda_fit_mappers: a gather transpose into 32-bit sortable keys, one block per column running four LSD byte passes with a pass skipped when every key shares the byte, one warp per column walking the sorted runs and reproducing create_cuts), and bins from the same resident copy. The upload declines and the host path runs when there is no device, when max_bin exceeds the shared-memory ceiling the fill would refuse, or when the matrix would take more than half of free device memory counting the mempool's reserved bytes as free; extreme (16M x 1024, 68.7 GB against 96 GB) takes that branch and is unchanged. The DLPack path fits on the device too, where it gathered the sample to the host before; cuda_gather_rows is gone with its only caller. Three behaviour changes travel with it. mapper-fit in the ingest profile now measures the device fit on this plane, and a new upload= bucket carries the raw matrix copy, which nothing timed before and dbin no longer pays. The host's small-column sort (under 2048 rows, where sort_floats used an unkeyed std::sort) now sorts by the same key as the radix path, so -0.0 orders before +0.0 on both host paths and on the device; a serialized CPU-plane model whose column has under 2048 rows and both zero signs can differ from 2.2.0 by one sign bit in one cut, binning is unaffected because lower_bound treats the zeros equal, and scripts/model_hash.py holds at 55c6fe308852d9bb. The design vocabulary admits upload as the seam's name for a host-to-device copy that neither bins (ingest) nor reads a file (load), the word DeviceBuffer::upload already carries below the seam; gather survives the deletion as RowView::gather.
Measurement. One RTX PRO 6000 Blackwell Server Edition (US-NC-1), arms built as separate checkouts, cells interleaved, min over reps, BONSAI_INGEST_PROFILE=1 with the engagement line bonsai: mapper fit on the device asserted on every fit-arm run and absent on every base run:
| cell | reps | base fit s | fit s | delta | base mapper-fit + dbin | device mapper-fit + dbin + upload | r2 |
|---|---|---|---|---|---|---|---|
| wide 131072 x 16384 | 4 + 4 | 5.487 | 4.747 | -0.74 s, -13.5% | 1.41 + 0.53 = 1.94 | 0.66 + 0.15 + 0.34 = 1.15 | 0.8597 both |
| tall 16777216 x 128 | 3 + 3 | 2.926 | 2.910 | -0.5%, inside the spread | 0.31 + 0.39 = 0.70 | 0.30 + 0.04 + 0.37 = 0.71 | 0.8797 both |
| extreme 16777216 x 1024 | 3 + 3 | 13.794 | 13.780 | -0.1%, inside the spread | 0.47 + 3.53 | 0.44 + 3.55 (host path, upload 0.01 is the warm-up fit) | 0.8788 both |
Grow is flat on every cell (wide 3.81 to 3.83 s, tall 2.15, extreme 9.69 on both arms). The device model hash (model_hash.py --grower cuda_depthwise) is e1a5391a7beea349 on both arms and both repeats, so the device cuts are the host's bit for bit at 500000 x 100; the [cuda] suites pass on sm_120 (72 passed, 1 skipped) and on the Jetson Orin, whose device hash also matches its base. The wide reps on the base arm read 5.487 to 5.703 and on the fit arm 4.747 to 4.794, so the delta is four times the spread.
Against decision 139's price: the upload is the priced 0.335 s, the bin from the resident matrix 0.15 s against about 0.2, and the sort with its cuts 0.66 s against the priced 0.22 to 0.33, which put a hand-rolled sort at two to three times cub's 0.107 s ceiling. It is six times. The wide ingest lands at 1.15 s against the priced 0.8 to 0.9, and the fit at -0.74 s against the priced -1.0 to -1.1. At tall the copy moved buckets and no time moved: dbin 0.39 to 0.04 plus upload 0.37, and mapper-fit 0.31 to 0.30 because the seeded draw stays serial on the host.
Rejected alternatives. Loosening the device parity test to bin equivalence when the device's +0.0 disagreed with the host's -0.0 on a 256-row column: the host's two paths already disagreed with each other there (the radix path over 2048 rows orders -0.0 first, std::sort orders the zeros however it likes), so the fix is the host's key, and the test compares cut bytes. Folding the upload into dbin: it would hide inside a bucket named for the bin the one copy the device fit no longer pays there. Fitting extreme through chunked uploads: decision 139 priced restreaming the raw matrix at +2.8 s against a 0.2 s host sort. Bounding the upload by total device memory instead of half of free: the fill's own buffers follow.
Reopener. The per-column sort at 0.66 s against a 0.11 s ceiling is the next wide ingest lever, 0.5 s of a 4.75 s fit: one block per column serializes four passes over 131072 keys, and a column-parallel pass or a wider digit is the shape to price. A pinned input path (decision 139's reopener) halves the 0.34 s upload. The serial sample draw stays the tall and extreme mapper-fit lever and is model-changing. The dag_model.py constants h2d 25.5e9 and h2d_pinned 56.4e9 and the mapper_fit node now carry this session's numbers.
141. The cuts kernel finds runs a warp at a time: the wide CUDA fit is 7.3% faster same-pod and the device mapper fit is 0.27 s (adopted)#
Decision. The device mapper fit's four stages are timed under BONSAI_CUDA_PROFILE (cuda-mapper-fit: gather= sort= cuts= d2h=), and the cuts kernel finds a column's runs of equal values in parallel. Before, one warp per column walked the sorted keys one element at a time through a 32-key cache: 131072 serial compare-and-branch steps per column on the wide cell while 31 lanes idled. Now every lane loads one key of a 32-key chunk, a shuffle brings its predecessor, and one ballot of prev < value gives the chunk's run-start mask; summarize_runs reads run lengths off the mask with popc and clz and reduces per-lane accumulators across the warp, push_every_run writes each run's closing value at n + rank in one step, and the greedy path's RunCursor walks the same masks. The compare is the float ordering the serial walk used, so -0.0 and +0.0 still share a run and the emitted cuts are the same bytes.
Measurement. The decomposition first, three reps at the instrumented base on one RTX PRO 6000 Blackwell Server Edition (US-NC-1), wide 131072 x 16384: gather 0.015 s, sort 0.206 s, cuts 0.404 to 0.406 s, d2h 0.001 s, against mapper-fit=0.66 in the ingest profile; the parts conserve (0.63 of 0.66, the rest is the host's from_cuts). The cuts kernel was 61% of the device fit and the sort 31%, so the lever moved from decision 140's sort to the walk. Then the lever, same pod, arms rebuilt in place and interleaved base, lever, base, lever, min over reps:
| arm | reps | fit s | ingest s | cuts s | train s | r2 |
|---|---|---|---|---|---|---|
| base | 5 | 4.766 | 1.095 | 0.403 to 0.407 | 3.667 to 3.692 | 0.8597 |
| lever | 7 | 4.420 | 0.749 | 0.036 | 3.666 to 3.688 | 0.8597 |
Fit -0.346 s (-7.3%), ingest -31.6%, the cuts kernel -91%, train flat; the base reps read 4.766 to 4.828 and the lever reps 4.420 to 4.455, so the delta is five times the spread. Priced at -0.38 s from the decomposition, measured -0.35 s. The device model hash (model_hash.py --grower cuda_depthwise) is e1a5391a7beea349 on both arms, the [cuda] suites pass on sm_120 (72 passed, 1 skipped, 383401 assertions), and the CPU hash holds at 55c6fe308852d9bb. The device mapper fit now reads 0.27 to 0.28 s: sort 0.21, gather 0.02, cuts 0.04.
Rejected alternatives. Attacking the sort first, as decision 140's reopener said: the decomposition put it at 0.21 s of 0.66, and its whole distance to the cub ceiling is 0.1 s, 2% of the fit. A block-wide run scan (256 threads, shared-memory prefix) in place of the warp ballot: the walk was latency-bound on one lane, and a warp already reads a 32-key chunk in one coalesced load; the ballot form kept the kernel's one-warp-per-column shape, its eight-column blocks, and the stride path's SortedColumn::at untouched. Emitting cuts through a per-run atomic counter instead of n + rank: order would then depend on scheduling, and the cuts must be the host's bytes.
Reopener. The wide ingest is 0.75 s of a 4.42 s fit: upload 0.36 s (pageable at 24 GB/s, the pinned input path of decision 139's reopener halves it), the sort 0.21 s against cub's 0.11 s, dbin 0.18 s. Each is under 5% of the fit, so the next wide lever is priced against the train's 3.67 s before a pod is spent on ingest again. Tall and extreme are unchanged by construction: their mapper fit is the host's seeded sample draw.
142. The 2.3.0 refresh ships the tall CUDA cells 35 to 66% under the anchor and the cpu leafwise cell 5% under it; the cpu A/B leaves the GPU pod for a cpuset host (adopted)#
Decision. The 2.3.0 standings supersede 2.2.0's on every axis, all eleven measured at the merged bump sha on one RTX PRO 6000 Blackwell Server Edition pod, with every moved cell of the release A/B shipping as measured. On the GPU plane the four gpu-tall cells sit 35.1 to 66.5% under the 1.15.0 anchor and the 1M x 100 cuda_levelwise cell 5.4% under 2.2.0, with peak host RSS 7.9% under 2.2.0 at 1M; the 16M cells read within 0.3% of 2.2.0. The anchor moves are the cumulative device work since 1.15.0 (decisions 126 and 127 carried most of it), and the move against 2.2.0 at the small cell is this release's device levers (decisions 135 to 141) reaching a fit short enough for its fixed costs to show. On the CPU plane the cpu-tall leafwise cell reads 4.5% under 2.2.0 and 5.1% under the anchor: at depth 8 the A/B's leafwise arm carries num_leaves of 256, a budget that cannot bind, and decision 132 now grows that configuration on the depthwise plane, so the move is the route landing on the host. The depthwise and levelwise cells read within 0.7% of both references.
The cpu A/B changes host. The 2.2.0 entry (decision 127) shipped a cpu-tall depthwise reading of +3.7% over the anchor as one repeat's spread on a bandwidth-metered GPU pod and set as its reopener a CPU-pod session. This refresh ran that session, and first ran the A/B once more on the GPU pod: 4 reps there read depthwise +14.4% over the anchor and +7.3% over 2.2.0, leafwise -5.3% and -2.1%, levelwise -0.9% and +1.1%, three growers moving in three directions by more than the band. Eighteen further interleaved reps of the depthwise cell on the same pod (six per arm) put the new build at -2.0% against the anchor and -2.9% against 2.2.0, and the per-rep spread on that host at the cell was 15 to 22%; no min over reps recovers a 2% band from a spread of that size. The same three arms on a cpu5g pod (16 vCPU, a cpuset with no bandwidth quota, OMP_WAIT_POLICY=passive) at 6 interleaved reps spread 0.7%, and that session is the one this entry ships. The host of record for the cpu axes stays the GPU pod's server CPU: the same cpu5g pod measured the cross-library ranking with LightGBM 3.0x slower than bonsai at the tall cell, where the GPU pod's server silicon had them near parity, so a desktop-class rental would rank a different machine class. A ranking wants the server silicon and an A/B wants a quiet host, so standings_refresh.py measure now rents both: the GPU pod for every axis and the GPU A/B, and a cpu5g pod for the cpu A/B alone, at 6 reps.
Measured (ab-gpu-2026-09.jsonl on the RTX PRO 6000 pod, 2 interleaved reps; ab-cpu-2026-09.jsonl on the cpu5g pod, 6 interleaved reps; min over reps; anchor 1.15.0 wheel, old 2.2.0 wheel, new 2.3.0 source at 0ea5b77). gpu-tall cuda_depthwise 1M x 100 anchor 0.46 s, old 0.25 s, new 0.24 s; cuda_levelwise 0.89, 0.32, 0.30 s; 16M x 100 cuda_depthwise 3.82, 2.47, 2.48 s; cuda_levelwise 3.87, 2.40, 2.39 s; peak host RSS 0.63 to 0.58 GB at 1M, 6.78 to 6.74 GB at 16M. cpu-tall 2M x 128 at 12 threads depthwise 13.27, 13.19, 13.18 s; leafwise 13.63, 13.54, 12.93 s; levelwise 11.64, 11.71, 11.72 s. Parity PASS at the anchor cell (fused 2.49 s against two-step 2.47 s, -0.5%). The A/B rows carry no host block, so the cpu A/B's host is recorded here and in the runbook's section 11 until the rows carry it.
Rejected. Shipping the GPU-pod cpu A/B under decision 127's reading rule: that rule covered one cell over the band by one repeat's spread, and this session's four-rep reading had three growers disagreeing with each other by more than the band, which is a host that cannot read the band rather than a cell to explain. Moving the cpu axes to the CPU pod along with the A/B: the ranking flip is measured on the same rental, and a standings row is a claim about a machine class (section 11 of the runbook); the option stays behind --cpu-plane-host cpupod. Widening the CPU band on GPU-pod hosts: the band would then hide a real 3% on the pod that can see it, decision 127's argument, unchanged. Reading the mean: unchanged from decision 127, noise on a fixed workload only adds time.
Reopener. A cpu5g session whose three arms spread more than 2% at the tall cell, at which point the cpuset claim is re-measured before the band is; a cpu-tall depthwise or levelwise reading more than 2% from the anchor on that host, which is the engine's and gets its own entry; or the A/B rows gaining a host block, at which point this entry's host attribution is redundant with the file.
Standings: gpu-tall, cpu-tall
143. The host growers fill one feature for children that become leaves and subtract siblings in one region per level: train 10 to 14% faster same-pod, model bytes unchanged (adopted)#
Decision. A host tree at depth d filled histograms for the children of every level including the last, whose 2^d children become leaves and are never split; only their gradient totals are read, for the leaf values. The device planes have skipped that level since decision 72; the host filled it in full, at the depth where the fill is slowest per row. The totals of a node come from one histogram, the lowest selected feature's, so the deepest level now carves and fills that feature alone for the smaller child (CpuHistogramEngine::populate_totals), subtracts it alone for the larger, and reads the same cells the full fill produced: the same rows in the same chunks with the same partial order, one feature per row instead of every selected one. The leaf plane takes the same route for a child at max_depth (populate_lone_totals), through the lone fill's own row blocks, since that fill's cell order is its own. Two tests pin the cell identity (totals-fill-matches-full-fill, lone-totals-fill-matches-lone-fill), the model hash holds at 55c6fe308852d9bb, and the saved bytes of eight grower and configuration pairs (depthwise, leafwise, levelwise, each with and without feature subsampling, leafwise at a depth the budget cannot bind) equal main's. The sibling subtraction ran one OpenMP region per split, 255 per tree at depth 8 against about 64 for everything else, each dividing a quarter megabyte over the team; it runs as one region per level over splits times features.
Measured (cpu5g pod, AMD EPYC 4564P, 16 vCPU cpuset, 12 threads, OMP_WAIT_POLICY=passive, the cpu-tall cell of 2M x 128 at depth 8 and 100 rounds, main at 355a8ab against the branch, four interleaved reps, min over reps, r2_test equal per pair). Depthwise train 12.62 to 11.01 s (-12.8%), populate 9.40 to 7.79 s; leafwise train 12.31 to 11.07 s (-10.1%), populate 9.21 to 7.81 s; levelwise train 10.85 to 9.38 s (-13.6%), populate 8.38 to 6.90 s; find and partition unmoved. Every branch rep was faster than every main rep for each grower. On the same pod XGBoost 3.3.0 trained the cell in 13.23 s and LightGBM 4.7.0 in 32.04 s, the desktop-class ordering the benchmark protocol names as the reason the ranking is decided on the GPU pod's server CPU instead. On an M2 at 8 threads the three growers read -11 to -12%. On the standings host class (an RTX PRO 6000 Blackwell Server Edition pod, two-socket AMD EPYC 9554, CFS quota 23.8 CPUs, under 1% of periods throttled, 12 threads, three interleaved reps, min over reps) main 16.46 s, branch 13.58 s (-17.5%), XGBoost 3.3.0 15.52 s: bonsai depthwise trains the cell faster than XGBoost on the host class that decides the ranking, at every thread count on a 1/2/4/8/16 ladder (77.8 vs 84.1 s at one thread, 10.95 vs 13.07 s at sixteen), and a per-level ledger there shows no depth decay, levels 2 to 7 at 10 to 13 ms per tree against the root's 17.5 ms and the one-feature last level at 2 ms.
Rejected. Taking the leaf sums from the finder's left and right accumulation at the chosen split, which would drop the last level's fill entirely: those sums are formed in bin order in double where the shipped ones sum float cells after a float subtraction, so the leaf values move by rounding and the model bytes with them; the one-feature fill keeps the bytes and costs a few percent of the level. Binding threads to cores (OMP_PROC_BIND=close OMP_PLACES=cores) as a companion lever in this entry: on the cpu5g pod it read inside the spread (bonsai 11.02 to 10.90 s, XGBoost 13.22 to 13.03 s, one socket, two L3 domains), and on the two-socket standings host class it read -22% for bonsai (branch 13.02 to 10.09 s, main 16.87 to 12.74 s) and +5% for XGBoost (14.93 to 15.75 s), interleaved. That is a placement lever, not this entry's: the runtime's binding pins the calling thread to socket 0 before ingest, so the mirror and gradient arrays it value-initialises home beside the workers, and a probe that pinned only the workers read 17 s, worse than unbound, because the data homed wherever the calling thread floated. Shipping it means pinned workers plus a first touch of the large arrays inside a region, with the calling thread's mask left alone, and a default to argue: two fits in one container would pack onto the same first cores. It gets its own entry when built.
Reopener. The 2.4.0 refresh on the host of record, where cpu-tall depthwise read 9.1 s against XGBoost's 6.2 s at 2.3.0 on a different pod of the same class: the same-pod reading above says the order flips, and the refresh is what publishes it. The placement lever above, if built, is the next entry.
144. A fit places its team on one package and homes the mirror with it: cpu-tall train 36% under main on the standings host class, leafwise ahead of LightGBM there (adopted)#
Decision. The host fit now places its own threads for the length of a fit call. The entry point opens a parallel::FitPlace: the calling thread takes the first CPU of the team order, one CPU per core and one package before the next, read from the process mask and, on x86, from each CPU's APIC id through cpuid with /sys as the fallback (a virtual machine's /sys named every vCPU a core of its own where cpuid paired them as siblings, and the team pinned to vCPUs 0 to 11 ran twelve workers on six cores, 14.7 s against the runtime's 10.8 s on the same pod; on cpuid's order it matched the runtime rep for rep), and each worker binds itself once to the CPU after it; the mask comes back when the call returns, so no thread another library creates inherits a one-CPU mask, and a caller that opens no scope runs unplaced as before. The row mirror is allocated untouched (detail::untouched_vector) so the workers that mint it home its pages on their node. Any of the runtime's placement variables set, OMP_PROC_BIND=false included, leaves placement to the runtime, which is the escape for several fits sharing one container; a mask narrower than the team skips it. The runtime's thread count is read once before the scope narrows the calling thread, since the runtime sizes itself from the first mask it sees: the CLI parity test caught a fit with an explicit count leaving every later auto count in its process at one. Model bytes are unchanged, the model hash holds at 55c6fe308852d9bb, and three tests pin the team order, the allocator, and the restored mask (team-packs-one-package-first, untouched-resize-writes-nothing, caller-mask-restored-after-fit).
Measured (an RTX PRO 6000 Blackwell Server Edition pod, two-socket AMD EPYC 9575F with SMT, CFS quota 31.1 CPUs, under 1% of periods throttled, 12 threads, OMP_WAIT_POLICY=passive, the cpu-tall cell, main at 355a8ab against this branch, three interleaved reps, min over reps, r2_test equal per pair). Depthwise train: main 10.49 s, the branch placed 6.72 s (-36%), the branch with OMP_PROC_BIND=false 8.15 s (the previous entry's saving alone), the branch under the runtime's OMP_PROC_BIND=close OMP_PLACES=cores 6.90 s, XGBoost 3.3.0 6.17 s. Two reps each: leafwise main 10.79 s, placed 7.43 s, LightGBM 4.7.0 9.21 s; levelwise main 9.35 s, placed 6.44 s. On the previous session's pod of the same class (two-socket EPYC 9554, decision 143) the branch without placement already trained the depthwise cell in 13.58 s against XGBoost's 15.52 s, so the depthwise order against XGBoost turns on which machine of the class the refresh lands on, while leafwise against LightGBM and the three growers against main do not.
Rejected. Setting the runtime's variables from the module: XGBoost's runtime in the same process would read them, and bound XGBoost measured 5% slower (decision 143). Binding only the workers: measured 17 s against 13 s unbound on the 9554 pod, the mirror homed wherever the calling thread floated. Binding the calling thread per region and restoring it between: swung between 7.3 and 9.2 s rep to rep on this pod, because the gradient, hessian and score arrays home where the thread sits at fit start, which was either node; the scope over the whole call is what makes both deterministic. A parameter for placement: the runtime's own variable already says it, and a knob nobody sets is the dead-knob rule's case. Two levers priced after placement and not taken: the OpenMP wait policy, active against passive at about 3% on the cell on a 9554 pod although a fit that is nothing but regions runs six times slower under passive, so fork/join is not the residual and region fusion is not the next lever; and a single-pass partition that staged each block's rows once and copied them into the children, which on a cpu5g pod at 12 threads read depthwise 10.71 to 11.03 s, leafwise 11.28 to 11.06 s and levelwise 9.60 to 9.70 s, three interleaved reps, a wash, because the column the second gather reads is cache-resident and the staged copy costs what it saves.
Reopener. The 2.4.0 refresh, which publishes the order. The 9% to XGBoost on this pod's silicon with placement in: populate 4.84 s of 6.72, partition 1.13, find 0.33; a next entry starts from a per-phase read of XGBoost on the same pod, not from this one's ledger. That read exists: XGBoost prints its phase timers when xgb.set_config(verbosity=3) is set before training (the parameter alone prints nothing), and on a two-socket EPYC 9B14 pod of the class in one quiet window it put its histogram build at 7.35 s against bonsai's populate at 7.9 to 8.4, its partition at 2.24 against 2.2 to 2.3, its split evaluation at 1.22 against find's 0.57, and its leaf pass at 1.0 against finalize's 0.4, for 13.8 s against 11.0 to 11.5 with placement. The residual is the fill kernel's, under 15%, and it decides the order only on the machines of the class where the rest does not cover it. Two fits in one container packing onto the same cores is the hazard this entry accepts with the documented escape; a field report of it reopens the default.
145. ResidentTreeEngine: what the two device planes share is one concept, and a step still takes a plane whole (adopted)#
Decision. GPULevelEngine and GPULeafEngine each spelled the same six requirements (the LeafStamp and ResidentNode types, finalize_tree, resident_armed, resident_finalize and resident_end) before their own growth calls. ResidentTreeEngine in include/bonsai/grower.hpp now holds them once and each plane refines it, so the ladder reads HistogramEngine, ResidentTreeEngine, then a plane. The word passes the rule test: it names the concept the resident objective's lifecycle and the tree's device finalize need, which is exactly what the two planes had in common, and the engine_resident_end shim reads it as its one predicate instead of a duck-typed requires. Decision 41's coupling holds: LevelStep and LeafStep constrain on a plane, never on the shared concept alone, so a plane is taken whole or not at all, and the CudaHistogramEngine static_asserts in include/bonsai/cuda/histogram_engine.hpp pin both planes as before.
Rejected. Leaving the six requirements spelled twice: the copy was the finding. One concept for every device call, decision 41's shape: the leaf plane's arming call takes one more argument than the level plane's, so one growth vocabulary cannot hold both without a dummy parameter.
Reopener. A third plane, or a step that wants the resident lifecycle without a growth plane; that is the point at which the shared concept would earn a step of its own.
146. The 2.4.0 refresh ships the cpu-tall cells 11 to 12% under 2.3.0, the host crown reaching the standings; the GPU cells hold at 2.3.0's (adopted)#
Decision. The 2.4.0 standings supersede 2.3.0's on every axis, measured on RTX PRO 6000 Blackwell Server Edition pods across four sessions. The first measured all ten at 28806ff, and its early-stop and three quality axes are the ones that ship from it. The five perf axes and gpu-shap ship from later sessions at e857c18, whose code tree is the release's: a harness defect, below, had put the wrong peak RSS on the page, and the perf session also carries the full three-arm release A/B that the first was launched without. On the CPU plane every cell of the A/B moved, all faster: against the 2.3.0 wheel on the same pod depthwise reads 11.2% under, leafwise 11.4% and levelwise 11.6%, which is the one-feature last level (decision 143) and the fit's own thread placement (decision 144) landing on the host of record. On the GPU plane nothing moved against 2.3.0: the four cells read between 0.4% under and 2.8% over it, inside the 5% band, because this release carries no device lever and the design review (decision 145) moved no device model byte; their moves against the 1.15.0 anchor are the cumulative device work decisions 127 and 142 already cite. The cross-library ranking moved with the CPU plane: on a two-socket AMD EPYC 9554 at 12 threads bonsai takes the top three places on the tall cell, levelwise 9.39 s, depthwise 9.70 s and leafwise 10.63 s against XGBoost 3.3.0's 17.23 s, CatBoost's 17.34 s and LightGBM 4.7.0's 28.82 s, and bonsai depthwise and leafwise lead the wide cell at 63.5 and 63.9 s against LightGBM's 84.3 s.
The page's peak RSS was the harness's, not bonsai's, until a fix and a re-measure. On a data-cache miss cached_gen_data returned the cell read back from disk while the arrays it had drawn were still in scope, so the worker that filled the cache held the cell twice at once, and a worker's peak RSS is ru_maxrss, a high-water mark. The page publishes every column from an arm's fastest rep, so the doubled figure reached the page whenever the cache-filling rep was also the fastest, and bonsai depthwise runs first on every cell: gpu-extreme depthwise read 132.05 GB against 66.9 GB for leafwise and levelwise, cpu-tall depthwise 2.49 GB against 2.01, and two gpu-shap cells 1.24 and 4.87 GB against 1.09 and 3.80. The extreme cell reached that path for the first time this release: 2.3.0's pod had a 200 GB memory cap, under which cache_fits declines a cell that cannot be held twice, and this refresh's pods had none. A miss now returns the arrays it drew (bb011c7), and a test measures the miss at 1.09 times the cell where it measured 2.03. Re-measured, gpu-extreme depthwise reads 66.95 GB and cpu-tall depthwise 2.02 GB, the lowest of the six libraries on that cell. The defect cost bonsai on every cell it touched, since the reference libraries run after it and loaded a filled cache.
The gate held for this release before this entry existed. check_standings.py --decisions passes a moved A/B when an entry tagged with the axis cites the A/B file by name, and the file is named by year and month. 2.2.0, 2.3.0 and 2.4.0 all shipped in September 2026, so ab-cpu-2026-09.jsonl and ab-gpu-2026-09.jsonl held 2.2.0's numbers, then 2.3.0's, then this release's, and decisions 127 and 142 satisfied the gate for cells neither of them measured. The gate read "ok, 11 axes" on the first refreshed tree, with every A/B cell moved and no entry describing why. This entry is what the gate was asking for, and the reopener below is what would make it ask.
Measured (ab-gpu-2026-09.jsonl on the RTX PRO 6000 pod, 2 interleaved reps; ab-cpu-2026-09.jsonl on a cpu5g pod, 16 vCPU as a cpuset with no bandwidth quota, 6 interleaved reps; min over reps; anchor 1.15.0 wheel, old 2.3.0 wheel, new 2.4.0 source at e857c18). gpu-tall cuda_depthwise 1M x 100 anchor 0.51 s, old 0.26 s, new 0.26 s; cuda_levelwise 0.95, 0.32, 0.33 s; 16M x 100 cuda_depthwise 4.14, 2.75, 2.80 s; cuda_levelwise 4.18, 2.68, 2.73 s; peak host RSS within 0.1% of 2.3.0 on every cell. cpu-tall 2M x 128 at 12 threads depthwise 13.39, 13.26, 11.77 s; leafwise 13.75, 13.32, 11.80 s; levelwise 11.90, 11.77, 10.40 s; peak host RSS 1.6% under 2.3.0. Parity PASS at the anchor cell (fused 2.81 s against two-step 2.81 s, +0.1%). The A/B rows carry no host block, so the CPU pod is recorded here as decision 142 recorded its own.
Rejected. Shipping the first session's A/B, which ran with the anchor arm alone: every one of its cells moved against 1.15.0, and an anchor-only reading cannot separate this release's CPU levers from the device work of the four releases before it, so it cannot say what 2.4.0 did. Shipping the second session's three-arm A/B and tall rows: its A/B agrees with the one that ships (10.4, 9.7 and 12.0% under 2.3.0), but its rows' peak RSS carried the harness defect above. Correcting the affected RSS figures in place: the provenance rule re-measures a row whose number is wrong rather than editing it, and the defect was in the measurement, so only a run on the fixed harness says what the fit held.
Reopener. A refresh that draws the two-socket AMD EPYC 9575F: decision 144 recorded bonsai trailing XGBoost by 9% on that part, the residual being the histogram fill kernel rather than placement, so the ranking above is a claim about this host and most of its class rather than every rental. A second release inside one calendar month: the A/B file name collides again and the gate passes on the older entry, so the A/B files are keyed by release version before that happens, or this entry is the precedent the next release cites. A published peak RSS that differs across arms sharing one ingest and bin plane: that is the signature of this defect, since the three bonsai growers hold the same input.
Standings: gpu-tall, cpu-tall
147. A host leaf budget that cannot bind is grown on the plane its node arena fits: the level plane under 2 MiB, the leaf plane above; only CUDA routes in the registry (adopted)#
Decision. resolve_dispatch routes cuda_leafwise to cuda_depthwise when the leaf budget cannot bind, as decision 132 adopted, and no longer routes the host leafwise grower. The host LeafwiseGrower owns a DepthwiseGrower and picks per fit: when TreeConfig::leaves_bounded() is false and LeafwiseGrower::on_level_plane(ds) holds, that is, one node's histogram arena is under k_level_plane_arena_bytes of 2 MiB (1024 features at 255 bins), the fit and its recycled buffers go to the level plane; otherwise the leaf plane grows the tree itself. cfg.dispatch and the saved model keep the name the user wrote, the model-io round trip runs the host grower at a budget of 2^max_depth, and BONSAI_GROW_PROFILE=1 prints which plane took the tree, once per grower on the host and once per booster on the device.
Why. Decision 132 measured the route on the device only, and on the host it reversed its sign at the wide cell. The 2.2.0 refresh read the host leaf plane at cpu-wide in 33.0 s of train against depthwise's 54.2 s in the same session; the 2.3.0 refresh, the first with the route, read the routed leafwise row at 50.8 s beside depthwise's 51.0 s, both behind LightGBM's 45.8 s, where a session earlier the leaf plane had led it. The fill is the reason. A cpu-wide node histogram is 16384 features by 255 bins by 8 bytes, 33 MB, and a level at depth 7 holds 128 of them, 4.3 GB. The leaf plane fills one node's arena and reads it for the split while it is cache-resident; the level plane fills every node's before it reads any, and streams the arena twice. On the tall cell a node arena is 256 KiB and the whole level fits the cache, so the level plane's eight rounds beat the leaf plane's 255, and the route was a win there. Neither plane is right at every shape, and the shape is the feature count, which the registry cannot see: make_booster fixes the booster type before a fit sees the data. The grower sees it on every call, so the choice moved there, as composition rather than a second copy of either loop.
Measured, the crossover. Same-pod min over reps, leaf plane against level plane, a budget of 256 under depth 8 on 2^28 cells at 12 threads, train seconds. The two standings cells ran on a cpu5g pod (EPYC 4564P), the four between them on a cpu3g pod (EPYC 7702P), two reps each; the middle points carry that host's noise, and every sign is clear of it.
| features | rows | node arena | level plane | leaf plane | delta |
|---|---|---|---|---|---|
| 128 | 2M | 256 KiB | 11.00 | 12.69 | +15.3% |
| 512 | 524k | 1 MiB | 23.31 | 23.95 | +2.7% |
| 2048 | 131k | 4 MiB | 38.52 | 34.87 | -9.5% |
| 4096 | 65k | 8 MiB | 59.12 | 46.06 | -22.1% |
| 8192 | 32k | 16 MiB | 93.98 | 65.13 | -30.7% |
| 16384 | 16k | 32 MiB | 93.50 | 56.91 | -39.1% |
The profiles say where each side wins. At 16384 features the leaf plane's populate is 30.3 s against the level plane's 63.8 s and its find 26.1 against 31.2, with peak host RSS 5.87 GB against 7.54, the level arena gone. At 128 features populate is equal at 8.2 s and the leaf plane's whole 1.7 s is find 0.43 to 0.93 s and partition 1.94 to 2.81 s, the per-leaf rounds. The threshold sits between the two measured signs at 1 and 4 MiB; 2 MiB puts 512 features on the level plane and 2048 on the leaf plane, each on its measured winning side.
Measured, the shipped rule. Same-pod on one cpu5g pod (AMD EPYC 9575F, 16 vCPU as a cpuset, OMP_WAIT_POLICY=passive, 12 threads), main c0e8672 against this change, interleaved reps, min over reps, train seconds; the depthwise rows are the control, untouched by the diff.
| cell | plane | main (routed) | head | delta |
|---|---|---|---|---|
| cpu-tall 2M x 128 | leafwise | 8.42 | 8.14 | -3.3% |
| cpu-tall 2M x 128 | depthwise | 8.51 | 8.61 | +1.2% |
| cpu-wide 16k x 16384 | leafwise | 75.46 | 39.22 | -48.0% |
| cpu-wide 16k x 16384 | depthwise | 74.97 | 75.84 | +1.2% |
| 524k x 512 | leafwise | 8.87 | 8.44 | -4.8% |
Six reps at tall, three at wide, two at the 512-feature cell. At tall and at 512 features both arms grow on the level plane, main through the registry's route and head through the grower's, and they read within the host's spread of each other, which is what the controls read too. At wide the leaf plane's populate is 12.7 s against the routed row's 29.0 s and its find 26.1 against 45.7, with peak host RSS 5.86 GB against 7.41. r2 is identical to four decimals on every row, and the depthwise and leafwise model hashes equal main's on both arms, on the pod and locally: the leafwise hash binds its budget at 31 leaves under depth 8 and never sees the choice. No cell moves against the change, which is the condition this entry was written to meet: the first shape of the change scoped the route to CUDA alone and read the wide win at the price of 15% on the tall cell, and that shape was rejected below.
Rejected. Keeping the host route and special-casing wide inputs inside the depthwise grower, filling and reading one node at a time when a level's arena exceeds the cache: that is the leaf plane's loop rebuilt behind the level interface, decision 132's own objection in the other direction. A threshold on max_bin * 2^max_depth in resolve_dispatch: both cells share it, 255 by 256; the feature count is the axis that separates them and only the data carries it. Scoping the route to CUDA and shipping the tall cost, the first shape of this change: a 15% loss on a standings cell to buy a 39% win on another is not a Pareto move, and the grower can see what the registry cannot. Batching the leaf plane's rounds a level at a time when the budget cannot bind: it rebuilds the depthwise plane's level transaction behind the leaf interface, decision 132's rejection, unchanged.
Reopener. The threshold is one number from two hosts; a refresh host whose cache puts 512 features on the other side of it moves the constant, not the design. The larger lever the profiles expose is the level plane's own wide fill: depthwise at cpu-wide streams the same 4.3 GB arena and reads 93.5 s here where the leaf plane reads 56.9 s on the same tree, so a level plane that fills and reads one node at a time when the arena exceeds the cache would take the wide depthwise row down by the same margin. That is a change to the level transaction and its own round.
148. The level plane zeroes and subtracts a histogram run on the thread that fills it: cpu-wide depthwise populate at the leaf plane's cost, model bytes unchanged (adopted)#
Decision. The host level fill no longer zeroes every small child's whole arena in one region before the slice-by-slice fill. carve_and_fill sizes each arena untouched (NodeHistograms::carve_storage), and the run for a node's features in one mirror slice is zeroed by the thread that then scatters into it: in fill_partials when that thread first meets the node in the slice, in fill_columns per feature as the column route's lone form already did. The level step hands CpuHistogramEngine::populate_many the larger siblings (populate_level, which the step and the invariant's test both call): a node one thread fills alone is subtracted from its sibling by that thread when it leaves the node, a node with partial arenas in the reduce pass after its partials land, and a child with no rows subtracts nothing, since x minus zero is x. The chunk plan, the partial slots and their merge order are unchanged, so every cell holds the same bits: the three host model hashes hold, and level-fill-matches-lone-nodes pins a mixed level (a column-routed child, row-chunk children of one, two and several chunks, a child with no rows) against the nodes filled alone, bit for bit at one thread. subtract_level stays as the path for an engine without the fused form, and three new grow-profile laps (carve, fill, subtract) split populate; on the CPU plane the third now reads zero.
Why. Decision 147 left the wide depthwise row on the level plane at twice the leaf plane's populate for the same bytes histogrammed (61.7 against 30.3 s per 100 trees on that entry's pod), and the laps say where: on an M2 at 8 threads the level plane's 59.1 s cpu-wide populate is carve 8.6, fill 37.1, subtract 13.4. A cpu-wide node arena is 33 MB and a slice run 4 MB; zeroing 64 of them cold before the fill writes 2.1 GB per level that the scatter then reads back cold, and the level-wide subtraction afterwards reads every small child cold a third time. The leaf plane's lone fill zeroes, fills and subtracts one worker's 2.7 MB feature range inside its own cache, which is the whole difference on a host whose DRAM bandwidth the level's traffic saturates. The same order inside the level fill costs nothing in arithmetic and moves no bytes the fill did not already touch.
Measured. M2, 8 threads, the cpu-wide cell, one rep per arm, r2_test 0.7611 on every arm: populate 59.1 s to 54.5 with the carve moved alone (carve 8.6 to 0.15, fill 37.1 to 41.0) and to 50.1 with the subtraction moved as well (fill 49.9, subtract 0.0); train 113.4 to 106.9 s; the leaf plane's populate on the same host reads 53.3. Same-pod on a cpu3c pod (AMD EPYC 9965, a 16-vCPU cpuset of 8 cores and their SMT siblings spread over the socket's L3 domains, host load about 200 on 192 cores; every CPU5 flavor was out of stock for the session, so this host stands in for the standings class), 12 threads, OMP_WAIT_POLICY=passive, main 243a94c against e11f5d9, interleaved, min over reps (ten at tall, three at wide), r2_test equal per pair and the three host model hashes equal on both arms, train seconds; LightGBM and XGBoost as installed from PyPI on the pod:
| cell | variant | main | head | delta |
|---|---|---|---|---|
| cpu-tall 2M x 128 | depthwise | 10.76 | 10.16 | -5.6% |
| cpu-tall 2M x 128 | leafwise | 11.31 | 11.27 | -0.4% |
| cpu-tall 2M x 128 | levelwise | 9.96 | 10.09 | +1.3% |
| cpu-wide 16k x 16384 | depthwise | 77.05 | 72.00 | -6.6% |
| cpu-wide 16k x 16384 | levelwise | 112.80 | 105.38 | -6.6% |
| cpu-wide 16k x 16384 | leafwise | 58.81 | 56.14 | -4.5% |
| cpu-wide 16k x 16384 | LightGBM | 72.32 | ||
| cpu-wide 16k x 16384 | XGBoost | 171.69 |
The host's spread is wide, and the untouched phases show it: find and partition move up to 25% between reps in step with populate, so the populate bucket is also read against them, the median over reps of populate divided by find plus partition. cpu-tall reads depthwise 3.75 to 3.70 (-1.3%), leafwise 3.78 to 3.65 (-3.5%) and levelwise 4.05 to 4.13 (+2.0%); cpu-wide reads depthwise 0.60 to 0.48 (-19.3%), levelwise 0.37 to 0.29 (-21.3%) and leafwise 0.38 to 0.38 (+1.1%). The tall cells, whose children take the column route, are the controls the change had to leave alone, and they read inside the spread on both statistics; the cpu-wide leafwise row grows on the leaf plane, untouched by the diff, and its -4.5% is the host. At the best rep the wide populate reads depthwise 28.6 to 23.2 s and levelwise 29.2 to 23.7 s, with carve 0.19 and 1.69 s and subtract 0.00 on the head. The entry priced the level plane's populate at the leaf plane's; on this host it closes 43% of the gap (28.6 against the leaf plane's 16.0, to 23.2), and what is left is the level's own traffic: 128 arenas of 33 MB cannot all be resident where the leaf plane's one can, so the find still reads each child from DRAM. On this host the head's depthwise row reads 72.0 s against LightGBM's 72.3 where main's read 77.1, an order that only a refresh on the standings class can claim. The session's stdout stream from the pod broke at the twelfth cell and the remaining cells ran detached; every number above was read back from the per-cell output files.
Rejected. Routing the wide depthwise row to the leaf plane's loop: the depthwise tree is level-synchronous and the leaf plane grows in gain order, so it is a different tree, and decision 147's rejection of rebuilding one plane behind the other's interface stands. Subtracting in the reduce pass for every node, partials or not: the reduce pass runs on whichever thread the index lands on, so a node one thread filled would be read from another core's cache or from DRAM, which is the traffic the entry removes; the thread that filled the run subtracts it. Skipping the zero for runs the scatter fully overwrites: a histogram run is sparse in general (a node's rows touch few bins), so there is no such run to skip.
Reopener. What is left between the level plane and the leaf plane at cpu-wide on this entry's pod is 7.2 s of populate (23.2 against 16.0) and the find (47.9 against 39.4), which reads both children per split; a find that reads the larger child while the subtraction's lines are still resident is the next lever on that row, and its own round.
149. The 2.5.0 refresh holds the GPU cells at 2.4.0's and reads the host plane on a new part of its class, where cpu-tall depthwise ties XGBoost; the same-pod A/B is the code's verdict (adopted)#
Decision. The 2.5.0 standings supersede 2.4.0's on every axis: ten measured in one session on an RTX PRO 6000 Blackwell Server Edition pod at main 2c93386, the code axis locally at the same sha, and the CPU A/B on a cpu5g pod rented after the standings pod was released, because every cpu5g create was refused for the length of the standings session (the 400 the API returns carries the same "no longer any instances available" body as its 500). The release changed the host planes only (decisions 147 and 148; src/cuda has no diff since 2.4.0, and both plane digests moved because the level step's shared template did), so the GPU rows are a regression check and the CPU rows the change, and the entry reads them in that order.
The GPU cells hold. Three-arm A/B on the standings pod (ab-gpu-2026-09.jsonl, anchor 1.15.0 wheel, old 2.4.0 wheel, new 2.5.0 source, interleaved, min over reps, fit seconds): cuda_depthwise 1M x 100 anchor 0.47, old 0.24, new 0.23 s (-1.7% against old); cuda_levelwise 0.91, 0.30, 0.30 (+1.3%); 16M x 100 cuda_depthwise 3.87, 2.60, 2.55 (-1.8%); cuda_levelwise 3.92, 2.43, 2.47 (+1.3%); peak host RSS within 1.8% of old on every cell. Every cell is inside the 5% band against 2.4.0 and reads 34 to 67% under the anchor, the device work of the releases before this one. The standings rows agree: gpu-tall, gpu-wide and gpu-extreme bonsai cells read 1 to 5% under 2.4.0's rows with r2 equal to four decimals, and the fused-versus-two-step parity holds at -0.7% fit and +1.9% RSS.
The host plane is read on a new part. The pod's CPU is a two-socket AMD EPYC 9555 (256 vCPU host, a 27.2-CPU quota for the container, 175 GB), where 2.4.0's rows came from a two-socket 9554 and decision 144 measured a 9575F. Every library moves with the host: on cpu-tall XGBoost's row reads 17.2 to 6.4 s, LightGBM's 28.8 to 9.8 and CatBoost's 17.3 to 8.7, and bonsai's three growers 9.7 to 6.3, 10.6 to 6.6 and 9.4 to 5.9, with r2 equal on every row. The order on this host: cpu-tall depthwise 6.31 s against XGBoost 6.35, a tie under the page's rule, where the 9554 read bonsai 44% ahead and the 9575F read it 9% behind (decision 144's reopener said the ranking was a claim about most of the class, and this is the part in between); leafwise 6.62 against LightGBM 9.77 and levelwise 5.90 against CatBoost 8.73, bonsai ahead; cpu-wide depthwise 43.3 against XGBoost 100.3, leafwise 27.6 against LightGBM 44.1 and levelwise 56.9 against CatBoost 66.0, bonsai ahead on all three, the leafwise margin widened by the route (decision 147). None of these row-to-row deltas is the code: a row is one host's reading, and the protocol forbids comparing timings across pods.
The code's verdict on the host plane. Three-arm A/B on a cpu5g pod (ab-cpu-2026-09.jsonl, 16 vCPU as a cpuset with no bandwidth quota, 12 threads, six interleaved reps, min over reps, anchor 1.15.0 wheel, old 2.4.0 wheel, new 2.5.0 source at 2c93386, fit seconds; the pod was rented an hour after the standings pod was released, when cpu5g stock returned): cpu-tall 2M x 128 depthwise anchor 18.66, old 16.20, new 16.02 s (-1.1% against old, -14.1% against the anchor); leafwise 19.21, 16.63, 16.00 (-3.8%, -16.7%); levelwise 16.86, 15.11, 14.68 (-2.8%, -13.0%); peak RSS within 0.5% and r2 equal across arms on every cell. Every cell is inside the 5% band against 2.4.0 and each reads a little under it, which is what decisions 147 and 148 priced for the tall cell: its children take the column route, so the fused fill leaves it alone, and the leafwise row's gain is the level plane the route now picks for it. The release's wide-cell wins (leafwise -48%, depthwise and levelwise -6.6%, same-pod in those entries) are not in the A/B's cell; the A/B measures drift on the crown cell, and it reads none.
The gate passed on the older entry again. This is September's fourth release, so ab-gpu-2026-09.jsonl and ab-cpu-2026-09.jsonl are overwritten a third time and decision 146's Standings: tag satisfied check_standings.py --decisions for cells it did not measure, as its reopener said would happen unless the files were keyed by version first. They were not; this entry is the citation for the 2.5.0 cells, and the version key is owed before the next release, as a fix outside the release.
Rejected. Measuring the CPU A/B on the standings pod's own CPU while cpu5g was out: decision 142 read that host's A/B spread at 15 to 22% against cpu5g's 0.7%, and a 2% anchor band cannot be read through it. Measuring it on the cpu3c flavor that was in stock: decision 148's pod of that flavor, 8 cores and their SMT siblings under a 12-thread cell, moved its untouched phases 25% between reps. Carrying the CPU A/B forward from 2.4.0: the release is entirely host-plane work, so the A/B is the one number the release exists to report. Comparing the new CPU rows to 2.4.0's as the release delta: a different part read every library 30 to 66% faster, which is the host and not the code.
Reopener. A refresh that draws a 9575F, the part where decision 144 read bonsai behind XGBoost by 9% on cpu-tall: that is the fill kernel residual, its own perf round. The A/B files keyed by version, so the gate reads the entry that measured the cells it checks. A CPU flavor with a per-datacenter stock reading, so the driver can pin the CPU create as it pins the GPU one instead of retrying one unpinned body.
Standings: gpu-tall, cpu-tall
150. The host node finder walking occupied cuts: a 23% find win on Apple silicon, a 6% find loss on the standings host class, not shipped (refuted)#
Decision. PR #508 built HistogramNodeSplitFinder a branch-free skip of empty cut cells: a 64-bit occupancy mask per block of 64 cuts (occupied_cuts, vectorised to NEON or SSE2 compares with no data-dependent branch), a walk over the set bits with bit 0 forced so the first cut is always scored, the per-cut scorer in its own function with the scan state in a struct. An empty cut repeats the sums of the cut before it (x plus 0.0 is x, and a round-to-nearest sum from +0.0 of non-negative-zero terms never reads -0.0) and cannot win under the strict gain > best.gain rule, so the walk selects among the same candidates in the same order and every model is the same bytes: the three host hashes held on both arms of the pod, and eight fits plus nine probes were byte-identical to the 2.5.0 wheel at the package boundary. The lever is not shipped. The branch perf/find-skips-empty-cuts (head f437fd31) keeps the code, the two test pins and the invariant entries; the PR is closed unmerged.
Why. Decision 148's reopener assumed the level plane's find reads each child from DRAM. The decomposition refuted that on the laptop: one M2 thread reads 4.6 ns per 8-byte cell, an order of magnitude under one core's stream rate, and the find bucket scales 3.2x from one thread to four, so there the cost is score_candidate's two divides per cut. At the standings cpu-wide cell a level-7 node holds 128 rows over 255 bins, and a throwaway probe counting cells in occupied_cuts read 40% of all cut cells scanned as exact zeros (the hessian-only count was 40.1%: MSE hessians sum exactly, so the sibling subtraction leaves no residue). On the M2 the skip therefore pays: through the bench worker at 8 threads, 10 trees find 7.81 to 5.99 s and train 15.8 to 13.7 s, 30 trees find 20.9 to 16.4 s and train 41.4 to 36.7 s, one thread on five trees 19.1 to 13.6 s. On the x86 host class the same arithmetic is not the bound. A cpu5g pod (AMD EPYC 4564P, 16 vCPU, host load about 60) reads the same 3.9 ns per cell per thread at 12 threads although Zen 4 divides twice as fast, so the find there streams from DRAM at about 25 GB/s and removing 40% of the divides removes nothing, while the walk's bookkeeping per occupied cell (a bit scan, a clear, an indexed load) stays: the tall control, whose 16k-row nodes have no empty cell, reads the find bucket 30% higher on the head, and the wide depthwise find 6% higher. Daniel asked for Pareto improvements in decision 147's round; a change that trades the standings host's wide row for the laptop's is not one.
Measured. Same-pod on the cpu5g pod, 12 threads, OMP_WAIT_POLICY=passive, main 30f8101d against f437fd31, interleaved, min over three reps, r2_test equal per pair and the three host model hashes equal on both arms, train seconds with the find bucket in parentheses; LightGBM and XGBoost as installed from PyPI on the pod:
| cell | variant | main | head | delta |
|---|---|---|---|---|
| cpu-wide 16k x 16384 | depthwise | 94.09 (34.49) | 96.65 (36.70) | +2.7% (find +6.4%) |
| cpu-wide 16k x 16384 | leafwise | 68.90 (29.82) | 69.04 (29.66) | +0.2% |
| cpu-wide 16k x 16384 | levelwise, untouched | 156.67 (90.42) | 157.94 (92.26) | +0.8% |
| cpu-tall 2M x 128 | depthwise | 13.88 (0.48) | 14.02 (0.64) | +1.0% |
| cpu-tall 2M x 128 | leafwise | 13.97 (0.48) | 13.85 (0.63) | -0.8% |
| cpu-tall 2M x 128 | levelwise, untouched | 11.80 (0.72) | 11.74 (0.70) | -0.5% |
| cpu-wide 16k x 16384 | LightGBM | 146.19 | ||
| cpu-wide 16k x 16384 | XGBoost | 317.30 |
The wide depthwise find rose in all three reps (34.70 to 36.70, 34.49 to 37.08, 35.64 to 37.06) and the tall find buckets rose in all nine head cells against their base, so the loss is the walk's cost and not the host's spread. A 100-tree pair on the laptop had earlier read flat with the untouched populate bucket up 6.8% on the second arm: thermal drift on a long laptop run, which is why the pod decides.
Rejected. Skipping with a branch per cell (if (b > 0 && cell_empty(cell)) continue;): on a near-empty cell it read 0.85 s against 0.67 s for main's finder in the same build tree, because a random empty pattern mispredicts about as often as it skips and a mispredict costs more than the two divides it saves. Skipping on a zero hessian alone: a cell with a zero hessian and a nonzero gradient changes the left sum, so the candidate differs and the walk would not be bit-identical. Taking the plain scan for a block whose mask is all ones: that removes the walk's cost at the shallow levels and on the tall cells, but three quarters of the wide find's cells sit at levels 6 and 7 where the mask is sparse, the walk runs, and the host reads no gain, so the wide row would still lose. Shipping the walk for Apple silicon only: the seam would ask the machine above the engine, the tree's hardware_leaks row counts exactly that, and the bit-identical form of the win is 13% of a laptop's wide train, which the standings do not read.
Reopener. On the x86 host class the cpu-wide find is bound by its stream from DRAM, which is decision 148's reopener after all, now with the number: 35 s of a 94 s depthwise train at 25 GB/s. The lever there is traffic, not arithmetic: a find that scans a child's slice run on the thread that just filled and subtracted it, while the run is resident, or a narrower cell than 8 bytes for the histograms the find reads. Either is a change to the level transaction and its own round. On Apple silicon the divides bind and the occupancy walk on the kept branch is the 23% find win, should a host-keyed dispatch ever earn a seam.
151. The level fill walks a mirror tile in 512-feature runs: the wide fill's traffic was the lever, the find's never was (adopted)#
Decision. The host row fill no longer takes a whole 2048-feature mirror tile as one run. fill_sparse walks each tile in sub-slices of k_fill_run_features selected features (512, a 1 MB run at 255 u8 bins), and each sub-slice goes through the unchanged fill, reduce and subtract passes: MirrorSlice::subrange now shifts the mirror base by the run's first feature, which is the lone fill's own recipe and which it now reads from the sub-slice, and a slice remembers whether its tile's selection is dense (tile_selected, read through dense_selection() by both fills) so a run of a dense tile is still addressed densely. The chunk plan, the partial slots and their merge order depend on rows and grain only, so every cell is accumulated in the same order and every model is the same bytes: the three host hashes hold, eight fits and nine probes are byte-identical to the 2.5.0 wheel, and level-fill-matches-lone-nodes pins the mixed level against the nodes filled alone.
Why. Decision 150's reopener named the find's stream from DRAM as the x86 lever. The round began by measuring that claim with the real finder linked under the build's flags, one arena rescanned hot against four 33 MB arenas cycled cold, and on both hosts hot equals cold at every size from 1 to 33 MB and at every thread count: an M2 reads 4.1 to 4.2 ns per cell at one thread and 6.5 at eight (the E-cores), and the cpu5g EPYC 4564P reads 3.3 at one thread and 4.8 to 5.0 at twelve (SMT siblings sharing a core), sparse or dense. The find carries no traffic component anywhere; the 25 GB/s that decision 150 read was twelve threads' arithmetic rate, not a bandwidth ceiling, and the find lever is dead on this evidence. The fill's traffic is real. Decision 148 moved the zeroing and the subtraction onto the thread that fills a run, and its own reopener noted that 128 arenas of 33 MB cannot be resident where the leaf plane's one is: a thread's run was 4 MB, its sibling's another 4 MB, and twelve of those pairs in flight is 96 MB against a 32 MB L3 slice, so all three passes streamed from DRAM. A probe that narrowed the mirror tile itself from 2048 to 512 features, bits unchanged, read the wide depthwise populate 45.76 to 38.85 s and train 77.49 to 71.24 s same-pod with the find untouched, which priced the change before it was written; the shipped form keeps the layout and narrows only the fill's run, so the tall cells, whose 128 features are one run either way, cannot move.
Measured. M2, 8 threads, the cpu-wide cell through the bench worker, 10 trees: populate 8.07 to 4.73 s, train 16.05 to 12.51 s, find 7.88 to 7.70. Same-pod on two cpu5g draws, 12 threads, OMP_WAIT_POLICY=passive, main fe2b0709 against 68c2865c and against the same commit with the run at 1024 and 256 features, interleaved, min over reps, r2_test equal per pair and the three host model hashes equal on every arm, train seconds with populate in parentheses. The first draw is an AMD EPYC 4564P (16 vCPU, 64 MB of L3 in two slices), the tile probe's host and the closer to the standings class:
| cell | variant | main | 512 | delta | 1024 |
|---|---|---|---|---|---|
| cpu-wide 16k x 16384 | depthwise (3 reps) | 78.69 (48.98) | 72.40 (42.27) | -8.0% (populate -13.7%) | 73.72 (43.62) |
| cpu-wide 16k x 16384 | levelwise (2 reps) | 138.27 (58.56) | 125.55 (48.26) | -9.2% (populate -17.6%) | 128.09 (49.74) |
| cpu-tall 2M x 128 | depthwise (3 reps) | 12.28 (8.49) | 12.16 (8.41) | -1.0% | |
| cpu-tall 2M x 128 | leafwise (3 reps) | 12.23 (8.46) | 12.24 (8.45) | +0.1% | |
| cpu-tall 2M x 128 | levelwise (3 reps) | 10.31 (7.43) | 10.38 (7.48) | +0.7% |
The second draw is an AMD Ryzen Threadripper 7960X (24 cores, 128 MB of L3 in four slices), where the 4 MB runs were already largely resident, and it bounds the lever from below: wide depthwise 61.95 (25.86) to 61.21 (24.92) at 512, 61.68 (24.82) at 1024 and 61.45 (25.71) at 256 over two reps; wide levelwise 101.93 (27.94) to 102.45 (27.24) and wide leafwise, on the leaf plane the change does not touch, 49.72 to 49.42 over three; its tall cells swung 20% between reps of one arm under other tenants' load and read nothing. The find bucket is unmoved on every row of both hosts.
Rejected. Narrowing the mirror tile itself (the probe's form): it changes the mirror layout that ingest, the partition's column gather and the leaf plane's blocks all read, and its tall cells read 3 to 4% slower over two reps; the fill-side run needs none of that. Fusing the find into the fill's tail so it scans a resident run, the reopener's own proposal: the microbenchmark reads no difference between a resident and a streamed scan, so there is nothing for residency to give the find. A run width keyed to the host's cache size: hardware_leaks counts a caller asking the machine, and the sweep below shows the width's plateau, so a constant carries it: 512 beats 1024 on both wide cells of the smaller-cache host and ties it on the larger, and 256 gives the gain back.
Reopener. The level plane's populate at cpu-wide is now the fill's arithmetic at 42 s against the leaf plane's 18 to 19 s for the same bytes on the larger host; the leaf plane's lone fill at the same cell is the floor to read it against. The find on both hosts is arithmetic: two divides per cut cell, 3.3 ns on Zen 4 at one thread, and decision 150's occupancy walk reads 2.33 there in the same instrument, its twelve-thread reading owed.
152. The 2.6.0 refresh reads the host plane on the 9575F, where cpu-tall depthwise ties XGBoost and every wide row leads; the GPU cells hold within 0.4% and the tall-cell A/B within 1% (adopted)#
Decision. The 2.6.0 standings supersede 2.5.0's on every axis: ten measured in one session on an RTX PRO 6000 Blackwell Server Edition pod at main 6f5cc6e3, the code axis locally at the same sha, and the CPU A/B on a 16-vCPU cpu5g pod the driver drew on its sixteenth unpinned create, 25 minutes into its 45-minute window, after the standings pod was released. The release's code change is the host level fill walking a mirror tile in 512-feature runs (decision 151) plus two refactors that hold every model hash, and src/cuda has no diff since 2.4.0, so the GPU rows are a regression check and the CPU rows the change, and the entry reads them in that order. The A/B files are keyed 2026-10, the first refresh since decision 146 whose files did not overwrite a same-month predecessor, so check_standings.py --decisions reads this entry for the cells it checks and no older one.
The GPU cells hold. Three-arm A/B on the standings pod (ab-gpu-2026-10.jsonl, anchor 1.15.0 wheel, old 2.5.0 wheel, new 2.6.0 source, interleaved, min over reps, fit seconds): cuda_depthwise 1M x 100 anchor 0.46, old 0.22, new 0.22 s (-0.4% against old); cuda_levelwise 0.89, 0.29, 0.29 (+0.0%); 16M x 100 cuda_depthwise 3.77, 2.41, 2.42 (+0.3%); cuda_levelwise 3.84, 2.34, 2.34 (-0.3%); peak host RSS within 1.7% of old on every cell. Every cell is inside the band against 2.5.0 and reads 36 to 68% under the anchor, the device work of the releases before this one. The standings rows agree: the nine bonsai cells on gpu-tall, gpu-wide and gpu-extreme read 0.2 to 4.2% under 2.5.0's rows with r2 equal to four decimals, and the fused-versus-two-step parity holds at +0.0% fit and +1.7% RSS.
The host plane is read on the 9575F. The pod's CPU is a two-socket AMD EPYC 9575F (256 vCPU host, a 31.1-CPU quota for the container, 175 GB; the quota gate read the cpu-tall cell throttled in 2.5% of its enforcement periods and cpu-wide in 0.6%, under its threshold), the part decision 144 measured and decision 149's reopener named: there bonsai's cpu-tall depthwise read 9% behind XGBoost, with the fill kernel as the residual. On this draw cpu-tall depthwise reads 7.08 s against XGBoost 7.05, a tie under the page's rule; leafwise 7.32 against LightGBM 11.01 and levelwise 6.50 against CatBoost 8.55, bonsai ahead; cpu-wide depthwise 35.3 against XGBoost 86.5, leafwise 26.7 against LightGBM 52.3 and levelwise 51.6 against CatBoost 60.9, bonsai ahead on all three. Against 2.5.0's rows from the 9555 every library moved with the host: XGBoost 13% on cpu-tall and 16% on cpu-wide, CatBoost 5% and 8%, LightGBM 8% and 0%. Bonsai's cpu-wide depthwise and levelwise rows read 21% and 11% under 2.5.0's, more than decision 151's same-pod 8 and 9%, and the difference is the host's share, which the protocol forbids reading across pods; the code's share is decision 151's same-pod tables. r2 is equal to four decimals on every bonsai row of both axes.
The code's verdict on the host plane. Three-arm A/B on the cpu5g pod (ab-cpu-2026-10.jsonl, 16 vCPU as a cpuset with no bandwidth quota, 12 threads, six interleaved reps, min over reps, anchor 1.15.0 wheel, old 2.5.0 wheel, new 2.6.0 source at 6f5cc6e3, fit seconds): cpu-tall 2M x 128 depthwise anchor 12.36, old 10.76, new 10.85 s (+0.8% against old, -12.2% against the anchor); leafwise 14.99, 10.80, 10.75 (-0.5%, -28.3%); levelwise 11.28, 9.80, 9.80 (-0.1%, -13.1%); peak RSS within 0.5% and r2 equal across arms on every cell. The pod's part is a Ryzen Threadripper 7960X with 128 MB of L3, decision 151's second host, where that entry read the tall cells within 1% and the wide lever near zero because the 4 MB runs were already resident; the A/B's cell is the tall one, so it reads what that entry priced for it, which is no drift. The release's wide-cell win lives in decision 151's same-pod tables on the EPYC 4564P and not in the A/B's cell, the same shape as decision 149's release.
Rejected. Measuring the CPU A/B on the standings pod's own CPU: decision 142 read that host's A/B spread at 15 to 22% against cpu5g's 0.7%. Re-drawing for a 64 MB L3 cpu5g part: the A/B measures drift on the tall cell and the 7960X resolves it to 0.7%, and the wide lever's number is decision 151's, which does not need a third host. Reading the cpu rows against 2.5.0's as the release delta: a different part moved every library 5 to 16%, which is the host and not the code. Starting the fallback renter while the driver's window ran: two creates racing for the same stock bill two pods, and the window closed with a pod 20 minutes before it would have expired.
Reopener. The version-keyed A/B files decision 149 owed are still owed; this refresh escaped the collision by the calendar, not by the fix. The driver's CPU create is still one unpinned body retried every 90 seconds (sixteen refusals before the draw); a ladder over flavors and datacenters, which the fallback renter already walks, belongs in the driver. A refresh that draws a 9555 again reads whether the 9575F tie survives decision 151 on that part, where decision 149 read the tie before the lever.
Standings: gpu-tall, cpu-tall
153. MAE, Huber and Quantile renew their leaves on the device: the resident objective arms for the three constant-hessian objectives, and a renewal fit costs what an MSE fit costs (adopted)#
Decision. The device-resident objective of decision 77 arms for MAE, Huber and Quantile. Decision 77 kept them on the host path because a renewal objective replaces each leaf with a statistic of its residuals after the tree is built, and resident mode would have had to download the leaf ids and residuals it had just avoided uploading; that holds only while the renewal itself is host work. It is now device work, with no sort and no library: resident_finalize routes every row of the fit to its leaf once, then selects each leaf's alpha-th residual by radix narrowing, four passes of 8-bit digits over the residual's float bits remapped so unsigned order is numeric order, each pass counting the rows that still match the leaf's settled prefix into a per-leaf digit histogram and one block per leaf settling the next digit of its k-th element (the median for MAE, the configured alpha for Quantile), the same index rule as src/objective.cpp's renew_leaf; Huber adds one pass summing the deviations clamped at delta as fixed-point integers scaled to the row count, so the sum is exact to the scale and independent of the order rows arrive. The renewed value is clamped into the leaf's monotone fence, which the resident node table now carries. Integer counts and integer sums make the renewal deterministic run to run, and its scratch is 4 bytes per row. The renewed values come back to the host per node so the stored tree holds the same leaves the device scored. DeviceObjective is a sum type, one alternative per objective carrying only its own parameters (Huber its delta, Quantile its alpha) and stating its gradient, hessian and loss as constexpr members, which the CUDA compiler treats as callable from device code; the gradient and eval-loss kernels are instantiated on the alternative and read the formula from the type, so no kind enum, no flattened argument struct and no per-kind switch exist anywhere, and the unit-hessian histogram path extends to the three constant-hessian alternatives. The one renewal fit that stays on the host is an oblivious tree under a monotone constraint, whose leaf table is reprojected after renewal (device-leaf-renewal-matches-host pins the three objectives on the three planes against the host renewal, the fence on depthwise, and the byte-identical oblivious monotone fit under the escape hatch). The host planes are untouched by construction and the three host model hashes hold.
Why. A same-pod probe on an RTX PRO 6000 Blackwell Server Edition (EPYC 9555 host, bonsai 2.6.0 at a793136a, XGBoost 3.3.0, LightGBM 4.7.0, CatBoost 1.2.10; 4M x 128, depth 8, 100 trees, 255 bins, 16 threads, alpha 0.9, delta 1.0, two interleaved reps, min) read bonsai's cuda_depthwise MSE fit at 1.15 s against XGBoost 7.55, LightGBM 9.72 and CatBoost 6.78, and its MAE fit at 5.73 s (grow 1.01, host renewal 4.07) against 7.75, 10.33 and 4.83, with Huber 5.93 (1.02, 4.26) and Quantile 5.13 (1.01, 3.48) the same shape: the host renewal, a serial bucket of every row by leaf and one nth_element per leaf, was 68 to 72% of a renewal-objective fit, and the non-resident grow carried another 0.4 s of gradient upload and leaf-id download per fit. CatBoost's GPU MAE and Quantile skip the exact leaf and land at 2.1x and 2.4x bonsai's test loss in 100 rounds; XGBoost's pseudo-Huber and CatBoost's Huber at delta 1 barely leave the initial score, so that column is not a quality-equal comparison. Priced from those buckets, a device renewal at a few radix passes over 4M keys put the three objectives near 1.6 s, within reach of the MSE fit.
Measured. Same pod, a second RTX PRO 6000 Blackwell Server Edition (EPYC 9575F host, driver 595.71.05, 16 threads), main a793136a against the branch at 3bbd1e8f, the probe cell, four interleaved reps, min over reps, fit seconds with the host renewal bucket and the device renewal kernels in parentheses:
| objective | plane | main (host renew) | branch (device renew) | delta |
|---|---|---|---|---|
| mse | depthwise | 1.21 | 1.19 | -1.5% |
| mse | levelwise | 1.20 | 1.19 | -0.7% |
| mse | leafwise | 1.20 | 1.19 | -0.9% |
| mae | depthwise | 5.25 (3.58) | 1.30 (0.05) | -75.3% |
| mae | levelwise | 5.27 (3.58) | 1.27 (0.05) | -76.0% |
| mae | leafwise | 5.28 (3.57) | 1.28 (0.05) | -75.8% |
| huber | depthwise | 5.43 (3.76) | 1.37 (0.15) | -74.8% |
| huber | levelwise | 5.43 (3.75) | 1.41 (0.17) | -74.0% |
| huber | leafwise | 5.45 (3.77) | 1.38 (0.15) | -74.7% |
| quantile | depthwise | 4.76 (3.09) | 1.28 (0.06) | -73.1% |
| quantile | levelwise | 4.75 (3.08) | 1.27 (0.06) | -73.3% |
| quantile | leafwise | 4.74 (3.07) | 1.26 (0.06) | -73.3% |
The device renewal reads 0.5 ms per tree for MAE and Quantile and 1.5 to 1.7 for Huber where the host spent 31 to 38; the grow bucket of a renewal fit falls from 1.00 to 0.67 s, the MSE fit's 0.62 plus the renewal kernels, because the gradient upload and the leaf-id download are gone with it. A renewal objective now costs 7 to 18% over MSE on the same plane, where main read 4.0 to 4.5x; the first draft, the cub sort, read the same fits within 1% on another pod, and the selection renews every leaf to the value the sort did (test metrics equal to every digit), bit-identical across the four reps; on the probe host, where MSE led every reference 5 to 8x, the three objectives were 1.2 to 1.5x behind XGBoost's and LightGBM's standings and now sit where MSE sits. Quality: the branch under BONSAI_HOST_OBJECTIVE=1 reproduces main's test metrics to every printed digit on MAE and Quantile, so the host path is untouched; the resident fit's test MAE reads 1.2e-4 (depthwise, leafwise) and 4.3e-3 (levelwise) relative from main's host fit, Quantile's pinball 2.7e-3 and 5.0e-4, Huber's loss 2e-8, and MSE's 0 because both arms are resident there; main's own MSE fit moves 1.7e-8 in rmse between its host and resident paths, and the sign of the renewal objectives' drift is both ways. That is the resident path's device reduction order flipping a split tie somewhere in 100 trees, the drift decision 77 accepted for the Newton objectives, not a renewal difference: the renewal test's cross-check holds to five decimals on every plane.
Rejected. Downloading leaf ids and residuals and renewing on the host (main's path, decision 77's reason for excluding these objectives): the 4.3 to 5.2 s in the table. The first draft, one cub::DeviceRadixSort over (leaf, residual) keys with segment bounds read off the sorted keys: decision 40 keeps cub out of the library and the mapper fit's sort is hand-rolled for that reason; the sort also moved 24 bytes per row of scratch through five passes and ordered rows by key, which the selection does not need. A per-leaf sort over the plane's row partition: a node that stops splitting above the last level loses its row segment when the level buffer ping-pongs, so only a per-row leaf id is reliably available at the end of a tree, and the selection reads that. A binned or histogram quantile per leaf: it changes the leaves the host would have produced, and CatBoost's GPU takes that trade at 2.1 to 2.4x the test loss. A floating-point sum for Huber's clamped mean: atomics make its order a race, and a fixed-point sum scaled to the row count is exact to 2^-38 of delta at 16M rows. Reading the references on the measuring pod: its host built XGBoost's quantile matrix in 42 s where the probe host took under a second (XGBoost trained in 1.9 s once pinned to 16 cores), so that host's reference fits read the host and not the library, and the probe pod's table stands as the comparison.
Reopener. Huber's fixed-point sum lands 4M atomics on a few hundred addresses and reads 0.10 s per 100 trees more than the two selections; a per-block partial sum would take that back. An oblivious tree under a monotone constraint with a renewal objective still renews on the host because the reprojection of its leaf table is host code; a device reprojection would close the last host round-trip of the resident path. Softmax stays off the resident path as its own design (a per-class gradient plane). The first measuring pod, a 256-vCPU host under a 30.6-CPU quota, stalled one fit in four by 5 to 50 s outside every profiled bucket on both arms, in the ingest and the allocation the fit profile does not lap; the min over reps read through it, and a lap for ingest would let the next round read it directly. Two draws from CA-MTL-3 came up with only the proxy SSH and no direct port, which the driver's wait cannot use; it should read ssh.direct and move to the next datacenter.
154. The host node finder scans eight features in lockstep on vector lanes, bit-identical to the scalar scan, and the level step spreads each node's find across the team (adopted)#
Decision. HistogramNodeSplitFinder no longer walks one feature's cut cells at a time. scan_features groups the plain features of a range (carved, allowed under the node's interaction mask, no monotone constraint) eight to a LaneGroup, and scan_lanes walks their cut cells in lockstep on clang vector types (double __attribute__((ext_vector_type(8)))): the prefix sums, the right-side differences, the missing-cell routing, the hessian floor, the two scores and the strict-greater best update are the scalar scan's operations in the scalar scan's order, one lane per feature, under the build's -ffp-contract=off, so every gain is the same double the scalar scan computes and every tie breaks the same way. A feature under a monotone constraint takes the scalar scan between groups, in feature order, and flush_lanes merges a group's bests with the same strict-greater rule the serial loop used, so the lowest feature id and the first bin still win a tie. On x86-64 the kernel is compiled for AVX2 (__attribute__((target("avx2"))), helpers force-inlined into it) and taken when the CPU reports AVX2; a host without it keeps the scalar scan. On arm64 the lanes lower to NEON. A find range holds at least one lane group (scan_ranges divides the feature count by the lane width before clamping to four ranges per thread). Separately, the host LevelStep::open_level hands its frontier to find_parallel, the batched scan the leaf plane already drives, instead of one node per worker.
Why. The round opened on decision 147's reopener, the level plane's wide fill, and decomposed first. On the M2 (cpu-wide, 16384 x 16384, depth 8, 10 rounds, 8 threads) the depthwise fit reads 18.57 s as find 10.17 plus populate 8.27, and the leafwise fit on the leaf plane reads the same (18.45 as 9.45 plus 8.92, same r2): the level-against-leaf plane gap the x86 pods show is DRAM traffic the M2's unified memory hides, and the find is half the fit on both planes and both hosts. The scalar scan pays two IEEE divisions per cell and runs feature by feature, so the divider sits idle most of each cycle: decision 150 had read the M2 finder as divide-bound, and the hot-equals-cold microbench of decision 151 had already shown the find carries no traffic component. Scanning eight features side by side lets the divisions vectorize across features without changing one operation, which is what keeps the model hashes and the standings' bit identity. The level step's own find had a second, structural loss: one frontier node per worker leaves eleven of twelve workers idle through the first four levels (26 node-rounds per tree against 21.25 at perfect balance), and find_parallel was already the right call, one concept away.
Measured. Bit identity first: a harness linking main's finder beside the branch's (main's split.cpp compiled with its two finders renamed) ran 60000 random nodes through find and find_parallel, with missing cells, L1, hessian floors, min gain, monotone and interaction constraints and uneven bin counts, and read zero mismatches on gain bits, feature, bin, routing and validity; the three model hashes hold on the M2, on both pods and in CI's x86 Linux hash job; every A/B row below reads the same r2.
Same pod, cpu5g EPYC 9754 (Zen 4c, AVX2 taken), 12 threads, main 3d01dc97 against the branch at 774c209e (the PR head differs by a preprocessor spelling and a range-sizing rule the wide cell never reaches; assembly byte-identical for the former), min over reps, train seconds with the find and populate buckets:
| cell | grower | reps | main train (find / populate) | branch train (find / populate) | train delta | find delta | r2 |
|---|---|---|---|---|---|---|---|
| cpu-wide | depthwise | 3/3 | 133.40 (62.66 / 68.13) | 98.63 (29.65 / 66.72) | -26.1% | -52.7% | same |
| cpu-wide | leafwise | 3/3 | 88.34 (50.61 / 37.15) | 64.81 (28.73 / 35.54) | -26.6% | -43.2% | same |
| cpu-wide | levelwise | 1/1 | 208.91 (136.44 / 70.15) | 206.21 (135.30 / 68.77) | -1.3% | -0.8% | same |
Its microbench (16384 features x 128 rows, four arenas cycled cold or one rescanned hot, min of two reps):
| microbench | main ns/cell | branch ns/cell | delta |
|---|---|---|---|
| hot, 1 thread | 5.59 | 3.24 | -42% |
| hot, 12 threads | 8.89 | 5.20 | -42% |
| cold, 1 thread | 5.53 | 3.23 | -42% |
| cold, 12 threads | 8.95 | 4.34 | -52% |
That pod's cpu-tall rows read the find 58 to 64% slower at 774c209e: the range rule had not landed yet, and the tall read below is the record for it.
Same pod, cpu5g EPYC 4564P, 12 threads, main 3d01dc97 against the branch at 279bacf3, the SSE2 draft that preceded the AVX2 dispatch, three reps, min:
| cell | grower | reps | main train (find / populate) | branch train (find / populate) | train delta | find delta | r2 |
|---|---|---|---|---|---|---|---|
| cpu-wide | depthwise | 3/3 | 68.65 (30.83 / 37.15) | 65.73 (27.63 / 37.42) | -4.2% | -10.4% | same |
| cpu-wide | leafwise | 3/3 | 55.86 (25.88 / 29.53) | 57.76 (27.73 / 29.56) | +3.4% | +7.1% | same |
| cpu-wide | levelwise | 3/3 | 119.45 (76.21 / 42.58) | 119.14 (76.03 / 42.39) | -0.3% | -0.2% | same |
| cpu-tall | depthwise | 3/3 | 10.00 (0.42 / 7.14) | 11.04 (1.08 / 7.30) | +10.4% | +157.1% | same |
| cpu-tall | leafwise | 3/3 | 10.55 (0.43 / 7.37) | 11.14 (1.07 / 7.30) | +5.6% | +148.8% | same |
| cpu-tall | levelwise | 3/3 | 8.99 (0.55 / 6.51) | 9.03 (0.55 / 6.53) | +0.5% | +0.0% | same |
| microbench | main ns/cell | branch ns/cell | delta |
|---|---|---|---|
| hot, 1 thread | 3.23 | 3.22 | -0% |
| hot, 12 threads | 4.75 | 5.47 | +15% |
| cold, 1 thread | 3.19 | 3.41 | +7% |
| cold, 12 threads | 4.67 | 4.99 | +7% |
The SSE2 draft is the refutation that shaped the dispatch: at the generic x86-64 baseline the eight-wide selects lower to and/andnot/or triples, the kernel issues more micro-ops per cell than the scalar scan, and under SMT it loses what the scalar scan's latency-bound chains hide, so a host without AVX2 keeps the scalar scan. The same table's cpu-tall rows read the find 2.5x slower for a second reason: 48 ranges over 128 features put three features in each range, so the kernel ran five lanes idle; a range now holds at least one lane group.
Same pod, cpu-tall after the range rule, cpu5g EPYC 4564P again, three reps on the tall cells and one on the wide, main 3d01dc97 against the branch at 82370a58:
| cell | grower | reps | main train (find / populate) | branch train (find / populate) | train delta | find delta | r2 |
|---|---|---|---|---|---|---|---|
| cpu-wide | depthwise | 1/1 | 68.66 (30.76 / 37.24) | 54.87 (16.65 / 37.60) | -20.1% | -45.9% | same |
| cpu-wide | leafwise | 1/1 | 56.02 (25.92 / 29.66) | 48.48 (17.89 / 30.14) | -13.5% | -31.0% | same |
| cpu-tall | depthwise | 3/3 | 9.95 (0.42 / 7.10) | 10.24 (0.25 / 7.30) | +2.9% | -40.5% | same |
| cpu-tall | leafwise | 3/3 | 10.49 (0.42 / 7.34) | 10.25 (0.25 / 7.30) | -2.3% | -40.5% | same |
| cpu-tall | levelwise | 1/1 | 9.07 (0.55 / 6.57) | 9.00 (0.55 / 6.52) | -0.8% | +0.0% | same |
| microbench | main ns/cell | branch ns/cell | delta |
|---|---|---|---|
| hot, 1 thread | 3.20 | 1.76 | -45% |
| hot, 12 threads | 4.71 | 2.69 | -43% |
| cold, 1 thread | 3.19 | 1.89 | -41% |
| cold, 12 threads | 4.74 | 2.81 | -41% |
M2 (8 threads, 4 performance and 4 efficiency cores): hot microbench 16384 features x 128 rows, 4.29 to 3.14 ns per cell at one thread and 6.35 to 5.07 at eight; cpu-wide depthwise at 10 rounds, interleaved min, 14.61 (find 8.39) to 11.63 (find 6.32).
Rejected. A single division per candidate (the two scores over a common denominator): one rounding away from the scalar gain, so a near-tie can flip and the hashes move; not bit-identical, not taken. A reciprocal with Newton refinement: the same objection. The loop vectorizer on a plain eight-lane array loop: it declined the gathers and mixed-width selects, and #pragma clang loop vectorize(enable) is a hard error under -Werror, so the lanes are explicit vector types. Fusing the find into the level fill while a run is hot (decision 147's reopener as written): decision 151's microbench reads the find hot equal to cold at every size and thread count on both hosts, so there is no traffic to save there, and the arena still has to persist as the next level's parents. The occupancy-mask finder of decision 150 is not reopened by this: it skipped cells, this scans every cell faster, and the two could compose on the M2 where the mask won.
Reopener. The level finder (update_best_for_feature_for_level, the levelwise grower's shared split) is still the scalar scan over parents and bins and reads 76 s of the cpu-wide levelwise fit on the 4564P; the same lockstep over eight features applies. AVX-512 on the Zen 4 EPYCs would halve the divide instruction count again with a second target clone. The populate bucket is now the larger half of every wide row on x86 (37 to 42 s of 66 to 69 on the 4564P), and its traffic is the arena's zero, subtract and write-back, which the next perf turn on the wide row should price against a leaf-at-a-time level transaction.
Status 2026-11-09: a feature under a monotone constraint takes the lanes too, each lane carrying its direction and the node's leaf bounds, and a scan range starts on a multiple of eight features (decision 169). The scalar node scan remains only for an x86-64 host without AVX2.
155. The 2.7.0 refresh reads the host plane on the 9535, where the lane finder's wide rows fall while every reference library rises with the host; the GPU cells hold within 0.6% and the tall-cell A/B within 2% (adopted)#
Decision. The 2.7.0 standings supersede 2.6.0's on every axis: ten measured in one session on an RTX PRO 6000 Blackwell Server Edition pod at main f2ed8753, the code axis locally at the same sha, and the CPU A/B on a 16-vCPU cpu5g pod at EUR-IS-1 after the standings pod was released. The release's code changes are the host node finder scanning eight features in lockstep with the level step's batched find (decision 154) and the three renewal objectives moving onto the device (decision 153), both pod-validated same-pod in their own entries, plus the refactors of the two ratchet turns, all holding every host model hash. The A/B axes read the lane finder only through the tall cell, where decision 154 priced it within 3%, and the renewal lever not at all, since the A/B cells fit MSE, so the A/B is a drift check and the wide standings rows are where the release's CPU change shows; the entry reads them in that order.
The GPU cells hold. Three-arm A/B on the standings pod (ab-gpu-2026-10.jsonl, anchor 1.15.0 wheel, old 2.6.0 wheel, new 2.7.0 source, interleaved, min over two reps, fit seconds): cuda_depthwise 1M x 100 anchor 0.47, old 0.25, new 0.25 s (+0.4% against old); cuda_levelwise 0.89, 0.31, 0.31 (+0.6%); 16M x 100 cuda_depthwise 3.86, 2.53, 2.53 (-0.3%); cuda_levelwise 3.93, 2.46, 2.45 (-0.2%); peak host RSS within 1.8% of old on every cell. Every cell is inside the band against 2.6.0 and reads 35 to 65% under the anchor. The fused-versus-two-step parity holds at -0.6% fit and +1.5% RSS. The nine bonsai cells on gpu-tall, gpu-wide and gpu-extreme read 0.4 to 1.8 s of fit total against 2.6.0's 0.5 to 1.7 on the 9575F, r2 equal to three decimals, and CatBoost's gpu-extreme row is an OOM at the container size, as it was.
The host plane is read on the 9535. The pod's CPU is an AMD EPYC 9535 (256 vCPU host, a 27.2-CPU quota for the container, 175 GB; the quota gate read cpu-tall throttled in 3.4% of its enforcement periods and cpu-wide in 1.0%, under its threshold), a part slower than 2.6.0's 9575F on every reference library: XGBoost's cpu-tall train reads 6.7 s against 5.6, LightGBM 10.3 against 9.1, CatBoost 9.4 against 8.3, and on cpu-wide XGBoost 100.8 against 84.3 and CatBoost 68.9 against 60.7, with LightGBM flat at 44.5 against 44.8. bonsai's tall rows moved with the host, depthwise 6.7 against 6.2, leafwise 7.2 against 6.5, levelwise 6.3 against 5.7, so cpu-tall depthwise ties XGBoost at 6.7 under the page's rule, as it did on the 9575F, and leafwise and levelwise lead. bonsai's wide rows moved against the host: depthwise 27.6 s against 34.1 and leafwise 21.6 against 25.6, 16 to 19% down on a part that put every reference library 0 to 20% up, which is decision 154's lever (same-pod -20 and -26% on two EPYC parts) read through a host change; levelwise, whose level finder is that decision's reopener and carries no lever, moved with the host at 60.8 against 50.5. Cross-pod timings are not deltas and this entry does not publish them as such; the direction against the host is the reading. Every wide row leads its reference library and the quality axes hold rank, the bonsai rows unchanged by construction and the device reference libraries moving in the fourth decimal.
The code's verdict on the host plane. Three-arm A/B on the cpu5g pod (ab-cpu-2026-10.jsonl, 16 vCPU as a cpuset with no bandwidth quota, 12 threads, six interleaved reps, min over reps, anchor 1.15.0 wheel, old 2.6.0 wheel, new 2.7.0 source at f2ed8753, fit seconds): cpu-tall 2M x 128 depthwise anchor 13.31, old 11.29, new 11.34 s (+0.4% against old, -14.8% against the anchor); leafwise 13.87, 11.52, 11.30 (-1.9%, -18.6%); levelwise 11.99, 10.12, 10.22 (+0.9%, -14.8%); peak RSS within 0.5% and r2 equal across arms on every cell. The tall cell's find is 4% of its fit, so the lane finder reads as noise there, which is what decision 154 priced; the pod script tags the host cpupod-16cpu and the session did not record the part.
Rejected. Reading the cpu-wide rows against 2.6.0's as the release delta: the part changed, and decision 154's same-pod tables are the measurement. Re-measuring the CPU A/B at the wide cell: the gate's cell is the tall one by decision 122, and the wide lever's number already exists. Letting the driver's CPU session stand: its first cpu5g pod could not populate the build's FetchContent dependencies, GitHub refusing anonymous git from the pod's address, and the session ended on a quota marker that a relaunch by hand produced rather than a gate, so the marker was discarded and the A/B rerun on a second pod with the dependency repositories mirrored from the laptop, the pod script otherwise as the driver runs it.
Reopener. The pod script's build fetches four dependencies from GitHub at configure time, which one address's rate limit can refuse; a dependency bundle shipped with the pod script, or FETCHCONTENT_SOURCE_DIR pointed at a vendored tree, removes the fetch. The version-keyed A/B files of decisions 149 and 152 are still owed. A refresh that draws the 9575F again reads the lane finder's wide rows on a part that has 2.6.0's rows for the same cells.
Standings: gpu-tall, cpu-tall
156. The pod build takes its FetchContent sources from the image through BONSAI_DEPS_DIR, so a configure never asks GitHub (adopted)#
Decision. CMakeLists.txt reads BONSAI_DEPS_DIR, a directory holding one pre-cloned checkout per declared dependency (Catch2, CLI11, tomlplusplus, json), and sets each dependency's FETCHCONTENT_SOURCE_DIR to its checkout when git describe --tags --exact-match there reads the declared tag; a checkout at another tag is named in a status message and that dependency fetches as before, so a drift between the image's clones and the declarations can only cost a fetch, never build the wrong version. The CI image, which has baked the four clones at /opt/deps since its first version, now sets BONSAI_DEPS_DIR=/opt/deps in its ENV, and the pod script exports the same default so images built before the ENV serve the clones too. An explicitly set FETCHCONTENT_SOURCE_DIR_<NAME> is left alone.
Why. The 2.7.0 refresh's CPU A/B pod (decision 155) could not configure: GitHub refused anonymous git from the pod's address with could not read Username, after the bonsai clone on the same address had succeeded, and the lane finder round's first pod session (decision 154) failed the same way. The image's Dockerfile had carried the clones and a comment saying pods point CMake at them, but no caller ever did: the Makefile's configure names no source directory and the pod script runs make python, so every pod configure cloned the four repositories from GitHub, four anonymous requests per build on an address shared with other tenants. The fix belongs where the knowledge is: the build system knows the declared tags, the image knows where it put the clones, and the guard between them is a tag read, not a convention.
Measured. Locally, with GitHub cut by a dead proxy: a configure with no BONSAI_DEPS_DIR fails on the first clone (the control); the same configure with BONSAI_DEPS_DIR pointed at four shallow checkouts at the declared tags completes in 0.7 s with four FETCHCONTENT_SOURCE_DIR entries in the cache; with the json checkout's tag deleted the status message names the directory and the dependency fetches, which fails under the cut, so the guard chose the fetch. The test binary built from the baked configure, GitHub still cut, passes the host suite (558 cases, 225 cuda skipped), so the shallow checkouts are complete sources, not stubs. The ordinary make python without the variable builds as before and scripts/model_hash.py reads 55c6fe308852d9bb. On a cpu5g pod at the address the 2.7.0 session drew (the image's ENV unset, as every image before this change), with github.com pointed at loopback in the pod's hosts file after the bonsai clone: make python without the variable fails at Failed to clone repository, and with BONSAI_DEPS_DIR=/opt/deps it configures and builds the extension in 48 s with four source-dir entries in the cache and the module importing.
Rejected. Mirroring the repositories from the laptop at session time (the 2.7.0 recovery): it ships 37 MB per session, carries the laptop's file ownership into the pod (git refuses the mirrors as dubiously owned until chowned) and duplicates clones the image already holds. A GitHub token on the pod for authenticated clones: a credential on rented hardware for a problem the image had already solved. FETCHCONTENT_FULLY_DISCONNECTED: it silences the fetch for every dependency at once and gives a missing checkout a cryptic failure instead of a fetch.
Reopener. The pod script still clones bonsai itself from GitHub, one anonymous request per session, which the same rate limit can refuse; the driver holds the repository and could ship it. The image's clones and the declarations are two homes for the four tags, reconciled by the tag guard rather than by one source.
157. The host level finder scans eight features in lockstep, parent by parent, bit-identical to the scalar level scan (adopted)#
Decision. HistogramLevelSplitFinder::find no longer scores one feature at a time over a prefix array. scan_level_group takes eight features per task, and accumulate_level walks each parent of the frontier once over those features' cut cells on the node finder's lanes (gather_cells, LaneGroup): the running sums narrow to float exactly where fill_prefix stored them, the right-side differences, the missing-cell routing, the hessian floor and the two scores are the scalar scan's operations in the scalar scan's order (lane_candidate, the half of offer_direction the node finder also runs), and each lane adds its parent's children score, or the parent's own score where the cut is infeasible, into a per-bin, per-direction accumulator in parent order. After the last parent offer_level subtracts the summed parent score and offers bins in order under the strict first-best rule, and merge_lanes merges in feature order, so every gain, every tie, every routing bit matches the scalar level scan. On x86-64 the two kernels are the AVX2 clone of decision 154 and taken when the CPU has it; a host without AVX2 keeps the per-feature scalar scan (update_best_for_feature_for_level), which also stays as the oracle the pin compares against. The task grain is a group of eight features: 2048 tasks on the wide cell, 16 on the tall one.
Why. Decision 154's first reopener. The round decomposed first: on the M2 (cpu-wide 16384 x 16384, depth 8, 10 rounds, 8 threads) the levelwise fit reads 32.9 s as find 27.6 plus populate 5.3, so the level finder is 84% of the row and 4.75x the lane node finder's 5.8 s on the same data. The scalar level scan ran feature by feature, bin-major over the frontier with the prefix sums filled into a thread-local array first, two IEEE divisions and a feasibility branch per (parent, bin) candidate and the histogram and missing cell re-indexed for each. Priced from the node finder's per-cell cost, the lockstep walk should bring the find to 6 to 8 s on the M2, three to four times the saving of any other lever on the table, so the round spent its pod here.
Measured. Bit identity first. A pin in test_split_level.cpp (lane-level-scan-matches-scalar-scan) runs 300 random frontiers (1 to 24 parents, 1 to 20 features, 1 to 256 bins per feature, missing cells on half the draws, empty parents, L1, hessian floors, min gain) through the finder and a scalar level scan written in the test, comparing gain bits, feature, bin, routing and validity; it fails when the reference drops the parent-score fallback. A harness linking main's split.cpp beside the branch's ran 12000 random frontiers (up to 40 parents and 40 features, four bin distributions, zero-row parents) and read zero mismatches, with the node finder's 12000 nodes still at zero. The three model hashes hold on the M2 and on the pod for both arms, and every A/B row reads the same r2. The node finder is untouched: its scan_lanes and scan_features compile to the same bytes before and after on arm64 and x86-64.
Same pod, cpu5g EPYC 4564P (AVX2 taken, AVX-512 present and unused), 12 threads, main fb3fa51f against the branch at 18544dca, min over reps, train seconds with the find and populate buckets; the depthwise rows are the control for an unchanged kernel on the same pod:
| cell | grower | reps | main train (find / populate) | branch train (find / populate) | train delta | find delta | r2 |
|---|---|---|---|---|---|---|---|
| cpu-wide | levelwise | 2/2 | 124.25 (80.17 / 43.41) | 74.19 (29.96 / 43.58) | -40.3% | -62.6% | same |
| cpu-wide | depthwise (control) | 1/1 | 56.42 (17.25 / 38.54) | 56.53 (17.52 / 38.36) | +0.2% | +1.6% | same |
| cpu-tall | levelwise | 3/3 | 8.79 (0.55 / 6.44) | 8.86 (0.31 / 6.59) | +0.7% | -43.6% | same |
| cpu-tall | depthwise (control) | 1/1 | 10.65 (0.26 / 7.56) | 10.73 (0.26 / 7.63) | +0.7% | +0.0% | same |
M2 (8 threads), the wide cell at 10 rounds, min of two interleaved reps: levelwise train 33.87 to 12.11 s, find 28.82 to 7.60, populate within noise. The tall cell's 16 tasks over 12 workers cost nothing visible: its find reads 44% under main and its train within the populate bucket's spread.
Rejected. Lanes across parents (eight parents per vector): the per-bin sum over the frontier becomes eight partial sums and a horizontal add, a different summation order, so gains move in the last bits and the levelwise hash moves; not bit-identical, not taken. The bin-major loop kept with a lane-wide prefix array ([parent][bin][lane], 2 MB per group at depth 7): the same arithmetic, but a 2 MB walk per group where the parent-major walk streams each parent's eight cut-cell rows once and keeps a 16 to 32 KB accumulator in L1; chosen by traffic, not measured against. A double-precision prefix, dropping the float rounding fill_prefix stores: one rounding away from today's gains, so the levelwise hash moves; it reopens only as a stated identity change. A bin-range split of each group for the tall cell's grain: the walking it duplicates was not bought because the tall find already reads -44% with the fit flat.
Reopener. The populate bucket is now 59% of the cpu-wide levelwise row (43.4 of 74.2 s on the 4564P), the level plane's own wide fill that decision 147 reopened and decision 151 last moved. The pod reads avx512f, avx512bw, avx512dq and avx512vl on the 4564P, so a second target clone of both lane kernels at sixteen lanes is a measurable lever on the Zen 4 standings hosts. A frontier with few features on a wide team leaves part of the team idle during the level find (16 groups over 12 workers on the tall cell); a bin-range split of a group would restore the grain if a cell ever shows it.
158. The release A/B files are named by the release their new arm fitted (adopted)#
Decision. scripts/standings_refresh.py supersede commits each plane's A/B as benchmarks/results/ab-<plane>-<version>.jsonl, the version the file's own new arm reports with its +source suffix dropped (ab-cpu-2.7.0.jsonl), in place of the year and month of the axis file it was staged beside. An A/B whose new arm carries no version refuses the supersede instead of taking a guessed name. The parity file keeps its month: it is the anchor axis's companion and supersedes with that axis's dated file. Nothing else moves. The registry's ab entry, the claim gate and the renderer read whatever name the registry holds, and a release measured in more than one session (2.4.0 took three) keeps its name and supersedes in place as before. The ab-*-2026-10.jsonl names the registry holds today stay until the next refresh replaces them.
Why. Decision 146 found the collision: the claim gate passes a moved A/B when an entry tagged with the axis cites the file by name, and with the file named by month, 2.2.0, 2.3.0 and 2.4.0 each overwrote the last's rows under ab-cpu-2026-09.jsonl while decisions 127 and 142 went on satisfying the gate for cells they never measured. Decisions 149, 152 and 155 each recorded the fix as owed, and 2.6.0 and 2.7.0 collided the same way under the October names. The version is already in the rows, since every arm records the wheel or build it fitted and the verdict header reads it, so the name now states what the file measured and a second release in one month gets its own file.
Rejected. Keying by version and measured sha: unique per tree, but the A/B rows carry no sha (the axis files do), and a name that cannot be read back from the file's own rows is one the gate cannot check. Keying by the day of the supersede: the day a session was staged is not a property of its rows. Keeping superseded A/B files in the tree: the protocol deletes superseded artifacts of either class, and git history is the archive.
Reopener. A routine refresh at an already released version (the source arm reads the released number until the next bump) writes the release's name and supersedes that release's rows under it. If such a refresh ever moves a verdict, the name should carry the measured sha the way the axis files do, which means the A/B harness stamping git_sha on its rows first.
159. A node with no rows carries no histograms: the level fill leaves it without an arena and the level finder skips it (adopted)#
Decision. NodeHistograms::clear drops a node's slot table and arena, and the level fill (carve_and_fill) applies it to every node whose row list is empty instead of zeroing a full arena for it. HistogramLevelSplitFinder::find builds the list of parents that carry histograms once per level (LevelParents) and scans only those; the three sibling subtractions (finish_split, finish_split_totals, subtract_level) skip a child without histograms, so its larger sibling keeps the parent's cells untouched. The node finder was already closed to such nodes (cannot_split reads hists.empty()), and depthwise demotes a split with an empty child before its finder runs, so only the oblivious grower's path changes.
Why. An oblivious level's shared split applies to every frontier node, so a node whose rows all route one way leaves an empty child, and an empty parent's whole subtree stays in the frontier to the last level. Each empty smaller child took a full arena: zeroed run by run (the carve lap), handed to the level finder, which gathered its cells like any other parent's. Counted on the cpu-wide cell on the M2 over 40 trees: 863 of 5080 smaller children carried no rows (17%), 504 of 2560 at the deepest fill level (20%), in whole-subtree bursts once boosting reused a feature within a tree (none in the first four trees). Same-pod 4564P profiles from decision 157's session read the carve lap at 6.5 s for levelwise against 0.35 s for depthwise with the same fill on the same cell. The skip is bit-identical: an empty parent's parent score and both children's scores are zero at every candidate, so dropping it from the level sums leaves every accumulator unchanged (zero-parent-moves-no-level-split pins the parent of zeros, the same parent with no histograms, and that parent at the front of the frontier; the lane pin's random frontiers mint empty parents too). All three model hashes hold; 60 levelwise trees on the wide cell, a wide cell with 5% missing values, and a tall cell predict bit-identically on both arms with byte-identical pickles.
M2 (40 trees, 8 threads, min of two interleaved reps): cpu-wide levelwise train 62.69 to 55.82 s (-11%), find 42.39 to 36.02 (-15%), carve 0.86 to 0.08, populate 20.03 to 19.55, peak RSS 7.09 to 6.58 GB, r2 equal. The laptop's single depthwise rep swung +13% under thermal load; the pod's controls below are the reading.
Same-pod (EPYC 7763 at US-NE-1, cpu5g out of stock everywhere, 12 threads, 100 trees, min over reps, r2 identical on every cell): cpu-wide levelwise train 115.13 to 91.24 s (-20.8%), find 61.63 to 42.45 (-31%), carve 5.15 to 0.38, fill 46.28 to 47.04 (inside the fill's own spread, 46.3 to 47.7 between one arm's reps), peak RSS 7.85 to 7.72 GB; cpu-wide depthwise control 87.55 to 89.36 (+2.1%, one rep, find 38.9 both, populate 47.0 to 49.0); cpu-tall levelwise 17.47 to 17.45 (-0.1%), find 0.58 to 0.48; cpu-tall depthwise control 22.30 to 23.10 (+3.6%, one rep, populate +4% with find equal). The gain is the empty parents' share of the level finder plus the carve lap, and nothing else moved.
Rejected. A shared read-only arena of zeros that every empty node views, so readers stay unaware: the finder would still gather and score 4M cells per empty parent, and the sibling subtraction would still read them. Demoting an oblivious split whose child is empty, as depthwise does: the oblivious leaf table is a perfect tree indexed by path, so the empty node is the structure, not an accident of it. Skipping empty parents in the finder only, keeping the zeroed arena: the carve lap and the memory stay.
Reopener. A tiny node costs what an empty one did: the fill zeroes and the finder scans a full arena of n_features x 256 cells for a node of 5 rows, because both are priced per cell, not per row. At depth 7 on the wide cell a quarter of the frontier holds fewer rows than one feature has bins. A node representation that is sparse below some row count is the general form of this change, and a change to the finder's gather, so its own round.
160. The 2.8.0 refresh reads the host plane on a slower 9554, where every library rises with the host and only the cpu-wide levelwise row falls; the GPU cells hold within 1.5%, the tall-cell A/B reads the level levers at -4.2% and the wide cell, added to the A/B for good, reads them at -46% (adopted)#
Decision. The 2.8.0 standings supersede 2.7.0's on every axis: ten measured in one session on an RTX PRO 6000 Blackwell Server Edition pod at main 37395c63, the code axis locally at the same sha, and the CPU A/B on a 16-vCPU cpu5g pod rented by the driver's new create ladder on its first rung after the standings pod was released. The release's code changes are the host level finder scanning eight features in lockstep (decision 157) and the empty node carrying no histograms (decision 159), both pod-validated same-pod in their own entries on the cpu-wide levelwise cell, plus decision 158's version-keyed A/B files and the ladder itself, exercised live here for the first time: the A/B rows commit as ab-gpu-2.8.0.jsonl and ab-cpu-2.8.0.jsonl, and the supersede retired the month-keyed 2.7.0 files the way it retires any superseded results file.
The GPU cells hold. Three-arm A/B on the standings pod (ab-gpu-2.8.0.jsonl, anchor 1.15.0 wheel, old 2.7.0 wheel, new 2.8.0 source, interleaved, min over two reps, fit seconds): cuda_depthwise 1M x 100 anchor 0.51, old 0.26, new 0.26 s (+0.0% against old); cuda_levelwise 0.94, 0.33, 0.33 (+1.5%); 16M x 100 cuda_depthwise 4.24, 2.81, 2.83 (+0.9%); cuda_levelwise 4.26, 2.74, 2.73 (-0.3%); peak host RSS within 0.6% of old on every cell and r2 equal across arms. Every cell is inside the band against 2.7.0 and reads 33 to 65% under the anchor. The fused-versus-two-step parity holds at +0.1% fit and +1.5% RSS. Neither lever touches a CUDA plane, so the hold is the expected reading.
The host plane is read on the 9554. The pod's CPU is an AMD EPYC 9554 (the quota gate read cpu-tall throttled in 1.6% of its enforcement periods and cpu-wide in 0.6%, under its threshold), the part 2.4.0's rows were read on and a slower one than 2.7.0's 9535 for every reference library: XGBoost's cpu-tall train reads 15.6 s against 6.7, LightGBM 32.4 against 10.3, CatBoost 15.1 against 9.4, and on cpu-wide XGBoost 193.3 against 100.8, LightGBM 78.1 against 44.5 and CatBoost 104.9 against 68.9. The GPU reference libraries' host-side work moved with it too (XGBoost's gpu-tall ingest 22.1 s against 12.6, LightGBM's gpu-extreme fit 166 against 106) while bonsai's GPU fits stayed flat (gpu-tall 2.3 s, gpu-wide 3.7, gpu-extreme 10.1 against 9.8), the device-bound reading. bonsai's tall rows moved with the host, depthwise 9.6 against 6.7, leafwise 10.6 against 7.2, levelwise 9.8 against 6.3, and so did its wide depthwise and leafwise rows (44.3 against 27.6, 33.8 against 21.6); cpu-tall depthwise leads XGBoost by 38% where the 9535 read a tie, 2.4.0's 44% on the same part. The one row that fell against the host is cpu-wide levelwise, 53.0 s against 60.8, decisions 157 and 159 read through a host change that moved every other row up by 40 to 60%. Cross-pod timings are host reads, not release deltas; the levers' numbers are the same-pod tables in their own entries.
The code's verdict on the host plane. Three-arm A/B on the cpu5g pod (ab-cpu-2.8.0.jsonl, 16 vCPU as a cpuset with no bandwidth quota, 12 threads, six interleaved reps, min over reps, anchor 1.15.0 wheel, old 2.7.0 wheel, new 2.8.0 source at 37395c63, fit seconds): cpu-tall 2M x 128 depthwise anchor 13.34, old 11.36, new 11.35 s (-0.1% against old, -14.9% against the anchor); leafwise 13.83, 11.23, 11.32 (+0.8%, -18.2%); levelwise 11.87, 10.17, 9.74 (-4.2%, -17.9%); peak RSS within 0.5% and r2 equal across arms on every cell. The levelwise cell is the one both levers reach, and at the tall cell their share of the fit is the find's share there, so -4.2% is the priced reading; depthwise and leafwise are untouched by either lever and read as noise. Quality: bonsai's mean rank 1.42 with 32 wins of 55 and never last, lgbm 1.58.
The wide cell, same pod. The release's headline cell is cpu-wide (16384 x 16384), where decisions 157 and 159 were priced, and the tall-only A/B left it with no same-pod number; the standings rows cannot supply one because the 9554 ran the untouched growers 54 to 59% slower than the 9535. So the same three-arm protocol ran at the wide cell on a second CPU pod, a cpu3c 16-vCPU cpuset (AMD EPYC 9754) that the create ladder reached on its fourth rung after cpu5g, cpu5c and cpu3g refused, 12 threads, two interleaved reps, min over reps, fit seconds: levelwise anchor 228.5, old 209.0, new 112.9 s (-46.0% against 2.7.0, -50.6% against the anchor); depthwise 155.1, 102.4, 103.8 (+1.4%, -33.1%); leafwise 103.3, 70.9, 71.2 (+0.4%, -31.1%); peak RSS within 1.4% and r2 equal across arms on every cell, the reps within 1.5% of each other on every arm. The two levers compound as priced: decision 157's -40% and decision 159's -21% multiply to -53% on their own hosts, and -46% is that product read on a third part. Depthwise and leafwise, which neither lever touches, hold within the band. The rows join ab-cpu-2.8.0.jsonl beside the tall cell's, and from this release the cpu A/B fits both cells by default (the driver's AB_CPU_AXES, six reps at tall and two at wide), so the next release's refresh reads its wide cell without being asked.
Rejected. Reading the cpu-wide rows against 2.7.0's as the release delta: the part changed, and the levers' same-pod tables are the measurement. Substituting a GPU host when the probe read no RTX PRO 6000 stock at 19:45 UTC: the axes are pinned to the part by decision 127, so the refresh waited twenty minutes for stock instead. Keeping the retired month-keyed A/B files beside the version-keyed ones: the registry's ab key names one file per axis, and the superseded file lives in history like every superseded results file.
Reopener. A refresh that draws the 9535 or the 9575F again reads the two level levers' wide rows on a part that has 2.7.0's rows for the same cells. The wide A/B ran on cpu3c (EPYC 9754) where the tall A/B ran on cpu5g, so one file holds two hosts' rows; the A/B rows carry no host field, and the next change to standings_ab.py should stamp one. The code axis reads carve_and_fill at the gate (12) after the empty-node branch: a split target for the next refactor turn.
Standings: gpu-tall, cpu-tall
161. Multi-target regression grows one tree per target per round; K-wide leaves are declined by measurement (adopted)#
Decision. A regression fit on K targets (objective.n_targets, read off the label block's width) grows K trees per round, each on its own target's gradient, the shape MulticlassBooster already gives K classes: MultiOutputBooster<Obj, Gr, Sa> keeps an n x K score matrix, gathers each target's column once so the 1-D objective's compute, init_score and renew_leaf run unchanged, and answers predict with n x K, pred_contribs with n x K x (p + 1) and eval with the objective's loss pooled over the block. The Dataset carries an n_rows x n_targets row-major label block and views gather it by row; the Python Dataset and BonsaiRegressor take a 2-D y. targets is admitted beside outputs by a rule: targets are what the data carries (label columns), outputs are what the model emits (score columns), and a classifier serves one target with K outputs, so the two counts are not one concept. No histogram engine changes: a K-output fit with every row selected predicts bit-identically to K separate single-target fits (pinned), so the model hashes hold and the engines stay single-width.
Why. The alternative, one tree per round with K-wide leaves (a split criterion summed over the targets, K gradient lanes per histogram cell), was priced on the reference libraries before any engine code (benchmarks/multitarget-tradeoff-2026-10.md, scripts/probe_multitarget.py): xgboost's multi_strategy toggle and catboost's MultiRMSE against their own per-target siblings on six Mulan multi-target sets and a synthetic multi-horizon set, 200 rounds, depth 6, 255 bins. Shared structure lost on five of seven by 4.5 to 18% aRRMSE (rf1 +10.9%/+15.2%, rf2 +11.8%/+18.1%, scm1d +4.6%/+5.9%, scm20d +4.5%/+5.6%, enb +5.1%/+7.4%), won only on wq (1060 rows, -5.8%/-1.3%) and tied on the synthetic set. It trained slower on xgboost (1.4 to 1.8x at K=8 and 16) and only predicted faster (3 to 15x, one walk for K outputs). bonsai's K separate fits sat within 1.2% of xgboost's per-target arm on every set over 1000 rows and led on rf1 and rf2, so the per-target booster ships the best accuracy measured with one ingest, one model and one predict call, and the engines pay nothing.
On the device. A CUDA grower takes the K-wide fit through the host round trip every multi-output fit makes (host gradients up, leaf ids down), the path a single-target device fit left to itself no longer takes since its objective went resident (decisions 124 and 153). On an RTX PRO 6000 Blackwell Server Edition the K-wide fit on cuda_depthwise, cuda_levelwise and cuda_leafwise equals K single device fits through the host-objective hatch bit for bit (mse and huber, pinned beside the host case) and sits within 1e-3 R2 of K resident singles, the resident objective's own rounding gap. Same pod, 1M x 64, K = 4, 50 rounds at depth 6, min over two reps: the K-wide device fit cost 0.57, 0.66 and 0.69 s on cuda_depthwise, cuda_levelwise and cuda_leafwise against 0.34, 0.41 and 0.42 s for the four resident singles with their four ingests, 1.61 to 1.68x; on the host, depthwise, the K-wide fit cost 3.65 s against 4.34 s for four singles, 0.84x, the one ingest paid once. Device prediction and SHAP decline a K-wide model and run on the host, as for multiclass: the host walk predicted 1M x 4 in 0.74, 0.37 and 0.92 s on the three device-grown models. A second pod of the same part placed the ratio: against four singles taking the same host round trip (the hatch set) the K-wide cuda_depthwise fit read 0.58 against 0.59 s, 1.00x, so the whole gap is the resident objective and none of it is the ingest. XGBoost 3.3.0 on the same pod, hist with one_output_per_tree at the same cell, read the other way: on the device 1.34 s for the K-wide fit against 3.74 s for four singles (0.36x) and on the host 4.07 against 6.33 s (0.64x), its per-fit DMatrix build and sketch being the cost the four targets share, where bonsai's ingest is too small a share of its fit to show (0.89x on the host, 1.00x on the device). The bonsai K-wide device fit still read 2.3x under XGBoost's (0.59 against 1.34 s) with the round trip in it; XGBoost predicted the 1M x 4 block in 0.16 s on the device against bonsai's 0.88 s host walk.
The resident K-target round. With the gap placed, the K-target booster took the resident seam: the engine's resident plane holds the label and score blocks as K device columns, resident_select names the column the next tree derives its gradients from and fuses its leaves into, and the round is K selects and K trees over one arming, under the same eligibility as a single-target fit. A third pod of the same part: the resident K-wide fit on cuda_depthwise, cuda_levelwise and cuda_leafwise equals K resident singles bit for bit (mse, huber and quantile, pinned beside the hatched case) and cost 0.24, 0.29 and 0.31 s against 0.33, 0.37 and 0.38 s for the four resident singles, 0.75 to 0.79x, where the hatched K-wide fit on the same pod cost 0.51, 0.57 and 0.59 s. The ratio lands under 1 rather than at it because the resident singles each pay an ingest and an arming that the trees, at 1.2 ms each, no longer hide. The single-target device hash is unchanged (cuda_depthwise e1a5391a7beea349 before and after).
Device prediction. A K-wide model then took the device predict and SHAP walks it had declined: the device predict seam answers one plan per output, column k's trees (densified and cached per epoch) under column k's base score, and the binding walks a device-resident Dataset as K width-1 plans into a column buffer and interleaves them, so no kernel changed and the walk's own parity pins carry over. A fourth pod of the same part, the 1M x 64, K = 4 model at 50 rounds: the device predict read 7, 6 and 6 ms on cuda_depthwise, cuda_levelwise and cuda_leafwise against 0.51, 0.32 and 0.80 s for the host walk, bit-equal; the device SHAP read 1.3, 1.3 and 1.1 s against 62, 26 and 31 s on the host. XGBoost 3.3.0 on the same pod predicted the block from host memory in 0.24 s (its walk plus the upload) and explained it in 4.6 s from a DMatrix. A softmax model still declines through its empty plan and runs on the host.
Rejected. K-wide leaves in the engines (measured above: accuracy down, a K+1 wide cell in every fill, the lane finder's lockstep along K, leaf vectors in the model format, every reader of HistCell touched). A Python MultiOutputRegressor wrapper over K estimators (K ingests and K binnings of the same matrix, K model objects to pickle and version, no shared early stopping). Routing K targets through MulticlassBooster with a regression head (the softmax booster's priors, argmax and logloss are the class shape, not a width; the shared scaffolding is hoisted instead).
Reopener. Predict latency at K outputs is K walks; if a consumer's K grows past single digits or the walk dominates its budget, the probe's predict column (3 to 15x) is the case for K-wide leaves, priced against the accuracy loss above on that consumer's own targets. Shared early stopping is owed. One device plan over K columns (one walk writing K outputs per row, where today K walks each read the plane once) is the predict lever if a consumer's K grows past single digits; at K = 4 the K walks cost 7 ms per million rows and are not worth a kernel. The K trees of a round are independent and read one bin matrix, so batching their level steps into one launch, or building their root histograms in one pass, is the fit lever below the 0.75x above; it is priced by a profile of the resident K-wide fit before any kernel is written.
162. The 2.9.0 refresh holds every cell against 2.8.0 same-pod and reads the host plane on a Xeon 6760P, where bonsai's host growers run twice the 9554's time while XGBoost and CatBoost run flat, handing them the cpu-tall depthwise and levelwise cells (adopted)#
Decision. The 2.9.0 standings supersede 2.8.0's on every axis: ten measured in one session on an RTX PRO 6000 Blackwell Server Edition pod at main 084d8c36, the code axis locally at the same sha, the GPU A/B and parity on the standings pod, and the CPU A/B on two 16-vCPU cpuset pods from the driver's create ladder. The release's code change is the multi-target round (decision 161), which adds a booster beside the single-target one and touches no single-target plane; every host and device model hash held through it, so the expected reading was a hold, and the same-pod A/B reads one.
The GPU cells hold. Three-arm A/B on the standings pod (ab-gpu-2.9.0.jsonl, anchor 1.15.0 wheel, old 2.8.0 wheel, new 2.9.0 source, interleaved, min over two reps, fit seconds): cuda_depthwise 1M x 100 anchor 0.52, old 0.32, new 0.34 s (+5.7% against old); cuda_levelwise 0.94, 0.36, 0.37 (+0.3%); 16M x 100 cuda_depthwise 4.54, 3.14, 3.14 (+0.1%); cuda_levelwise 4.44, 3.08, 3.06 (-0.6%); peak host RSS within 2.1% of old on every cell and r2 equal across arms. The one cell past the 5% band is the 1M depthwise fit, 20 ms on a 0.3 s fit where the old arm's own two reps read 0.32 and 0.34 s and the new arm's 0.34 and 0.34: one rep's spread, read at the 16M cell as +0.1%, and the standings rows read the same grower within 2.7% of 2.8.0's on gpu-tall and within 0.5% on gpu-wide and gpu-extreme. Every cell reads 31 to 61% under the anchor. The fused-versus-two-step parity holds (fused 3.16 and 3.24 s against two-step 3.15 and 3.16 at 16M).
The code's verdict on the host plane. The tall cell's three-arm A/B ran twice. The ladder's first two rungs (cpu5g, cpu5c) refused, and the cpu3g pod that took the session's A/B read 20.2 to 28.4 s across the anchor arm's six reps alone, a 40% spread inside one binary, so its tall rows were discarded and the cell re-measured on a cpu3c pod (ab-cpu-2.9.0.jsonl, 16 vCPU cpuset, 12 threads, six interleaved reps, min over reps, fit seconds): depthwise anchor 15.91, old 13.30, new 13.23 s (-0.5% against old, -16.8% against the anchor); leafwise 27.34, 13.40, 13.01 (-2.9%, -52.4%); levelwise 14.40, 11.88, 12.26 (+3.2%, -14.8%); reps within 7% inside every arm, peak RSS within 0.5% and r2 equal across arms. The wide cell's rows from the cpu3g pod read (two reps within 2.5%) and stay: depthwise 121.34, 57.43, 57.60 (+0.3%, -52.5%); leafwise 88.87, 45.92, 45.50 (-0.9%, -48.8%); levelwise 173.99, 65.59, 65.73 (+0.2%, -62.2%). Both files hold one host's rows per cell and carry no host field.
The host plane is read on a Xeon 6760P. The standings pod's CPU is an Intel Xeon 6760P (256 vCPU, a 27.2-core quota, the quota gate reading cpu-tall throttled in 1.3% of its enforcement periods and cpu-wide in 0.3%), the first Xeon host a refresh has drawn since the 1.10.0 to 1.13.1 rows on a Xeon 6952P, where bonsai's cpu-tall depthwise train read 2.91x XGBoost's. It reads the same way here. cpu-tall train, 12 threads, 2.9.0 on the 6760P against 2.8.0 on the EPYC 9554: bonsai depthwise 21.9 s against 9.6, leafwise 22.6 against 10.6, levelwise 19.9 against 9.8; XGBoost 14.4 against 15.6, CatBoost 13.0 against 15.1, LightGBM 59.9 against 32.4. cpu-wide: bonsai depthwise 97.5 against 44.3, leafwise 65.4 against 33.8, levelwise 107.1 against 53.1; XGBoost 192.8 against 193.4, CatBoost 112.8 against 104.9, LightGBM 105.4 against 78.1. The fit profile scales uniformly, every grow bucket 2.3 to 3.5x the 9554's (fill 6.5 to 14.1 s, partition 1.8 to 4.8, find 0.34 to 1.2), with 14% between the two reps, the signature of memory-bound work placed far from its memory on a two-socket part with no affinity, the mechanism the parked CPU campaign named and never chased. The same-pod A/B above says the code did not move; the host did. The standings cells it hands over: cpu-tall depthwise against XGBoost (fit total 23.4 against 16.9 s) and cpu-tall levelwise against CatBoost (21.3 against 13.3). cpu-tall leafwise against LightGBM and all three cpu-wide cells stay bonsai's, with the margin halved. The GPU rows read within 3% of 2.8.0's on every bonsai grower; LightGBM's gpu-extreme fit reads +11%, its host side.
Rejected. Discarding the Xeon rows and renting until an EPYC host comes: the rows are same-pod against the reference libraries on that part and read true for anyone fitting on it; the standings carry the host, and the entry says why the margin moved. Keeping the cpu3g tall rows: a 40% spread inside one arm reads nothing, and the quiet host's rows cost one more rung. Reading the standings rows against 2.8.0's as the release delta: the part changed, and the A/B is the measurement.
Reopener. The Xeon cliff is in the standings now and is the next perf target: the parked campaign's step 0 (the populate ledger, a thread-scaling run on a cpuset pod for bonsai and XGBoost, then OMP_PLACES=cores OMP_PROC_BIND=close and single-socket pinning as the first A/B). A refresh that draws an EPYC host again reads the cells on 2.8.0's part. The GPU axes are pinned to the part (decision 127) where the host plane is read on whatever CPU the GPU pod carries: a rule for the host plane, pin or record, is owed. The A/B rows still carry no host field.
Standings: gpu-tall, cpu-tall
Status 2026-10-21: the cliff's bonsai-specific share was the refresh's own OMP_WAIT_POLICY=passive meeting this host's slow futex wake, not the engine (decision 164); under the default policy the same host reads bonsai depthwise 16.4 s against XGBoost's 13.4 at 12 threads. These rows stand as measured, with omp_wait_policy readable on each; the next refresh reads the cpu plane under the default policy.
Status 2026-10-22: the 2.10.0 refresh drew an EPYC 9554 again and, with decisions 164 and 165 in, reads every cpu cell bonsai's (decision 166).
163. The K-target validation round runs on the device (adopted)#
Decision. The engine's validation plane holds a K-target eval set the way the resident plane holds a K-target training set: eval_begin takes the n x K seed block and keeps it as K view-length columns beside K label columns, eval_select names the column the next walk adds into and scores, and eval_accumulate returns that column's loss from the objective's device form. MultiOutputBooster arms the plane once per fit and, each round, selects column k, walks tree k there and reads its loss, then hands early stopping the mean over the K columns, which is the pooled loss validation_loss computes on the host (the mean of K per-target means over the same n rows). The plane arms a K-wide set only when the objective has a device loss, since every regression objective the K-target route serves has one and a plane without it would have to download n x K scores per round for the host to pool; a K-wide set under any other objective keeps the host walk, as before. Width 1 is unchanged: one column, the bytes it uploaded before.
Why. Decision 161 left the K-wide validation walk on the host, the one per-round host cost a K-target fit on a CUDA grower still paid once its round went resident. Same pod (an RTX PRO 6000 Blackwell Server Edition, nvcc 12.8), 1M x 64 training rows, a 1M x 64 eval set, K = 4, 50 rounds at depth 6, twelve host threads, best of three, the host walk measured twice around the device walk:
| grower | fit alone | fit + eval set, host walk | fit + eval set, device | single-target fit + eval set |
|---|---|---|---|---|
| cuda_depthwise | 0.34 to 0.37 s | 1.89 s | 0.76 s | 0.44 to 0.47 s |
| cuda_levelwise | 0.42 to 0.43 s | 1.74 to 1.78 s | 0.83 s | 0.46 to 0.49 s |
| cuda_leafwise | 0.66 to 0.72 s | 2.30 s | 1.06 s | 0.55 s |
The eval set cost 1.3 to 1.6 s per fit on the host walk, four tree walks over a million rows per round plus the host loss pass, and 0.35 to 0.42 s on the device, so a K-target fit with an eval set went from 4x a single-target fit with the same eval set to 1.6 to 1.9x, the K trees it grows. The loss series differ in the third or fourth significant digit at this size (0.002684 against 0.002696 at round 50 on cuda_depthwise), the device summing in double partials where the host's eval sums in single precision; the pins hold both within 1e-4 relative at a thousand rows, the same bound the single-target eval plane carries. Every suite passed on the pod with the new case over the three CUDA growers and mse, huber, quantile, and the three device hashes held.
Rejected. K separate eval planes, one arming per target: K uploads of the same bins, where the columns share one plane and one row map. Downloading the K score columns each round and pooling on the host: n x K floats per round moved so the host can compute what the device loss pass already has, and the host sum is the less accurate of the two.
Reopener. One walk over the K trees of a round writing K columns, the same lever decision 161 names for predict, if the per-round K launches show in a profile at larger K. A K-wide eval set under an objective without a device loss takes the host walk today; a device form for such an objective reopens it for free.
164. The Xeon cliff is the refresh's own wait policy: the cpu plane is measured under the default OpenMP wait (adopted)#
Decision. The standings pod script no longer exports OMP_WAIT_POLICY=passive for the CPU arms or the CPU A/B. The cpu plane is measured under the runtime's default wait policy, the one every user of the wheel gets, on a host whose quota the gate has already shown clears the thread count by a spare core, with the throttle bracket unchanged. The passive setting was the reading's own artifact: on the Xeon host of the 2.9.0 refresh it was 44% of bonsai's cpu-tall depthwise fit at 12 threads and the whole of the thread plateau decision 162 named as the next perf target.
Measured. Two RTX PRO 6000 Blackwell Server Edition pods, both with a 27.2-core quota (throttled in at most two enforcement periods per fit), main 16a6bc76, the cpu-tall depthwise cell (2M x 128, depth 8, 100 iters) through the bench worker with the grow and fit ledgers on, arms interleaved, min over two reps, train seconds. The raw rows (per-phase ledgers, rusage counters, throttle counts) are not kept in the tree; the tables and the ratios below are the record.
| Xeon 6760P (EU-NL-1, the 2.9.0 refresh's host) | 6 threads | 12 threads | 24 threads |
|---|---|---|---|
bonsai depthwise, passive (the refresh's setting) |
35.00 | 23.57 | 23.21 |
| bonsai depthwise, default policy | 16.43 | 9.80 | |
bonsai depthwise, active |
15.48 | 9.32 | |
xgb_hist, passive |
14.49 | 12.30 | |
| xgb_hist, default policy | 13.40 | 7.45 | |
xgb_hist, active |
13.84 | 7.44 |
| EPYC 9555 (EU-RO-1, the control) | 6 threads | 12 threads | 24 threads |
|---|---|---|---|
bonsai depthwise, passive |
10.99 | 6.42 | 4.16 |
bonsai depthwise, active |
6.24 | 3.94 | |
xgb_hist, passive |
6.31 | 3.85 |
The ledger names the mechanism. On the Xeon under passive, populate reads 16.18 s at 12 threads and 12.57 at 24 while partition rises from 4.69 to 6.86, the process spends 8.0 and 8.7 cpu-seconds per wall second (threads asleep most of the time), and the fit makes 210k and 440k voluntary context switches; under active the same phases read 12.39 to 6.87 and 1.94 to 1.62, 13.6 and 26.6 cpu-seconds per wall second, and 5.6k and 6.1k switches. The EPYC makes the same 210k and 431k sleeps and pays 0.18 and 0.22 s for them (3 to 5%). So a barrier sleep costs about 38 microseconds to wake on this Xeon against about one on the EPYC, and bonsai's grow loop, which opens many short parallel regions per level (decision 44 counted the barriers), pays region count times wake latency, a product more threads cannot shrink: the plateau. XGBoost opens fewer regions per round, pays 8% for the same setting at 12 threads, and still scales. OMP_PLACES, OMP_PROC_BIND and single-socket taskset were tried first on a Xeon 6952P and moved nothing on either library.
What remains is the host. Under the default policy bonsai on the Xeon reads 16.4 s against XGBoost's 13.4 at 12 threads (1.23x) and 9.8 against 7.5 at 24, where the EPYC reads the two tied (6.42 against 6.31). bonsai's fill runs 12.7 s on the Xeon against 4.5 on the EPYC (2.8x) where XGBoost's whole train runs 2.1x, so the Xeon costs the fill kernel more than it costs XGBoost's histogram, a smaller and separate question from the plateau.
Rejected. OMP_WAIT_POLICY=active: 6% under the default on the Xeon and 3% on the EPYC, but it is not what a user runs, and on a bandwidth-metered host it spins whatever the quota withholds; the gate's spare core and throttle bracket fence the default already. Keeping passive and pinning the host CPU family instead: the row would still describe the measurement's own setting rather than the wheel a user installs. Setting the policy inside bonsai: decision 44's reasons stand, the runtime is initialised before the module can speak. Re-measuring 2.9.0's cpu rows now: a release's rows are re-measured at the next release under the new rule, and each row carries omp_wait_policy, so the setting is readable where the number is.
Reopener. The region count is bonsai's own: 17k barrier sleeps per thread per fit at 12 threads, 175 per iteration, and fewer, longer regions in partition and populate would make the engine insensitive to wake latency under any policy. Priced at the measured gap under the default policy, 6% on the Xeon and 3% on the EPYC, it sits below a pod unless a passive-policy deployment surfaces. The fill's host sensitivity (2.8x against XGBoost's 2.1x from EPYC to Xeon) is the next host-plane probe: an AVX-512 build of the lane finder and the fill, same pod, both hosts. The rule for the host plane, pin or record, is still owed (decision 162).
Status 2026-10-21: the fill's host sensitivity was the row prefetch's non-temporal hint, which a Xeon keeps out of L2 (decision 165); with the keep hint the same cell reads bonsai 9.9 s against XGBoost's 12.2 on a Xeon 6952P at 12 threads.
165. The row fill prefetches with the keep hint: a non-temporal prefetch lands in L1 only on a Xeon and is evicted before its row comes up (adopted)#
Decision. The four software prefetches in the host row fill (fill_rows, src/fill/rows.hpp: the row's two lines, its gradient and its hessian, sixteen rows ahead) carry the keep hint, prefetcht0, in place of the non-temporal hint decision 61 shipped them with. On a Xeon 6952P the same-pod cpu-tall depthwise train drops from 14.50 to 9.88 s at 12 threads (fill 11.13 to 6.72 s, -40%) and bonsai moves from 1.19x XGBoost's 12.18 s to 0.81x; on an EPYC 9555 the change is flat (fill 4.70 to 4.71 s). Models are bit-identical: scripts/model_hash.py reads 55c6fe308852d9bb on both hosts for every arm.
Measured. Two RTX PRO 6000 pods with a 27.2-core quota, 12 threads, the default wait policy, 2M rows at 255 bins, depth 8, 100 iterations, arms interleaved and built from one checkout, min over two reps, train / fill seconds.
| Xeon 6952P (US-MO-2) | main (prefetchnta) |
keep (prefetcht0) |
prefetcht1 |
keep + 32 rows + every line | XGBoost hist |
|---|---|---|---|---|---|
| 32 columns | 4.26 / 1.54 | 4.19 / 1.42 | 4.30 / 1.48 | 4.34 / 1.53 | |
| 128 columns | 14.50 / 11.13 | 9.88 / 6.72 | 9.91 / 6.76 | 9.50 / 6.49 | 12.18 |
| 256 columns | 21.13 / 17.83 | 16.92 / 13.76 | 17.24 / 14.06 | 16.90 / 13.70 |
| EPYC 9555 (EU-RO-1) | main | keep | prefetcht1 |
keep + 32 rows + every line | XGBoost hist |
|---|---|---|---|---|---|
| 32 columns | 2.73 / 0.93 | 2.64 / 0.94 | 2.80 / 1.06 | 2.99 / 1.19 | |
| 128 columns | 6.61 / 4.70 | 6.66 / 4.71 | 7.18 / 5.24 | 6.64 / 4.68 | 6.42 |
| 256 columns | 10.91 / 8.86 | 10.72 / 8.70 | 10.86 / 8.89 | 9.38 / 7.33 |
The mechanism was read from hardware counters on a bare-metal Xeon 6521P (Granite Rapids, 24 cores, no SMT, bonsai 2.9.0 from the wheel) through perf_event_open with the kernel's Granite Rapids event codes, 12 threads, whole process. The fill is 77% of the train there. Per thousand instructions bonsai at 128 columns takes 0.01 address aliases and 0.01 store-forward blocks, spends 2.7% of its cycles with the store buffer full and 3% stalled on L2 hits, so the stride, the forwarding and the histogram's residency are all cleared. It spends 35% of its cycles with an L2-missing load outstanding and 22% with an L3-missing load outstanding, from 0.75 and 0.41 such loads per thousand instructions, about 400 stall cycles per miss with no overlap; XGBoost on the same box reads 4.6% and 2.2% at 137 cycles per L3 miss. At 32 columns bonsai's L3-missing loads per instruction are a quarter of the 128-column rate. The loads that miss are the gathered rows and their gradients, which the fill prefetches sixteen rows ahead with __builtin_prefetch(p, 0, 0), the non-temporal hint: on an Intel server core that hint fills L1 and bypasses L2, and in the sixteen rows between the prefetch and the use the fill's histogram updates miss L1 about sixty times per row at 128 columns, close to a thousand lines through a 768-line L1, so the row's lines are evicted before they are read and the demand load pays a DRAM round trip the L2 would have served. At 32 columns the same window moves 240 lines and the row survives, which is why the deficit grew with width and why bins (which do not change the stride on u8 data) did not move it. A Zen core fills L2 on the same hint, which is why the EPYC never saw it. The keep hint fills L2 as well as L1, and the counters' prediction holds on both hosts.
Rejected. prefetcht1 (L2 and L3 only): equal to the keep hint on the Xeon and 11% slower on the EPYC at 128 columns, where the L1 copy pays. The keep hint with a 32-row distance and every line of the row prefetched: the best arm at 256 columns on both hosts (fill -23% on the Xeon, -17% on the EPYC against main) and 28% slower at 32 columns on the EPYC, so its two changes ship separately once they are priced apart. Huge pages for the row mirror and a physical row partition in place of the gather: not needed once the prefetch lands. Re-measuring 2.9.0's cpu rows: the next refresh reads them (decision 164).
Reopener. The 256-column arm says a width-aware prefetch (every line of a row wider than 128 bytes, which the u16 path and any cell past 128 u8 columns need) is worth 17 to 23% of the fill on both hosts once its distance is held at 16; it is the next host-plane lever. The column fill's gathered arm and the mapper fit carry the same non-temporal hint (src/fill/columns.hpp, src/bin_mappers.cpp), unmeasured on a Xeon. At 32 columns the Xeon still spends 15% of its cycles behind L2 misses, which the counters can chase the same way. The cpu-tall standings cell on a Xeon host now reads bonsai ahead of XGBoost at 12 threads; the next refresh records it.
Status 2026-10-23: the width-aware prefetch shipped with an eight-line cap and a 64-byte aligned mirror, and the column fill took the keep hint (decision 167); the bin mapper's prefetch already carried the keep hint, so that reopener was moot.
166. The 2.10.0 refresh reads the keep hint on an EPYC 7702P too, 2 to 10% under 2.9.0 same-pod, holds the GPU cells, and draws an EPYC 9554 host where every cpu cell is bonsai's again (adopted)#
Decision. The 2.10.0 standings supersede 2.9.0's on every axis: ten measured in one session on an RTX PRO 6000 Blackwell Server Edition pod at main fad709e5, the code axis locally at the same sha, the GPU A/B and parity on the standings pod, and the CPU A/B on a 16-vCPU cpuset pod from the driver's create ladder. The release's code changes are the row fill's keep hint (decision 165) and the default OpenMP wait policy on the cpu arms (decision 164), both aimed at the Xeon reading decision 162 recorded, plus the device-scored K-target eval set (decision 163), which no standings cell exercises. Every host model hash holds.
The GPU cells hold. Three-arm A/B on the standings pod (ab-gpu-2.10.0.jsonl, anchor 1.15.0 wheel, old 2.9.0 wheel, new 2.10.0 source, interleaved, min over two reps, fit seconds, host AMD EPYC 9554): cuda_depthwise 1M x 100 anchor 0.51, old 0.25, new 0.25 s (+0.0% against old); cuda_levelwise 0.94, 0.32, 0.32 (-0.3%); 16M x 100 cuda_depthwise 4.19, 2.79, 2.79 (+0.0%); cuda_levelwise 4.26, 2.71, 2.71 (-0.3%); peak RSS within 0.6% and the reps within 1.6% in every arm. The moves against the anchor (-33 to -66%) are the 1.15.0 to 2.9.0 history and read the same as decision 162's. Parity on the 16M cuda_depthwise cell: fused 2.81 s against two-step 2.80 (-0.2%), the two-step split ingest 0.75 and train 2.05.
The cpu cells read the keep hint on a Zen 2 part. The ladder's first two rungs (cpu5g, cpu5c) refused, and the cpu3c rung, tried before cpu3g from this release, answered with an AMD EPYC 7702P host (ab-cpu-2.10.0.jsonl, 16 vCPU cpuset, 12 threads, six interleaved reps at tall and two at wide, min over reps, fit seconds): tall depthwise anchor 22.92, old 20.81, new 19.52 s (-6.2% against old, -14.8% against the anchor); leafwise 26.63, 21.06, 18.96 (-10.0%, -28.8%); levelwise 21.32, 18.68, 17.29 (-7.5%, -18.9%); wide depthwise 132.18, 71.97, 67.91 (-5.6%, -48.6%); leafwise 95.14, 63.00, 61.55 (-2.3%, -35.3%); levelwise 221.55, 80.19, 77.58 (-3.3%, -65.0%); peak RSS within 0.8% and r2 equal across arms on every cell. The reps spread up to 11% inside an arm at tall and 7% at wide, so a single cell's percentage is inside the host's noise; the sign is the same on all six cells and the tall cells clear the 5% band, which is the keep hint read on a part decision 165 did not measure: a Zen 2 EPYC 7702P, where a non-temporal prefetch is not free either. Decision 165 read it flat on a Zen 5 9555 and -40% on a Xeon 6952P.
The host plane returns to 2.8.0's part. The standings pod's CPU is an AMD EPYC 9554 (224 vCPU, a 23.8-core quota), the part decision 160 read, under the default wait policy for the first time (decision 164). Train seconds at 12 threads: cpu-tall bonsai depthwise 8.4 against XGBoost 15.2, leafwise 9.3 against LightGBM 20.4, levelwise 7.9 against CatBoost 16.7; cpu-wide 38.2 against 181.9, 30.0 against 75.7, 48.1 against 100.1. Decision 162's Xeon rows read depthwise 21.9 against XGBoost 14.3 and handed the cpu-tall depthwise and levelwise cells to XGBoost and CatBoost; on this draw every cpu cell is bonsai's, and the 9554's own 2.8.0 reading (depthwise 9.6 s) sits above this one by the wait policy's share on that part. The GPU rows move with the pod's luck inside their usual spread; the quality axes rank as before, one ungated cell moving in the fourth decimal.
Rejected. Renting until a Xeon host comes, to read the standings rows on 2.9.0's part: the standings carry the host, the ladder's flavors are all EPYC parts, and the Xeon record is decision 165's same-pod table (14.5 to 9.9 s train on a 6952P), which a cross-pod standings row could not improve on. Re-measuring the tall A/B for its 11% spread: six reps' minima agree in sign on every cell and the quieter wide cell agrees, so the reading stands.
Reopener. A Xeon flavor in the CPU create ladder would let a release A/B read the Xeon directly; until one exists the same-pod tables in decisions 164 and 165 are the record, and a refresh that draws a Xeon standings host reads the cpu cells under the default policy and the keep hint for the first time. The host plane's draw remains the pod's luck, and the entry for each release says which part it was.
Standings: gpu-tall, cpu-tall Status 2026-11-10: the 2.11.0 refresh drew a Xeon 6952P standings host, the reading this entry's reopener named, and every cpu cell is bonsai's there (decision 170).
167. The row fill prefetches every line of its row up to eight, the column fill keeps its gathered lines, and the row mirror starts on a cache line (adopted)#
Decision. Three changes to the host fill, every model the same bytes (the three host hashes hold on every build on both pods). The row fill prefetches every 64-byte line of the row ahead up to k_prefetch_bytes (eight lines, 512 bytes) and the row's last byte, at the same 16-row distance, where it prefetched the first two lines and nothing past them. The column fill's gathered-bin prefetch carries the keep hint, the hint decision 165 gave the row fill, instead of the non-temporal one. The row mirror's allocator returns 64-byte aligned storage, so a row of 128 bytes is two lines and a row of 256 bytes four, where glibc's large allocation started 16 bytes past a page and every row straddled one line more than its width needs. The bin mapper's prefetch, which decision 165 listed as a non-temporal reopener, already carried the default keep hint and is untouched.
Measured, the shipped build against main. Same pod, 12 threads, depthwise at depth 8 and 100 rounds, min over interleaved reps (three at 128 and 256 columns and at the wide cell's cap sweep, two at 1023 bins), fill then fit seconds, XGBoost hist on the same pod for scale:
| host | cell | main fill / fit | shipped fill / fit | fill | fit | XGBoost fit |
|---|---|---|---|---|---|---|
| EPYC 9555 | 2M x 128 | 4.46 / 7.31 | 2.91 / 5.78 | -34.8% | -20.9% | 8.03 |
| EPYC 9555 | 2M x 256 | 8.26 / 12.12 | 6.11 / 10.06 | -26.0% | -17.0% | 16.31 |
| EPYC 9555 | 16k x 16384 | 12.17 / 23.97 | 11.20 / 23.02 | -8.0% | -3.9% | |
| EPYC 9555 | 2M x 128, 1023 bins | 10.87 / 14.39 | 10.75 / 14.29 | -1.1% | -0.7% | |
| Xeon 6952P | 2M x 128 | 6.34 / 10.65 | 5.83 / 10.23 | -8.0% | -3.9% | 14.04 |
| Xeon 6952P | 2M x 256 | 13.75 / 19.23 | 12.48 / 18.04 | -9.2% | -6.2% | 30.03 |
| Xeon 6952P | 16k x 16384 | 24.68 / 44.90 | 23.70 / 44.21 | -4.0% | -1.5% | |
| Xeon 6952P | 2M x 128, 1023 bins | 25.82 / 30.98 | 16.94 / 22.00 | -34.4% | -29.0% |
Measured, the parts. Each lever alone against main, fill: the every-line row prefetch read -21.0% at 2M x 128 and -9.4% at 2M x 256 on the EPYC and -1.4% and -2.8% on the Xeon; the column keep hint read -34.4% at 1023 bins and -2.9% at the wide cell on the Xeon and -1.0% and flat on the EPYC. The two hosts split the levers: a Zen 5 L1 does not fetch the row's third, unaligned line on its own and the Xeon's next-line prefetcher does, while the Xeon keeps a non-temporal line out of L2 and evicts it from L1 before the 32 gathered rows a u16 line serves come up (decision 165's mechanism), which the EPYC does not. The aligned mirror on top of both hints took the EPYC's 2M x 128 fill from -28.7% to -34.8% and 2M x 256 from -18.9% to -26.0%, the Xeon's 2M x 128 from -7.1% to -8.0%. A 32-row distance over 16 read within 0.5% everywhere. The cap sweep at the wide cell, where a tile row is 2048 bytes and 32 lines, fill against main: 4 lines -0.2% (EPYC) and -1.9% (Xeon), 8 lines -8.0% and -4.0%, 16 lines -6.7% and +1.9%, 32 lines -6.6% and +5.6%; uncapped, 16 rows ahead put 32 KB in flight per thread against a 48 KB L1 on the Xeon.
Rejected. A 32-row distance: flat on both hosts at every cell, so the 16-row distance decision 165 held stands. No cap on the lines per row: +5.6% at the Xeon's wide cell. A cap of four lines: covers the 128- and 256-column rows but gives up the wide cell's -8.0% on the EPYC. Aligning the mirror by over-allocating and offsetting the span: the allocator is the one home the mirror's storage has, and bins() keeps its meaning. Renting a Zen 2 host to add a third part: the two hosts the standings draw are the ones that decide.
Reopener. The row fill on the Xeon still reads twice the EPYC's time at 2M x 128 (5.83 against 2.91 s) with every row line in L2 before its load: the residual is the serialized L2-miss structure decision 165's counters read, and the next lever there is the histogram side, not the row side. The mirror's alignment also reaches the predict and tree-routing loops that index it, unmeasured. The column fill's wide cell gained 8% on the EPYC and 4% on the Xeon from a row-route change, so the column route itself has not been priced since decision 151.
168. The booster seeds the feature sample from random_seed and feature_seed together (adopted)#
Context. Issue 547: five BonsaiClassifier fits with random_seed 1, 2, 3, 4 and 42, feature_fraction 0.5 and the default all_rows sampler produced five identical models. The booster's std::mt19937 is built from booster.random_seed and handed to the row sampler only; the grower builds its own from tree.feature_seed (decision 58 gave the feature draw a grower-owned rng), and nothing joins them. Under all_rows the booster's rng has no consumer, so random_seed was a field the saved config carried and nothing read. The parameters page said it seeded "the stochastic boosting choices", and the estimators expose random_seed but not feature_seed, so the one seed the estimator surfaces was the one with the narrowest reach. Reproduced on main at 844935ac: random_seed 1 against 2 under feature_fraction 0.5 differ by 0.0 in probability; feature_seed 7 against 101 by 0.21; random_seed 1 against 2 under subsample 0.8 by 0.27.
Decision. The Ensemble constructor seeds the grower's feature sample from a std::seed_seq over random_seed and feature_seed, through GrowerHost::seed_feature_sample. Both fields stay: random_seed now reaches every draw a fit makes, and feature_seed remains a stream separator for two fits that should differ in columns only. A bare grower outside a booster keeps seeding from feature_seed alone, which is what the grower-level determinism pin exercises. Pinned by random-seed-varies-feature-draws in tests/unit/test_booster.cpp and by the estimator-level test in python/tests/test_estimators.py. Every model hash holds (the hash configs leave the fraction at 1, as does every standings config), so the change moves no standings row; a model with feature_fraction below 1 refits to different trees than 2.10.0 drew.
Rejected. Deriving feature_seed from random_seed unless set explicitly: the registry-generated Params carries a concrete default for every field, so "unset" would need a sentinel value and a second meaning for the field. Exposing feature_seed on the estimators: a constructor argument whose only job is to work around the seed that should have reached the draw. A warning when feature_fraction is below 1 and only random_seed varies: one fit at one seed is a legitimate configuration, and the warning fires on it. Folding the three seeds into one: decision 107 rejected the flat space because seed, random_seed and feature_seed collide as names, and the bin mapper's seed belongs to the Dataset, which outlives any one fit.
Reopener. The bin mapper's seed is the third seed and still reaches nothing a fit does; it lives on Dataset, which the estimators build without passing one. If a user asks for a seed set that varies the bin edges as well, the estimator can forward random_seed into the Dataset it builds, and the sampling of edges becomes part of the seed's reach.
169. The split finder scores each feature against its own histogram totals (adopted)#
Context. Issue 549: an 800,000-row binary adversarial-validation matrix (21 columns, thirteen 0 to 5 ratings, two delays, four small categoricals) with the rows in label order, 560,000 zeros then 240,000 ones as sklearn's StratifiedKFold hands them back, grew zero splits at 30 and 300 rounds and predicted a constant, where the same rows permuted grew about 900 splits in 30 rounds. On a synthetic matrix of the same shape every host grower showed the same shape of failure: the first two or three trees split, then every tree is one leaf. The stall reproduced from 100,000 to 3,200,000 rows and at every thread count, and the split count moved with the thread count (60 at 4 threads, 857 at 1 on the 800k matrix), so no stage that reads a prefix of the rows was involved.
Mechanism. HistCell sums are float32. In label order a cell receives one long run of near-identical gradients (every row of a class starts at the same score, so its gradient is the same value), the running sum climbs past 16,000 where a float32 step is 0.002, and every addition rounds the same way; the error grows with the square of the rows per cell. A probe on the 800k matrix at round one read the 5-bin feature's cells summing to a gradient of 410 and a hessian of 168,522 where the 81-bin feature read 18 and 167,984; shuffled, every feature agreed within 1. SplitInput::totals() reads the first populated histogram, the lowest selected feature, and both host finders derived every feature's right side as that total minus the feature's own left prefix. At a feature's last cut the right side holds no rows but inherits the whole disagreement: at round three it carried a gradient of 103 over a hessian of 54, which passes min_child_hess and scores 192 against real gains near 5. The root takes it, the partition sends no row right, the node is demoted to a leaf, the leaf barely moves the scores, and the next round reads the same cells. The trigger is identical addends, not row order alone: regression gradients differ row to row and their rounding cancels (an MSE fit sorted by target and one sorted by group matched the as-drawn fit to five digits of holdout RMSE), a planted signal at holdout AUC 0.69 did not stall because the trees spread the scores and the gradients diverged, a weak signal at AUC 0.52 stalled after five trees, and a class share whose gradient is a dyadic fraction (25% positives, gradients 0.25 and -0.75) sums exactly and never stalls. Same-label runs of 1,000 rows were harmless and runs of 10,000 stalled. The device planes are immune by construction: their cells are int64 fixed point (decision 124), so every feature's cells sum to the same integer.
Decision. Each feature's scan reads its node totals from its own histogram and carries its own node score. On the lanes, in the node finder and the level finder alike, a feature's totals are the running left sums the scan's first pass stores at every cut (LeftSums) plus the cells after its last cut, the same double sum over the same floats in storage order that Histogram::totals() computes, rounded to float once, with the node score per lane in LaneSums. The scalar node scan calls Histogram::totals(), the scalar level scan takes the totals fill_prefix returns from the pass that fills its prefix, and LevelParents no longer carries shared totals. The right side at a feature's last cut is then that feature's own total minus its own prefix, the same double sums of the same floats in the same order, so it is exactly zero and infeasible under any min_child_hess above zero, and every candidate gain is the Cauchy-Schwarz difference of one consistent set of sums. On the 800k matrix the block-ordered fit reads 900 splits on leafwise, 1762 on depthwise and 180 on levelwise, equal to the permuted fit, at every size from 100,000 to 3,200,000 rows, with root gains of 5.7, 5.0, 4.6 and 4.0 where the permuted fit read 5.7, 5.2, 4.4 and 3.9. SplitInput::totals() stays for the growers' leaf values and child sums, which still read the lowest selected feature once per node.
What moves. All three host model hashes: depthwise 55c6fe308852d9bb to f798c1010c459ccc, leafwise 115c982d38a10b9c to 10b7b8e8a1b324f8, levelwise 06c53a31a653e0f6 to 835518e76e3f2cb0. A model trained on 2.10.0 does not retrain to the same bytes, because every feature's node score and right side now carry its own float total rather than feature 0's, a difference at the float ulp of the total on ordinary data and of hundreds on the data above. The device hashes do not move: the device finders subtract a left prefix from exact integer totals and never read the host finder. The California Housing eval baseline (rmse=0.7153001) holds. Pinned by finder-reads-own-feature-totals, level-finder-reads-own-feature-totals and fit-holds-under-label-sorted-rows, the last of which is the issue's matrix at 100,000 rows and fits a constant on main.
Cost. Priced on three rented cpu5g pods, 12 threads, arms interleaved, min over reps; each pod drew its own host, so every delta below stays inside one pod. The find bucket is summed over threads. The shapes are 20,000 x 2000 at depth 6 for 100 rounds (20 on the first pod), the same with every other feature under a +1 monotone constraint ("mixed") or all of them ("mono"), 16,384 x 16,384 at depth 8 for 10 rounds, and 2M x 128 at depth 6 for 50 rounds.
The first form of the fix summed each feature's cells in a pass of their own ahead of the scan. On an EPYC 4564P it cost the 20,000 x 2000 find 5 to 19% and the fit 1 to 6% (levelwise find 0.37 to 0.44 s), and it never merged alone. Five changes follow it on the branch, every one the same bytes (the three hashes above on every arm of every pod, and lane-scan-matches-scalar-scan, lane-level-scan-matches-scalar-scan and constrained-scan-matches-scalar-scan to the bit):
- Totals from the stored left sums. The first lane pass stores the running left sums at each cut, the totals fall out of it, and the second pass scores from the stored sums. Same pod as above: levelwise find back to 0.38 s against main's 0.37, fit +0.1%, while the 20,000 x 2000 leafwise find stayed +11% and the constrained depthwise and leafwise finds +3.5 to +10%.
- Shared cuts gather with no per-lane test. Up to the smallest cut count in a group every lane holds a cell, so that stretch loads untested and only the tail asks
b < cuts[l]; the tested gather compiled to a branch per lane on x86, 87 to 125 instructions a cut. EPYC 4565P: levelwise find 1.31 to 1.15 s at 2000 features and 4.98 to 4.45 s at 16,384. - A scan range starts on a multiple of eight features. Even ranges each ended on a partly filled group, 288 groups where 250 hold 2000 features. Same 4565P: depthwise find 0.93 to 0.82 s and leafwise 0.79 to 0.70 s, 9.9% and 14.6% under main.
- A feature under a monotone constraint takes the lanes. It took the scalar scan between groups (decision 154); a lane now carries its direction and the node's leaf bounds, and a cut whose bounded child weights break the direction is infeasible for that lane alone. Same 4565P against main: mono depthwise fit 3.35 to 2.39 s (find 2.59 to 1.05) and leafwise 2.48 to 1.63 s, mixed depthwise 4.47 to 2.31 s and leafwise 3.31 to 1.59 s.
- A group prefetches the next group's cells while it scores its own. The first pass only loads and adds, with no division to hide a miss behind, and a feature's 2 KiB of cells is too short a run for the hardware prefetcher to carry into the next group; at 16,384 features a node's histograms are 32 MiB. One request per cache line, keep hint, into L1.
The third pod (EPYC 4564P, AVX2 and AVX-512F, cpuset of 16, no quota) read main, a second copy of main's build, and the branch, five reps on the two wide shapes, three on mixed, four on the tall one:
| cell | fit s, main | fit s, main copy | fit s, branch | fit | find s, main | find s, branch | find |
|---|---|---|---|---|---|---|---|
| 16,384 x 16,384 depthwise | 8.324 | 8.410 | 8.000 | -3.9% | 3.48 | 2.96 | -14.9% |
| 16,384 x 16,384 levelwise | 9.161 | 9.143 | 8.713 | -4.9% | 6.05 | 5.26 | -13.1% |
| 16,384 x 16,384 leafwise | 3.296 | 3.329 | 3.223 | -2.2% | 1.40 | 1.12 | -20.0% |
| 20,000 x 2000 depthwise | 2.598 | 2.603 | 2.473 | -4.8% | 1.24 | 0.95 | -23.4% |
| 20,000 x 2000 levelwise | 2.511 | 2.499 | 2.429 | -3.3% | 1.60 | 1.42 | -11.3% |
| 20,000 x 2000 leafwise | 1.900 | 1.899 | 1.732 | -8.9% | 1.10 | 0.86 | -21.8% |
| mixed depthwise | 5.286 | 5.322 | 2.650 | -49.9% | 5.34 | 1.20 | -77.5% |
| mixed levelwise | 2.507 | 2.486 | 2.417 | -3.6% | 1.63 | 1.45 | -11.0% |
| mixed leafwise | 3.973 | 3.963 | 1.828 | -54.0% | 4.57 | 1.09 | -76.1% |
| 2M x 128 depthwise | 3.819 | 3.800 | 3.798 | -0.6% | 0.05 | 0.05 | |
| 2M x 128 levelwise | 3.563 | 3.512 | 3.523 | -1.1% | 0.06 | 0.06 | |
| 2M x 128 leafwise | 3.860 | 3.898 | 3.958 | +2.6% | 0.06 | 0.06 |
The copy of main is the noise floor: it read -1.4% to +1.0% of main on the fit and -1.4% to +1.1% on the find. Every wide and constrained cell is under main by more than that. The tall cells sit inside it except leafwise, +2.6% on the minimum and +4.1% on the median (3.900 to 4.059 s), where the copy of main itself read +1.0% and +2.4%. Nothing the branch changes runs long enough in that cell to carry the difference: its find is 0.06 s of a 3.9 s fit in every arm, its populate bucket read 2.32 to 2.40 s and its partition bucket 0.37 to 0.41 s in every arm, and the same cell read -0.7% on the second pod. It is read as noise and has not been rerun. The mixed levelwise cell moves like the unconstrained one because the level finder never reads a constraint (decision 115). On the same pod the prefetch alone took the 16,384-feature find from 1.31 to 1.12 s leafwise and 3.45 to 2.96 s depthwise; the variant that requests the lines into L2 only read 3.13 s depthwise, outside the L1 variant's rep range, and was not kept.
A fourth pod read the same three arms on a Xeon: an Intel Xeon 6760P host (two sockets, AVX2 and AVX-512F) behind a 27.2-core quota, 16 threads a fit under the default OpenMP wait policy, the arms installed from wheels built at main b4c3b9c6 and at the branch, five reps on the wide and tall shapes and three on mixed:
| cell | fit s, main | fit s, main copy | fit s, branch | fit | find s, main | find s, main copy | find s, branch | find |
|---|---|---|---|---|---|---|---|---|
| 16,384 x 16,384 depthwise | 6.783 | 6.906 | 6.569 | -3.1% | 2.69 | 2.71 | 2.26 | -16.0% |
| 16,384 x 16,384 levelwise | 7.935 | 7.756 | 7.349 | -7.4% | 5.74 | 5.71 | 4.42 | -23.0% |
| 16,384 x 16,384 leafwise | 3.125 | 3.223 | 3.165 | +1.3% | 0.99 | 1.00 | 0.86 | -13.1% |
| 20,000 x 2000 depthwise | 2.652 | 2.367 | 2.249 | -15.2% | 0.93 | 0.95 | 0.79 | -15.1% |
| 20,000 x 2000 levelwise | 2.566 | 2.382 | 2.307 | -10.1% | 1.64 | 1.61 | 1.08 | -34.1% |
| 20,000 x 2000 leafwise | 1.394 | 1.314 | 1.304 | -6.4% | 0.87 | 0.84 | 0.76 | -12.6% |
| mixed depthwise | 4.881 | 4.590 | 2.826 | -42.1% | 4.29 | 4.29 | 1.16 | -73.0% |
| mixed levelwise | 2.403 | 2.544 | 2.377 | -1.1% | 1.67 | 1.61 | 1.13 | -32.3% |
| mixed leafwise | 3.094 | 3.546 | 1.458 | -52.9% | 3.72 | 3.84 | 1.06 | -71.5% |
| 2M x 128 depthwise | 3.748 | 3.754 | 3.782 | +0.9% | 0.05 | 0.05 | 0.04 | |
| 2M x 128 levelwise | 3.599 | 3.606 | 3.620 | +0.6% | 0.07 | 0.08 | 0.06 | |
| 2M x 128 leafwise | 3.934 | 3.982 | 3.935 | +0.0% | 0.07 | 0.07 | 0.08 |
That host was shared and busy: its load average ran 22 to 36 against the 27-core quota and the container's throttled periods rose from 3 to 223 across the run, so the copy of main read -10.8% to +14.6% of main on the fit, and the fit column resolves only the two constrained cells (-42.1% and -52.9%). The find bucket is the reading: the copy of main sits within -3.6% to +3.2% of main on it, and every wide and constrained find is under main by 12.6 to 73.0%. The 16,384-feature leafwise find, the cell that read +8.3% on the 4565P before the prefetch, reads -13.1%. The tall cells read +0.9%, +0.6% and +0.0% where the copy of main read +0.2%, +0.2% and +1.2%, so the third pod's leafwise +2.6% did not repeat. No cell is slower than the copy-of-main band on either bucket.
What is not measured: on the 4565P, before the prefetch existed, the 16,384-feature leafwise find read +8.3% over main with the fit tied at -0.7%, and the third pod drew a 4564P, where that same stack read -6.4% before the prefetch. The prefetch has not been timed on a 4565P, and the one Xeon reading is a quota-capped pod on a shared 6760P, not a bare-metal host. The release A/B against the 2.10.0 wheel is the next reading.
Rejected alternatives. Rejecting only a candidate whose side holds no occupied cell: the disagreement lands on every tail cut, not only the empty one, and when the lowest selected feature is the low-cardinality one its error reaches every other feature's tail with real rows on it. Accumulating the cells in double or in row blocks merged in double: this is the root cause, and it would also take the rounding out of the gains a block-ordered fit chooses on, but it changes the fill, the hottest loop in the host tree, for a defect the finder can close exactly; it is the reopener below. Shuffling rows inside Dataset: a permutation gather of the binned matrix on every construction, every row-indexed output remapped, and every model hash moved for a defect in the finder's reading. Documenting that rows must be shuffled: the fit is the library's to get right.
Reopener. A block-ordered classification fit whose chosen splits are shown to differ from the shuffled fit's by more than seed-level noise on a task with signal, which would mean the cells' own rounding, not the finder's reading, is steering the fit; the fix is then the fill's accumulation, priced same-pod against the fill buckets of decisions 148 and 167. On the cost side: a same-pod reading, on a Xeon or the EPYC 4565P, in which the group prefetch puts a wide find above the copy-of-main band; the L2 variant and no prefetch are the two fallbacks, and neither moves a hash.
170. The 2.11.0 refresh reads the cpu-tall cells 17 to 22% under 2.10.0 same-pod, holds the GPU cells on a six-rep reading, and draws a Xeon 6952P host where every cpu cell is bonsai's (adopted)#
Decision. The 2.11.0 standings supersede 2.10.0's on every axis: ten measured in one session on an RTX PRO 6000 Blackwell Server Edition pod at main b2aaed6c, the code axis locally at the same sha, parity on the standings pod, the CPU A/B on a 16-vCPU cpuset pod from the driver's create ladder, and the GPU A/B on a second Blackwell pod, because the standings pod's two reps could not settle it. The release's code changes are the row fill's whole-row prefetch and aligned mirror (decision 167), random_seed reaching the feature draws (decision 168), and the finder scoring each feature against its own totals with the five scan changes that came with it (decision 169), plus the Python-surface fixes the changelog lists. Every host model hash moves with decision 169 (depthwise f798c1010c459ccc, leafwise 10b7b8e8a1b324f8, levelwise 835518e76e3f2cb0); device hashes hold.
The GPU cells hold, on a second reading. The session's A/B on the standings pod (two reps, host Intel Xeon 6952P) read cuda_depthwise +10.1% against old at 1M x 100 (0.30 to 0.33 s) and +7.6% at 16M x 100 (3.01 to 3.24 s), with cuda_levelwise at -3.3% and -0.9%. The gate reads the depthwise cells as moved, and the buckets say where the difference sits: the 16M depthwise train reads 2.05 and 2.03 s in the old arm and 2.05 and 2.03 s in the new, while ingest ranges 0.99 to 1.27 s across the arms, and the same pod's gpu-tall rows read bonsai's device ingest between 1.5 and 3.6 s from one rep to the next. Two reps cannot resolve a 5% band on a host whose ingest swings that far, so the A/B loop ran again on a second pod with six reps, the same pod script with only the rep count changed and the new arm built at b2aaed6c (RTX PRO 6000 Blackwell Workstation Edition, host AMD EPYC 9355P). That file is ab-gpu-2.11.0.jsonl (anchor 1.15.0 wheel, old 2.10.0 wheel, new 2.11.0 source, interleaved, min over six reps, fit seconds): cuda_depthwise 1M x 100 anchor 0.45, old 0.24, new 0.23 s (-0.8% against old); cuda_levelwise 0.79, 0.29, 0.28 (-2.1%); 16M x 100 cuda_depthwise 4.61, 2.86, 2.86 (+0.1%); cuda_levelwise 4.46, 2.76, 2.79 (+0.8%); peak RSS and r2 equal across old and new on every cell. The reps spread up to 11.0% inside an arm at 1M and 6.4% at 16M; the 16M depthwise ingest minimum reads 0.566 s old and 0.565 new, the train minimum 2.287 and 2.296. That pod's quota was 13 cores under the 16 threads the cells ask for, in every arm alike. The moves against the anchor (-38 to -65%) are the 1.15.0 to 2.10.0 history. The two-rep rows stay out of the ledger and are recorded here. Parity on the standings pod's 16M cuda_depthwise cell: fused 3.13 s against two-step 3.25 on the medians of two reps (+3.7%, inside the 5% band; the two-step reps read 3.37 and 3.13), the two-step split ingest 1.23 and train 2.02.
The cpu cells read decisions 167 and 169. The ladder answered with an AMD EPYC 9575F host (ab-cpu-2.11.0.jsonl, 16 vCPU cpuset, 12 threads, six interleaved reps at tall and two at wide, min over reps, fit seconds): tall depthwise anchor 12.29, old 10.14, new 8.37 s (-17.5% against old, -31.9% against the anchor); leafwise 12.31, 10.88, 8.53 (-21.6%, -30.7%); levelwise 10.81, 9.43, 7.55 (-19.9%, -30.2%); wide depthwise 91.21, 41.23, 35.74 (-13.3%, -60.8%); leafwise 58.35, 34.95, 33.81 (-3.3%, -42.1%); levelwise 135.79, 50.95, 42.85 (-15.9%, -68.4%); peak RSS within 1.6% and r2 equal to four digits across old and new on every cell, where the trees themselves differ (decision 169). The tall cells are the row fill, which decision 167 read at -20.9% on the same shape same-pod on an EPYC 9555: the reps spread up to 25% inside an arm, and the medians agree with the minima (depthwise 11.50 to 8.49 s, leafwise 11.27 to 9.06, levelwise 9.85 to 7.74). The wide cells are the finder, with one caveat: the second rep ran about twice as slow as the first in five of the six old and new arms (new depthwise 35.7 and 78.8 s, old 41.2 and 80.3), so each wide number rests on one quiet rep. The sign matches decision 169's same-pod table on all three growers.
The host plane draws a Xeon. The standings pod's CPU is an Intel Xeon 6952P (384 vCPU, a 40.8-core quota), the part decision 165 measured the keep hint on, and the first Xeon standings host under the default wait policy (decision 164) and the keep hint, which is the reading decision 166's reopener named. Train seconds at 12 threads: cpu-tall bonsai depthwise 8.6 against XGBoost 11.3, leafwise 8.8 against LightGBM 14.7, levelwise 8.2 against CatBoost 13.0; cpu-wide 38.0 against 191.5, 30.3 against 72.4, 45.2 against 117.3. Decision 162's Xeon 6760P rows read depthwise 21.9 against XGBoost 14.3 and handed two cpu-tall cells to the references; on this Xeon every cpu cell is bonsai's. Those are rows from two pods and two parts, so they say who leads on each host and are not a delta. The quota throttled 1.7% of periods at cpu-tall and 0.5% at cpu-wide. The GPU rows carry this host's ingest: the gpu-tall fits read 3.8, 4.2 and 5.4 s where 2.10.0's rows read 3.3, 3.3 and 3.1, with train at 2.3, 2.3 and 2.2 s in both sets, and bonsai's levelwise ingest ties CatBoost's on this pod. The quality axes rank as before; the host hashes moved, so bonsai's per-category mean ranks move by up to 0.16.
Rejected. Shipping the two-rep GPU file with the argument above: the gate passes on a cited decision, but the results page would render a +10% depthwise cell that the train bucket contradicts, and a reader of that page sees the table, not the argument. Pooling the two GPU files' rows: arms measured on two hosts are what the gate's host check refuses, and a min over reps from two pods is a cross-pod comparison. Re-measuring the wide CPU cell for its slow second rep: its three signs agree with decision 169's five-rep same-pod table, and a second CPU pod would only tighten a reading already made.
Reopener. A six-rep GPU A/B that reads a depthwise cell past the band with the train bucket moving is a regression and reopens this entry. Two GPU reps are too few on a host like this session's; raising the pod script's count is a source change left for after the release. A Xeon flavor in the CPU create ladder remains the way to read a release A/B on a Xeon directly.
Standings: gpu-tall, cpu-tall
171. A fit with early stopping returns the rounds up to its best validation loss however the loop ended (adopted)#
Context. train_with_progress truncated the booster to its best validation round only when patience fired. A fit whose round budget ended first returned every round it grew, so which model a caller got depended on whether n_iters exceeded the best round plus the patience, a threshold nobody can see before fitting. Finding 36 of the 2026-10-31 hunt over the Python surface reproduces it on 2.11.0: a 600 x 4 regression at learning rate 0.3 and patience 10 has its best validation loss, 4.177, at round 4; with n_iters 500 the fit stopped and returned 4 rounds, and with n_iters 8 it returned 8 rounds scoring 4.383, while the estimator's best_iteration and best_score reported round 4 and 4.177 for a model that was neither. The parameters page already said the stop keeps "the best iteration", and the estimator called best_iteration "the round early stopping kept". The reference libraries agree on what a user carries over: XGBoost sets best_iteration whether or not patience fired and its sklearn predict reads it, LightGBM sets it at the last round and predicts from it, and CatBoost shrinks the model to its best iteration whenever an eval set is present.
Decision. With booster.early_stopping_rounds above 0 and a validation set, the end of the loop, on a stop or on the last budgeted round, truncates the booster to the rounds up to its best validation loss. keep_best_rounds in src/cli/pipeline.cpp is the one truncate call site, and the CLI, Python's train and the bench all reach it through train_with_progress. The stopper counts the rounds to keep, so the truncation is the warm start's rounds plus kept_rounds(); it never drops a round the warm start brought and always keeps the first new one. The CLI prints one notice for both endings, fit: early stopping kept K of N rounds (valid <objective> loss L), only when rounds were dropped; it replaces fit: early stop at iter N (best iter B, ...), which nothing in the tree parsed. Python prints nothing. The eval history keeps every scored round, so it can be longer than the model, as it already was after a stop. Pinned by early-stopping-keeps-best-round in tests/unit/test_cli_pipeline.cpp over both endings (against the old rule the pin reads 40 == 30) and by an estimator test in python/tests/test_estimators.py. No model hash moves, since the hash configs carry no validation set. A fit with an eval set and patience 0 is untouched: it records the history and keeps every round, which is the fixed-iteration arm of the early-stop benchmark. That benchmark's stop arm runs patience 50 under a cap of 2000, and one committed row ended on its cap: bonsai_cuda_levelwise in benchmarks/results/gpu-early-stop-2026-11.jsonl reads stopped_at 2000. Its next measurement reports its best round, 2000 or under, and the metric of that model; the row stands until then.
Rejected. Keeping every round and defaulting predict to the best iteration, which is XGBoost's shape: the saved model would hold trees no default call reads, n_iters_ would stop naming the model that predicts, and bonsai already truncates on a stop, so a fit would have two shapes depending on how it ended. A use_best_model switch: patience 0 with an eval set already records the history without truncating, so the switch would be a second spelling of a configuration that exists. Keeping the rule and correcting the two documentation sites: the returned model would still turn on whether the budget exceeded the best round plus the patience.
Reopener. A caller who trains in chunks through init_model gets a new stopper per call: patience does not carry across calls, and each call's truncation sees only its own rounds. If chunked fits under one shared patience are asked for, the stopper's state has to travel with the model or the call. A caller who wants the whole budget and the best round only reported sets patience 0 and reads evals_result.
172. A sample weight weighs the base score and the renewed leaf values, by a weighted quantile that equal weights leave unchanged (adopted)#
Decision. A row's weight counts in every statistic a fit computes from its labels, not only in the row's gradient and hessian. The base score is the objective's weighted statistic: a weighted mean for MSE, the log-odds of the weighted positive share for LogLoss, the log of the weighted mean for Poisson, the weighted median or \(\alpha\)-quantile for MAE, Huber and Quantile, and weighted class shares for softmax. The leaf values MAE, Huber and Quantile renew are the weighted quantile of the leaf's residuals (for Huber, the weighted clamped mean around the weighted median). A fit with no weights calls the functions it called before, so the three host model hashes hold. A fit in which no row has a positive weight is refused with a fit needs at least one row with a positive weight.
What was wrong. Objective::init_score took the labels alone and the renewal built each leaf's value from unweighted residuals, so a weight steered the splits and nothing else, and for MAE and Quantile, whose gradients are signs, that left the leaf values and the starting point reading rows the caller had weighted out. A reading on the released 2.11.0 wheel and on this change (20,000 rows by 8 features, a linear target with noise 0.3, one row in five at weight 1 and the rest at weight 0 with their labels moved by 50, 50 rounds at learning rate 0.1 and depth 4), as the mean absolute error on the weighted rows against their own labels:
| objective | 2.11.0 | this change |
|---|---|---|
| mse | 0.294 | 0.226 |
| mae | 49.68 | 0.231 |
| huber | 49.65 | 0.225 |
| quantile | 49.68 | 0.231 |
poisson (target exp(0.2 y)) |
123.4 | 0.046 |
MSE recovers from a wrong base score because its trees fit what the base left over; an MAE fit cannot, since each renewed leaf took its median over rows of weight zero. With weights of 0.25, 1 and 4 drawn at random, an MAE fit's mean absolute gap to the fit on the same rows repeated 1, 4 and 16 times fell from 2.61 to 0.04. A fit whose weights were all zero was accepted and returned a model with no splits; it is now refused.
The quantile rule. Drop the values whose weight is not positive, sort the \(n\) that remain by value, scale their weights to average one, and take the first value whose running weight, less one half, exceeds \(\alpha (n - 1)\). Under equal weights the running weight at index \(i\) is \(i + 1\), so the rule takes index \(\mathrm{round}(\alpha (n - 1))\), which is the element the unweighted rule takes: a constant weight selects what no weight selects, pinned by "Objective: equal weights select the unweighted quantile" (invariant equal-weights-select-the-unweighted-quantile). The running weight is a double sum of float32 weights, divided by their mean in double: under equal weights every partial sum, the mean and the quotient are exact, so the identity holds bit for bit, and under uneven weights the sums are exact, and so independent of the order the rows are visited in, while the spread of the weights' exponents plus \(\log_2 n\) stays under 29 bits, and correct to rounding past that. The value is found by selection, not by a sort: split the values around a pivot (the median of the first, middle and last), sum the weight below it, and keep only the side the rank falls in. "Objective: the weighted quantile is the sorted scan's value" pins the selection to the rule read off a full sort, over repeated values, weightless rows and weights from 0.25 to 32. The rule depends on the weights only through their ratios; in float32 a rescale is exact for a power of two and to rounding otherwise. The weighted means accumulate as the unweighted ones do (float for MSE and LogLoss, double for Poisson), so unit weights give the unweighted base score bit for bit; Huber's weighted clamped mean equals the unweighted one under unit weights to rounding only.
What a zero weight does. The label of a zero-weight row never reaches the fit: two fits whose labels differ only on such rows predict the same on every row, for every host grower and objective (invariant zero-weight-labels-never-reach-the-fit, and estimators-ignore-zero-weight-rows through the estimators). A row outside a Dataset view weighs exactly what a zero-weight row does. The row's features still count: bin cuts are computed from every row and min_data_in_leaf counts rows, not weight, so a weighted fit is not the fit on the positive-weight rows alone. In the reading above the largest gap between the two predictions was 0.30 to 0.37 for the four regression losses, on a target of standard deviation 1.16.
The host cost. Fits with no weights run the code they ran. A weighted renewal carries eight bytes a row where the unweighted one carries four and sums weight on each side of every pivot. On an M2 at 2M rows by 32 features, 30 rounds at depth 6 on 8 threads, weights drawn from 0.25, 1 and 4, fit seconds as the min of three interleaved fits:
| objective | no weights | weighted, 2.11.0 | weighted, this change |
|---|---|---|---|
| mse | 1.55 | 1.68 | 1.67 |
| mae | 2.04 | 2.17 | 2.41 |
| huber | 2.15 | 2.25 | 2.57 |
| quantile | 2.04 | 2.18 | 2.40 |
The 2.11.0 column is the released wheel and the others a source build, run back to back on one machine and not interleaved with each other; the two builds' unweighted fits agree to 0.01 s on every row. A weighted MAE, Huber or Quantile fit costs 10 to 14% more than it did while its renewal ignored the weights, and a weighted MSE fit is unchanged. The host renewal is serial over leaves, weighted or not.
The device. A device fit seeds its scores from the host's init_score, so weighted MSE, LogLoss and Poisson fits on a CUDA grower are corrected with nothing moved off the device. The device renewal (decision 153) selects over rows counted once each, so a renewal fit whose rows carry weights now takes the host path, where the weighted selection lives (renew_leaf_on_host, invariant weighted-renewal-runs-on-host). That is a cost: a weighted MAE, Huber or Quantile fit on a CUDA grower goes back to the host renewal, which decision 153 measured same-pod at 4.7 to 5.5 s where the resident fit read 1.3 to 1.4 s (4M x 128, 100 trees, an RTX PRO 6000). That reading is of the unweighted host renewal; the weighted one has not been timed on a device. Before this change that fit ran resident and ignored the weights in the renewal, so the faster path was computing a different model. Unweighted fits and weighted MSE, LogLoss and Poisson fits stay resident, untouched. The route is pinned on the host by the predicate's own test; the device test ("A weighted renewal fit stays on the host") compiles and skips without a device, and its first run is on a GPU host.
Rejected alternatives. The lower weighted quantile (first value whose cumulative weight share reaches \(\alpha\), the rule scikit-learn's _weighted_percentile and XGBoost use): under equal weights it takes index \(\lceil \alpha n \rceil - 1\), not \(\mathrm{round}(\alpha (n - 1))\), so adopting it for weighted fits alone makes a fit under a constant weight differ from the unweighted fit, and adopting it everywhere moves every MAE, Huber and Quantile model. LightGBM's interpolated weighted percentile: the same objection, and it returns values no row holds. Counting the weightless rows in \(n\): a row at weight zero would then move the quantile, which the pin at \(\alpha = 0.2\) catches (a median cannot see it). An effective row count \((\sum w)^2 / \sum w^2\) in place of \(n\): it failed a worked example with uneven weights, where it selected below the value holding the weighted median. Exact agreement with repeated rows: impossible together with the equal-weights identity, because a constant weight of 2 must select what the unweighted rule selects on \(n\) rows while every row repeated twice is the unweighted rule on \(2n\) rows, and the two differ (three values at \(\alpha = 0.25\): index \(\mathrm{round}(0.5) = 1\), the second value, against index \(\mathrm{round}(1.25) = 1\) of six, the first). A full sort of each leaf's residuals, the first form of this change: the weighted MAE fit in the table above read 5.85 s, 187% over the unweighted fit, where the selection reads 2.41 s. A hand-written single pass that splits three ways and sums weight as it moves values: 2.36 s against 2.41 s, not worth replacing two calls to std::ranges::partition. A weighted select on the device: the kernel would be written with no GPU to run it, so the route moves and the kernel waits for a measured round.
Not covered. The training and validation losses a fit reports are unweighted means, and an eval_set with weights stays refused. The CLI does not check the sign of a weight column: a negative weight is skipped by the base score and the renewal but still scales its row's gradient. The monotone reprojection of an oblivious tree weighs leaves by cover, not weight. A leaf holding only weightless rows keeps the value the grower gave it.
Reopener. A weighted renewal workload on the device whose host renewal is a measured share of the fit worth a pod round: the weighted radix select is then priced same-pod against decision 153's table, with bit-equality to the host rule as its gate. A user who needs min_data_in_leaf or the bin cuts to follow weight, with the fit they expected and the one they got. A reference library agreeing on one weighted quantile convention that a user needs matched, measured against the equal-weights identity it would cost.
Status 2026-11-12: a weighted MAE, Huber or Quantile fit on a CUDA grower renews on the device again, by a weighted select that picks what this entry's rule picks (decision 174). renew_leaf_on_host and the invariant weighted-renewal-runs-on-host named under "The device" are gone with the host route, and the weighted radix select this entry's reopener named is that entry, which reads 79 to 83% off the fit same-pod.
173. A warm start keeps the loaded model's config, target count and column names, and refuses an invocation that states otherwise (adopted)#
Context. A warm start builds its booster from the loaded model's config and continues it, so the loaded learning rate, tree shape, seeds, sampler and bin settings grew every added round whatever the invocation said. reconcile_warm_start compared six fields (the three dispatch names, huber_delta, quantile_alpha, n_classes) and passed every other key through, and the returned model stored the invocation's config. Three things followed on 2.11.0. A continuation that stated booster.learning_rate, tree.max_depth, tree.lambda_l2, tree.feature_fraction or booster.dart_drop_rate grew trees bit-identical to the continuation that stated nothing, while the model's config reported the stated values. Predict multiplies every tree by the one learning rate the config carries, so a continued estimator moved its predictions on a pickle round trip or a save and reload: a model fit at 0.05 and continued under 0.3 read a train MSE of 0.489 before the round trip and 4.444 after. And a fit reads objective.n_targets = 1 as "take the width from y", so a 2-D y on a one-target model widened the config after the reconcile and trained on the first n values of the row-major label block. Nothing held the columns to the model's either: a frame with the model's columns in another order continued the trees on the wrong features (MSE 14.9 against 0.077 for the ordered continuation), and a Dataset naming its columns c, b, a against a model fit on a, b, c took a 30-round model from an MSE of 0.00 to 10.79 in one more round. The cuts check that guards the Dataset path cannot see that case when the columns bin alike.
Decision. The loaded config is the model's, and an invocation may state it but not change it. reconcile_warm_start walks the config registry: outside the keys the fit owns (the data, metrics and parallel sections, and booster.n_iters, booster.early_stopping_rounds and booster.log_intervals) a stated key must equal the loaded value and an unstated one inherits it, and the refusal names the key, the stated value and the model's. The Python train hands the reconcile every key the caller stated, where it filtered to the dispatch and objective sections, and the estimators withhold every model argument still at its constructor default, so BonsaiRegressor(n_iters=10).fit(X, y, init_model=path) continues any model. The label width is inferred on a cold fit only; a warm start requires y to carry the model's target count. Column names follow the rule a cold fit already applies to its eval set: the estimators hold X and the eval set's X against the loaded model's names once any of them names its columns (differing names raise, names on one side only warn), and train on a Dataset refuses when the model and the Dataset both name their columns and the names differ. Pinned by warm-start-config-is-the-models in tests/unit/test_cli_pipeline.cpp, whose fixture moves every registered field off its default so a field the registry gains later is held to the same rule, and by the warm start tests in python/tests/test_estimators.py, test_multi_target.py and test_feature_names.py. Every model hash holds. The name check reads the model a second time, and only when an input names its columns: on a 1000-tree depth-8 model (4.7 MB) bonsai.load reads 0.067 s on an M2, and a ten-round continuation over 50,000 x 50 reads 0.380 s on arrays and 0.448 s on a named frame.
What a caller meets. An invocation 2.11.0 accepted and ignored now raises: a restated learning_rate, tree shape, regularizer, seed, sampler rate or bin_mapper key that differs from the model's, and a CLI continuation that reuses a TOML whose model keys differ from the model. Values compare as written, so a positional monotone list [1] against a stored [1, 0, 0] reads as a disagreement. An estimator argument passed explicitly at its constructor default inherits and is not refused, since the estimator cannot tell it from an argument left alone, and get_params() keeps the constructor's value while Params.from_model reports the model's. The continued model's config carries the invocation's booster.n_iters, the count of rounds added.
Rejected. Honouring the stated keys. A learning rate per continuation needs shrinkage stored per tree, since predict applies one rate to the whole model, and that is a model format change with every loader behind it; honouring the tree and sampler keys means a booster that carries two configs, and every reader of the booster's config (predict, SHAP, the device planes) would need an audit for which one it means, for a use nobody has asked for. Warning and inheriting: the dispatch and objective disagreements were already refusals, and one situation with two outcomes by key is harder to state than the bug. Reordering a Dataset's columns to the model's by name: reorder exists and costs a copy, which is the caller's to spend. Refusing an unnamed Dataset or a bare array against a named model: every array-built continuation of a frame-fit model would break, and positions are all an array has. Checking bare arrays for a warning only: it would read the model on every array warm start to say something the caller cannot act on.
Reopener. Shrinkage stored per tree makes a continuation at another learning rate expressible, and booster.learning_rate then moves to the keys the fit owns. A named model continued on an unnamed Dataset still returns a model without names; carrying the model's names across is a change to what a Dataset fit records and waits on a user who loses them. A column really named f0 to fN in order reads as unnamed, the estimators' existing rule.
174. A weighted MAE, Huber or Quantile fit renews its leaves on the device, by a fixed-point weighted select that picks what the host's rule picks (adopted)#
Decision. The device renewal of decision 153 takes weights. A fit whose rows carry weights uploads them once into the resident plane and renews each leaf with decision 172's rule: among the leaf's rows of positive finite weight, the first residual in value order whose running weight, divided by the leaf's mean weight, less one half, exceeds \(\alpha (n - 1)\). The running weight is an integer. One kernel counts each leaf's rows of positive finite weight, sums their weights on one grid shared by the plane and takes the leaf's largest weight; a second kernel turns that into one power-of-two scale per leaf, chosen so the leaf's total lands on a 52-bit grid, so every sum the select makes is exact in a uint64_t and reads back exactly as a double. Each row then contributes ceil(w * scale) grid units, which is at least one unit for any positive finite weight. The select is decision 153's radix narrowing with weight in place of count: four passes of 8-bit digits, each pass a per-leaf histogram of grid units over the rows that still match the settled prefix, then one block per leaf scanning the 256 cells and settling the digit at which the host's predicate first passes. Huber adds the pass that sums the clamped deviations, each term weighted by its row's grid units and scaled by a second power of two, as two's-complement integers. A leaf with no such row keeps the grower's value, as on the host. A fit with no weights launches the kernels it launched before and the device model hash holds. Of those kernels one changed, by a fix this change carries: the narrowing kernel loads the leaf's select before its scan, where a load after the scan could read the select another thread had just narrowed; the count, Huber and value kernels compile to the machine code they had. The route decision 172 moved to the host moves back, so the one renewal fit that still renews on the host is the oblivious tree under a monotone constraint, weighted or not. Pinned by device-weighted-renewal-selects-as-host ("ResidentRenewal: a weighted fit renews leaves as the host does" on the three planes, with equal weights, a block of zero weights and a scattered view; unit weights renew as no weights; a leaf of zero-weight rows keeps the grower's value; a leaf far lighter than the plane renews as the host does; a weighted K-target fit) beside device-leaf-renewal-matches-host.
Why. Decision 172 made the weighted renewal correct by sending it to the host, named the cost (the host renewal decision 153 measured at 68 to 72% of a renewal fit) and left the device select as its reopener with bit-equality to the host rule as the gate. It also recorded that the weighted host renewal had never been timed on a device host. Priced from decision 153, whose unweighted select read 0.05 to 0.17 s per 100 trees where the host renewal read 3.1 to 3.8 s, a weighted select at four times the unweighted one still leaves a weighted fit within half a second of an unweighted one, and the integer grid is what lets the gate be equality, not a tolerance.
Measured. Same pod, an L40S (EPYC 9374F host, driver 595.91.07, 16 threads under a 13.6-core quota), the parent at e9930331, where a weighted renewal fit renews on the host, against the branch at c47a9e7c: decision 153's cell (4M x 128, depth 8, 100 trees, 255 bins, alpha 0.9, delta 1.0) with weights drawn uniformly from 0.25 to 4, four interleaved reps with the arm order flipped each rep, min over reps, fit seconds (ingest and train) with the host renewal bucket and the device renewal kernels of one profiled fit in parentheses:
| objective | plane | weights | parent | branch | delta |
|---|---|---|---|---|---|
| mae | depthwise | yes | 9.57 (7.20) | 1.75 (0.27) | -81.7% |
| mae | levelwise | yes | 9.39 (7.18) | 1.67 (0.22) | -82.2% |
| mae | leafwise | yes | 9.41 (7.31) | 1.75 (0.28) | -81.4% |
| huber | depthwise | yes | 10.25 (8.30) | 1.85 (0.38) | -81.9% |
| huber | levelwise | yes | 10.24 (8.06) | 1.79 (0.36) | -82.5% |
| huber | leafwise | yes | 10.35 (7.70) | 1.88 (0.38) | -81.8% |
| quantile | depthwise | yes | 8.73 (6.42) | 1.78 (0.28) | -79.6% |
| quantile | levelwise | yes | 8.52 (6.42) | 1.69 (0.24) | -80.2% |
| quantile | leafwise | yes | 8.67 (6.27) | 1.79 (0.28) | -79.4% |
| mse | depthwise | yes | 1.44 | 1.44 | -0.3% |
| mse | depthwise | no | 1.35 | 1.33 | -1.3% |
| mae | depthwise | no | 1.45 (0.09) | 1.45 (0.09) | -0.2% |
| huber | depthwise | no | 1.56 (0.19) | 1.55 (0.19) | -0.3% |
| quantile | depthwise | no | 1.47 (0.09) | 1.46 (0.09) | -0.6% |
A weighted renewal fit falls 79 to 83%, and the host renewal it replaces was 72 to 80% of the parent's fit: 6.3 to 8.3 s per 100 trees, the first timing of the weighted host renewal on a device host. The weighted select reads 0.22 to 0.28 s per 100 trees for MAE and Quantile where the unweighted select reads 0.09, and Huber 0.36 to 0.38 against 0.19: the totals kernel and the scale kernel run once per tree, and each pass sums 64-bit grid units where the unweighted pass counts in 32 bits. A weighted renewal fit on depthwise now costs 20 to 21% over the unweighted fit of its objective, where the parent read 5.9 to 6.6x; weighted MSE, which launches none of this, costs 8% over unweighted MSE on both arms. The five rows that launch no new kernel (weighted MSE and the four unweighted fits) return the parent's model bytes and read 0.2 to 1.3% under it, inside the spread between reps. Every cell's four reps return one model per arm. Correctness on the same pod: scripts/model_hash.py --grower cuda_depthwise prints e1a5391a7beea349 three times on each build, and the [cuda] suite passes on the branch (93 of 94, one skip on a one-GPU host). The commits after c47a9e7c rename and regroup the renewal code without changing what a row costs, read from a Jetson Orin build's machine code. The four unweighted kernels are byte-equal to c47a9e7c's. The three weighted kernels that run once per row (the totals, the count and the Huber sum) keep their instruction counts (64, 96 and 96) and differ only in the offsets they read: their row arrays arrive in one argument struct, and the per-leaf select grew from 48 to 56 bytes when the plane's weight sum took a field of its own (plane_total) apart from the leaf's (total). The four that run once per leaf differ by more: the weighted narrowing kernel reads 360 instructions against 392, the Huber scale kernel 176 against 184, the scale kernel drops a store nothing read, and the value kernel moves offsets only. 45 renewal fits at 20 rounds digest as they did at c47a9e7c. The rank rule itself has one home for both sides, WeightedQuantile::bounded_by in include/bonsai/objective.hpp, which the host scan and the device narrowing kernel both call. Sharing the two narrowing kernels' cell move and digit scan was tried and left out: it recompiled the unweighted narrowing kernel, 168 instructions to 152, and no same-pod timing stands behind that kernel changing. On a second cell (200k x 32, depth 6, the three planes by the three objectives by five weightings: none, all ones, uniform from 0.25 to 4, the same with three rows in ten at zero, and log-normal with sigma 4) the one-round device fit serializes to the host-forced fit's bytes in all 45 configurations, Huber included; at 20 rounds three runs of each build print one digest per configuration, the unweighted digests equal the parent's, unit weights digest as no weights, and the branch under BONSAI_HOST_OBJECTIVE=1 reproduces the parent's 36 weighted digests, so the host renewal is untouched. Quality at 100 trees: the branch under BONSAI_HOST_OBJECTIVE=1 returns the parent's model on all nine weighted renewal cells; the resident fit's unweighted test loss on 500k held-out rows differs from the host fit's by +7.0e-4 (MAE depthwise and leafwise), -9.7e-4 (MAE levelwise), -5.1e-4 and -1.2e-3 (Quantile's pinball) and by nothing in six digits for Huber. That is the drift between the resident and the host route decision 153 recorded for unweighted fits, both ways in sign, not a renewal difference: the one-round bytes are equal.
Rejected. One scale for the whole plane, taken from the fit's largest weight: a leaf whose weights all sit far below that maximum has every term round up to one grid unit and is renewed as if unweighted; the pin "a leaf far lighter than the plane renews as the host does" fails on it, and the per-leaf scale costs one more kernel over the leaves. A floating-point running weight, as the host keeps: the device sums with atomics in arrival order, so the sum and with it the selected element would vary run to run, which the integer grid cannot. A 51-bit grid: at a weight spread of 2^27 inside one leaf a tie between two candidates broke the other way from the host's double sum; 52 bits is the widest grid whose totals stay under 2^53 and read back exactly. Rounding a weight to the nearest grid unit instead of up: a positive weight far below its leaf's largest could round to nothing, and the argument that each pass settles exactly one digit needs every counted row to weigh one unit at least. A device sort of (leaf, residual, weight) with cub: decision 40 keeps cub out of the library, and the select needs no order. Keeping the host route: the 8.5 to 10.3 s in the table.
Not covered. A weight of infinity counts for nothing on the device, where the host renewal lets it count; no test holds either behaviour, and the base score is undefined for such a fit on both paths. A NaN residual is not handled by either select. A weighted renewal fit under a monotone fence on a grower other than the oblivious one runs on the device and is covered only by the unweighted fence pin. The device and the host can return zeros of opposite sign for a leaf whose quantile is zero, as the unweighted select already could. The test that a weighted fit ran resident reads it from the fit's second round differing from the host-forced fit, not from a statement by the booster. Past one round the resident fit and the host fit drift apart as decision 153 recorded for unweighted fits, so the equality the pins hold is at one round.
Reopener. Huber's weighted sum lands every row's atomic on its leaf's one address, as the unweighted one does; decision 153's per-block partial sum would take it back on both. A booster accessor that states whether the last fit ran resident would replace the arming test's indirect reading. A user who passes infinite weights, or whose leaves hold weights spread past about 2^28, with the fit they expected. A device reprojection of the oblivious leaf table, which would close the last host renewal for weighted and unweighted fits alike.
175. 2.12.0 carries nine standings axes from 2.11.0 on byte identity and re-measures the one axis its changes reach; a patch release ships on the model hashes and its own same-pod A/B (adopted)#
Decision. The 2.12.0 standings keep 2.11.0's measurement on nine axes (cpu-tall, cpu-wide, quality-grinsztajn, gpu-tall, gpu-wide, gpu-extreme, gpu-shap, quality-grinsztajn-gpu, quality-grinsztajn-leaf-capped-gpu), each under a carried-forward stamp at 14a888e0 with byte-identity evidence. The code axis is measured at 14a888e0. The gpu-early-stop axis is measured again on one rented GPU pod, because decision 171 changes what one of its cells returns. From here a patch release (2.12.1 and on) for a change that moves no model hash ships on two things: the six model hashes holding, and the same-pod A/B its own pull request already carries. Its standings are carried forward by the same stamp, and an axis is measured again only when the change reaches a cell of it. A full pod refresh runs at a minor release.
Why. The four changes between 2.11.0 and 2.12.0 (decisions 171 to 174) touch weighted fits, the end of an early-stopping loop and warm starts. No standings cell passes a weight or a loaded model, and only gpu-early-stop passes a validation set with patience. A refresh would have rented a GPU pod and a CPU pod for about three hours to time code that compiles to what it was, and its rows would differ from 2.11.0's only by the host the pods drew. The 2.11.0 refresh already showed that difference is large: decision 170's rows moved between two Xeon parts by more than any change in the release.
Measured. At b2aaed6c, which 2.11.0's rows were measured at, and at 14a888e0:
| check | host | result |
|---|---|---|
scripts/model_hash.py, depthwise, leafwise, levelwise |
M2 | f798c1010c459ccc, 10b7b8e8a1b324f8, 835518e76e3f2cb0 at both |
scripts/model_hash.py, cuda_depthwise, cuda_levelwise, cuda_leafwise, three runs each |
Jetson Orin Nano, one CUDA build per sha | e1a5391a7beea349, 56c3d85ec0e37094, d4d1539061bd3d36 at both |
| 21 host models, seven objectives by three growers, 20,000 x 20 | M2 | byte-equal at both |
The gpu-early-stop axis at 14a888e0 on an RTX PRO 6000 Blackwell Server Edition (EPYC 9655 host), 16,777,216 x 128, patience 50 under a cap of 2,000 rounds, two reps: bonsai levelwise stops at 1,980 where 2.11.0's row read 2,000, with r2 0.9002 in both, so the cell now reports the model the fit returns. Depthwise and leafwise stop at 1,278 with r2 0.8979, XGBoost at 1,216 and LightGBM at 847, each as before; CatBoost's two reps stop at 1,986 and 2,000 where they read 1,923 and 1,986. The fixed-iteration and eval-only cells return 2.11.0's r2 in every arm. The seconds in this file are from another pod than 2.11.0's and are not a delta against it. The pod's own A/B, the 2.11.0 wheel against the source build at 100 trees and two reps, min fit seconds: cuda_depthwise 0.298 to 0.275 at 1M x 100 and 2.826 to 2.811 at 16M x 100, cuda_levelwise 0.367 to 0.368 and 2.759 to 2.794, r2 equal in every pair. That file registers under gpu-tall, which is carried, so it is quoted here and not committed.
Rejected. A full refresh for 2.12.0: about three hours of two pods to re-time unchanged code on whichever hosts came. Carrying gpu-early-stop with the rest: its stamp would have rested on an argument, and the levelwise row would have gone on recording 2,000 rounds for a model of 1,980. Shipping a patch release on the hashes alone: a change that holds every hash can still move a timing, so the pull request's own same-pod reading stays part of the bar. A patch release that refreshes the standings: it puts a pod rental on every small fix, and a fix that waits for a minor to avoid the rental is the outcome this rule exists to stop.
Reopener. A patch whose change moves a model hash, or reaches a standings cell, measures that plane or that axis before it ships. A carried stamp is spent when its plane's digest next moves, as the protocol already holds. If two minors pass with every axis carried, the standings' hosts and reference library versions are stale whatever the hashes say, and the next minor refreshes in full.
176. The host leaf renewal shares its gather and its select across the team, each leaf by one thread over its residuals in row order (adopted)#
Decision. renew_leaves in include/bonsai/booster.hpp, which every MAE, Huber and Quantile fit on a host grower runs once per tree, no longer works on one thread. The residuals of the rows that carry weight go into one buffer grouped by leaf (gather_residuals): the rows are cut into blocks, a count pass and a write pass share the team, and a block writes each leaf's residuals after those of the blocks before it. Each leaf is then renewed by one thread over its own residuals, and the tree is written afterwards on one thread, so neither tree type needs to be safe to write from two. A leaf's residuals are in row order at any thread count, which is what the weighted quantile's and Huber's sums depend on, so the renewed values are the same bits at one thread and at any other. Two row floors keep small fits where they were: a renewal under 16,384 rows stays on one thread, and its gather stays on one thread under 131,072. Pinned by leaf-renewal-holds-at-any-thread-count ("Booster: leaf renewal is the same at any thread count", at 40,000 and 150,000 rows, weighted and unweighted, for the three objectives, at one, two and eight threads) and by "Booster: a shared gather keeps each leaf's residuals in row order", which holds the eight-thread gather to row order for every row in order and for a list that repeats rows and runs backwards. No model hash moves.
Why. Decision 172 made the weighted renewal correct and recorded its cost on the host, 10 to 14% of a weighted fit. Decomposed on an M2 (2M x 32, depth 8, 50 trees, eight threads), the renewal as a whole was 24 to 40% of a renewal fit, weighted or not: 0.98 to 1.57 s of 3.3 to 5.0 s. Inside it the per-leaf select read 1.116 s, the gather 0.210 s and the write-back 0.029 s on the weighted MAE fit, which sum to the 1.36 s bucket. The select is independent per leaf, so it was priced at a quarter of its time on eight threads, a fit about 18% shorter; it measured 18% (4.79 to 3.92 s). The gather was then the largest part left and was priced at 0.13 s more.
Measured. One M2 (four performance and four efficiency cores), eight threads, main at 06acc2fd against the branch, the two builds alternating. 2M x 32, depth 8, 50 trees, weights uniform from 0.25 to 4 where weighted, fit seconds with the renewal bucket of the fit profile in parentheses:
| objective | grower | weights | main | branch | delta |
|---|---|---|---|---|---|
| mae | depthwise | yes | 4.78 (1.36) | 3.83 (0.35) | -19.9% |
| mae | depthwise | no | 4.09 (0.97) | 3.29 (0.24) | -19.5% |
| huber | depthwise | yes | 5.02 (1.57) | 3.82 (0.39) | -24.0% |
| huber | depthwise | no | 4.21 (1.07) | 3.33 (0.27) | -20.9% |
| quantile | depthwise | yes | 4.36 (1.18) | 3.53 (0.36) | -19.0% |
| quantile | leafwise | yes | 3.62 (1.15) | 2.85 (0.39) | -21.4% |
| mae | leafwise | yes | 3.92 (1.30) | 3.00 (0.39) | -23.4% |
| mae | levelwise | yes | 3.32 (1.29) | 2.60 (0.60) | -21.7% |
| huber | leafwise | no | 3.46 (1.04) | 2.62 (0.31) | -24.5% |
| mse | depthwise | yes | 3.41 | 3.39 | -0.8% |
Every pair predicts the same bytes on 200,000 rows. The select alone took the weighted MAE fit to 3.92 (0.48) and the gather the rest. Smaller MAE fits, 16 columns, depth 6, min over nine fits per arm in milliseconds:
| rows | trees | weights | main | branch | delta |
|---|---|---|---|---|---|
| 500 | 300 | no | 267.8 | 268.0 | +0.1% |
| 500 | 300 | yes | 298.4 | 294.8 | -1.2% |
| 5,000 | 300 | no | 422.9 | 421.7 | -0.3% |
| 5,000 | 300 | yes | 446.2 | 440.4 | -1.3% |
| 16,000 | 300 | no | 579.8 | 580.2 | +0.1% |
| 16,000 | 300 | yes | 624.9 | 610.6 | -2.3% |
| 20,000 | 300 | no | 635.3 | 629.0 | -1.0% |
| 20,000 | 300 | yes | 641.5 | 638.7 | -0.4% |
| 120,000 | 120 | no | 707.1 | 634.7 | -10.2% |
| 120,000 | 120 | yes | 750.5 | 664.2 | -11.5% |
| 140,000 | 120 | no | 765.8 | 673.0 | -12.1% |
| 140,000 | 120 | yes | 830.1 | 704.0 | -15.2% |
| 1,000,000 | 40 | no | 1439.2 | 1118.0 | -22.3% |
| 1,000,000 | 40 | yes | 1652.3 | 1239.0 | -25.0% |
The floors come from the same machine. Without the first, a 500-row fit read 5% over main, since entering the team cost about 50 microseconds a tree where the shared select saved about 8 ns a row. Without the second, the shared gather read 1 to 4% over the one-thread gather at 20,000 and 50,000 rows and 2 to 4% under it from 100,000 up, because it enters the team twice more. Identity: the three host model hashes hold, and 21 models (seven objectives by three growers, 20,000 x 20) are byte-equal to main's.
Rejected. Sharing the write-back: it is 2% of the renewal, and a view may name a row twice, so two threads would write one row's value. One vector of residuals per thread and leaf, concatenated afterwards: the count pass gives every block its place in one buffer and no residual is copied twice. One team entry for the three passes: it would remove the second floor, but for_each_index opens one region per call and the floors already keep small fits flat. Leaving the gather on one thread: at eight threads it was 44% of what the renewal had left, and its share grows with the thread count.
Not covered. Every number here is from one Apple machine. No x86 host has timed this change, so the floors are not known to sit right on a host whose team costs more or less to enter. The levelwise renewal kept 0.60 s of its 1.29 s where the others kept 0.35 to 0.39 s, and that difference is not attributed. The shared gather is tested on identity and on one list with repeats; it is not tested on a view that runs encode as runs of rows.
Reopener. A same-pod reading on an x86 host that puts either floor in the wrong place. A leaf that holds most of a tree's rows is still selected by one thread, which is the likely cost in the levelwise row; a select that shares one leaf's partition would take it. A K-target fit renews K trees a round, one after another, where the K renewals are independent.
Status 2026-11-19: a Xeon 6952P and an EPYC 9575F host timed this change same-host, 2M x 32 renewal fits 19 to 46% shorter, and both read the shared gather ahead from 50,000 rows, so the gather floor fell to 65,536 (decision 177).
177. The shared leaf renewal holds on a Xeon and an EPYC host, and its gather is shared from 65,536 rows (adopted)#
Decision. The gather floor of decision 176 falls from 131,072 rows to 65,536 (gather_team_min_rows in include/bonsai/booster.hpp). The select floor stays at 16,384 rows. Nothing else in the renewal changes. The pins are the ones decision 176 names, and their 40,000 and 150,000 rows still sit on either side of the gather floor.
Why. Decision 176 measured on one Apple machine, listed an x86 reading as not covered, and named it as the reopener. Decision 175 asks a patch release for a same-pod A/B of its change. Two rented hosts answered both questions: whether the change holds where the engine's users run it, and where each floor sits there. An Intel host was rented as well as an AMD one because the two have disagreed about this engine before (decisions 164 and 165).
Measured. Two hosts, each timing main's parent 06acc2fd against main at 5366469b, both built on the host, the two arms alternating and their order flipped each rep, 16 threads, default wait policy. The Xeon is the host of a GPU pod: an Intel Xeon 6952P, two sockets, six NUMA nodes, a 40.8-core CPU quota. The EPYC is a CPU pod: 16 vCPU of an AMD EPYC 9575F as a cpuset, no quota. 2M x 32, depth 8, 50 trees, weights uniform from 0.25 to 4 where weighted, fit seconds with the renewal bucket of the fit profile in parentheses, min over three reps on the Xeon and four on the EPYC:
| objective | grower | weights | Xeon main | Xeon branch | delta | EPYC main | EPYC branch | delta |
|---|---|---|---|---|---|---|---|---|
| mae | depthwise | yes | 4.88 (2.43) | 2.82 (0.33) | -42.2% | 5.18 (1.83) | 3.71 (0.36) | -28.5% |
| mae | depthwise | no | 4.28 (1.72) | 2.74 (0.27) | -35.9% | 4.32 (1.40) | 3.21 (0.27) | -25.7% |
| huber | depthwise | yes | 5.10 (2.64) | 2.77 (0.35) | -45.7% | 4.97 (1.70) | 3.68 (0.35) | -26.1% |
| quantile | leafwise | yes | 4.40 (2.04) | 2.73 (0.41) | -37.9% | 4.08 (1.52) | 2.85 (0.39) | -30.2% |
| mae | levelwise | yes | 4.19 (2.13) | 2.67 (0.58) | -36.2% | 3.77 (1.39) | 2.92 (0.59) | -22.5% |
| mse | depthwise | yes | 2.44 | 2.51 | +2.6% | 3.24 | 3.24 | +0.1% |
Every pair predicts the same bytes on 200,000 rows. The EPYC also read Huber depthwise unweighted at -19.0% and MAE leafwise weighted at -26.1%. The MSE fit runs no renewal: its three Xeon reps spread 5% within each arm, and their medians read 2.53 and 2.55 s. Smaller MAE fits, 16 columns, depth 6, fit milliseconds, min over three reps of a process that fits ten times under 20,001 rows, six times to 150,000 and three times above:
| rows | trees | weights | Xeon main | Xeon branch | delta | EPYC main | EPYC branch | delta |
|---|---|---|---|---|---|---|---|---|
| 500 | 300 | no | 218 | 216 | -1.0% | not resolved | not resolved | |
| 500 | 300 | yes | 233 | 233 | +0.0% | not resolved | not resolved | |
| 5,000 | 300 | no | 342 | 318 | -7.2% | not resolved | not resolved | |
| 5,000 | 300 | yes | 342 | 339 | -0.9% | not resolved | not resolved | |
| 16,000 | 300 | no | 511 | 473 | -7.4% | not resolved | not resolved | |
| 16,000 | 300 | yes | 492 | 526 | +6.9% | not resolved | not resolved | |
| 20,000 | 300 | no | 526 | 492 | -6.4% | not resolved | not resolved | |
| 20,000 | 300 | yes | 550 | 511 | -7.1% | not resolved | not resolved | |
| 50,000 | 200 | no | 616 | 581 | -5.6% | 620 | 529 | -14.7% |
| 50,000 | 200 | yes | 693 | 574 | -17.1% | 640 | 601 | -6.1% |
| 120,000 | 120 | no | 707 | 560 | -20.8% | 666 | 550 | -17.3% |
| 120,000 | 120 | yes | 728 | 599 | -17.6% | 702 | 637 | -9.3% |
| 1,000,000 | 40 | no | 1255 | 737 | -41.3% | 1184 | 800 | -32.4% |
| 1,000,000 | 40 | yes | 1379 | 800 | -42.0% | 1491 | 898 | -39.8% |
Under 16,384 rows both arms renew on one thread, and the Xeon reads them within 7.4% of each other in both directions: the two 16,000-row cells read -7.4% and +6.9%, and one arm's three reps spread up to 13%. The EPYC session, the earlier of the two, fitted three times per process, and under 50,000 rows a process's first fit read up to 6.7 times its third, so its fit times there are not a reading. Its renewal bucket repeated, and read 3 ms a fit on both arms at 500 rows, 23 and 20 at 5,000 unweighted, and 78 and 76 at 16,000 weighted.
The floors, from a third build that reads both from the environment and is not in the tree. The select floor first: the renewal on one thread against the renewal with a shared select and a one-thread gather, weighted MAE, renewal microseconds per tree:
| rows | Xeon one thread | Xeon shared | delta | EPYC one thread | EPYC shared | delta |
|---|---|---|---|---|---|---|
| 500 | 17 | 29 | +73% | 11 | 48 | +333% |
| 2,000 | 58 | 120 | +108% | 33 | 67 | +100% |
| 5,000 | 106 | 133 | +26% | 81 | 104 | +27% |
| 10,000 | 189 | 184 | -2% | 200 | 152 | -24% |
| 16,000 | 298 | 229 | -23% | 252 | 207 | -18% |
| 30,000 | 564 | 433 | -23% | 476 | 382 | -20% |
| 50,000 | 886 | 631 | -29% | 806 | 583 | -28% |
The shared select pays from 10,000 rows on both hosts and costs a quarter of the renewal at 5,000, so 16,384 stands. The gather floor: a shared select with a one-thread gather against a shared select with a shared gather:
| rows | Xeon one thread | Xeon shared | delta | EPYC one thread | EPYC shared | delta |
|---|---|---|---|---|---|---|
| 20,000 | 291 | 277 | -5% | 259 | 296 | +14% |
| 35,000 | 460 | 389 | -15% | |||
| 50,000 | 636 | 486 | -24% | 589 | 444 | -25% |
| 65,536 | 775 | 633 | -18% | |||
| 80,000 | 881 | 652 | -26% | |||
| 100,000 | 1111 | 804 | -28% | 1148 | 704 | -39% |
| 130,000 | 1347 | 926 | -31% | 1491 | 852 | -43% |
| 250,000 | 2211 | 1511 | -32% | 2289 | 1333 | -42% |
| 500,000 | 4704 | 1981 | -58% | |||
| 1,000,000 | 6750 | 3056 | -55% | 9639 | 3361 | -65% |
The shared gather pays from 50,000 rows on both hosts, where the floor of decision 176 kept it on one thread up to 131,072. Between the two floors that was 6 to 8% of a fit: the shared gather read the fit 6.3% shorter at 65,536 rows, 8.0% at 80,000, 6.6% at 100,000 and 7.2% at 130,000 on the Xeon, and 7.7% and 7.5% at 100,000 and 130,000 on the EPYC. The M2 of decision 176 then timed the two floors against each other, main against main with the floor at 65,536, eight threads, the builds alternating, fit milliseconds, min over 18 or 24 fits per arm:
| rows | weights | floor 131,072 | floor 65,536 | delta |
|---|---|---|---|---|
| 50,000 | no | 818.2 | 807.8 | -1.3% |
| 50,000 | yes | 852.1 | 839.0 | -1.5% |
| 65,536 | no | 779.1 | 740.8 | -4.9% |
| 65,536 | yes | 815.8 | 786.6 | -3.6% |
| 65,536 | no | 723.7 | 725.2 | +0.2% |
| 65,536 | yes | 752.0 | 745.5 | -0.9% |
| 70,000 | no | 673.2 | 669.6 | -0.5% |
| 70,000 | yes | 737.0 | 726.1 | -1.5% |
| 80,000 | no | 649.9 | 646.5 | -0.5% |
| 80,000 | yes | 692.2 | 687.4 | -0.7% |
| 100,000 | no | 729.2 | 706.6 | -3.1% |
| 100,000 | yes | 787.9 | 760.7 | -3.5% |
| 120,000 | no | 632.2 | 618.5 | -2.2% |
| 120,000 | yes | 700.9 | 688.8 | -1.7% |
| 200,000 | no | 663.7 | 652.2 | -1.7% |
| 200,000 | yes | 744.9 | 743.0 | -0.3% |
The 50,000 and 200,000 rows run the same code on both arms and read up to 1.7% apart, which is what this machine resolves. Against that, the lower floor reads between +0.2% and -4.9% on the M2 from 65,536 rows, which was timed twice. Identity: the three host model hashes hold, 21 models (seven objectives by three growers, 20,000 x 20) are byte-equal to main's, and every pair in the tables above predicts the same bytes.
Rejected. A gather floor at 50,000 rows, where both x86 hosts already gain: decision 176 read the shared gather 1 to 4% over the one-thread gather there on the M2, and this round's M2 arms did not time a floor that low. A select floor at 10,000 rows: it is break-even on the Xeon (-2%) and saved 48 us of a 1.5 ms tree on the EPYC, 3% of the fit, against a cost at 5,000 rows on both. A floor per architecture: two constants to keep right for the 15,000 rows between where x86 and the M2 put the gather.
Not covered. The Xeon is metered by a CPU quota, not a cpuset: nr_throttled rose by 228 periods across the 16-minute run, of about 9,900, and both arms shared them. Whole-fit time under 50,000 rows has one x86 reading, the Xeon's. The Xeon is a 6952P under a container; no bare-metal host and no other Intel core has timed this. The levelwise renewal still keeps 0.58 to 0.59 s where the others keep 0.27 to 0.41 s, as in decision 176.
Reopener. A host that reads the shared gather over the one-thread gather between 65,536 and 131,072 rows. An M2 reading of a gather floor at 50,000 rows that is flat, which would let the floor follow x86 down. Decision 176's reopeners stand.