docs / xpu

XPU index
  1. Overview
  1. One model, start to last token
  2. The scheduler: what runs when, beside what
  3. Optimization: what is decided when, and what is remembered
  4. Language models on the device: the cajeta-llm kernels
  5. Gradient boosting on the device: the cajeta-xgboost kernels
  6. Catalog: every cajeta-llm kernel
  7. Catalog: every cajeta-xgboost kernel

Math

  1. Overview

Nucleo

  1. Overview

ML

  1. Overview

LLM

  1. Overview
  2. Configuration
  3. Inside the engine
  4. Measuring, and where it stands
  5. Models and weight formats
  6. Quickstart
  7. Running and serving
  8. The engine API

Catalog: every cajeta-xgboost kernel

Generated from the sources of dev.cajeta.xgboost 0.7.0 on 2026-10-25 by tools/catalog/gen-catalog.py: every @Kernel in the gpu package, its name linked to its source line, the training stage it serves, whether it declares a 32-lane wave, and under it its role from the kernel’s own documentation. The stages, decompositions and the one measured adaptation are described in Gradient boosting on the device.

33 kernels. Every one is integer-exact across backends except the gradient and leaf kernels, whose float32 results are per row and need no reduction.

kernelstage@Wave(32)
binCellsBinning
One thread per (row, feature) cell binary-searches the quantile cuts on integer order keys, so the bin does not depend on the device's float compare.
histTilesHistograms
Tile x of rows rows over feature group y, summed in workgroup memory and merged once per nonzero word; a level tile's segment comes from plan, else it is sBegin, sCount at sBase.
levelTilesHistograms
Writes split j over its tiles of tileSplit when its half segment has at least minRows rows; its first tile is in slotTab, its count in tab.
histScatterHistograms
The legacy whole-dataset histogram: one thread per cell, int64 global atomics, a position filter selecting the node's rows.
histSegmentHistograms
Node histogram over a row segment: one thread per (segment row, feature) cell, the same integer atomics as histScatter, into the slot at word base.
zeroRangeHistograms
Zeroes words [base, base + n) of buf.
subtractSlotHistograms
Sibling subtraction over one slot: store[out + i] = store[parent + i] - store[built + i].
copyWordsHistograms
Copies the first n words of src into dst.
zeroWordsHistograms
Zeroes the first n words of buf.
childSlotsHistograms
Per split j of a level: the smaller child is built in the new slot of slotTab (parent base, new base, first cell, first tile) and the larger derived in the parent's; plan gets built base, begin, count and derived base, and bases the two children's slot bases, left then right.
zeroLevelHistograms
Zeroes the built slot of every split in plan.
histLevelHistograms
histSegment over every built child of a level: cell i belongs to the last split whose first cell in slotTab is at most i, and cells past the child's rows do nothing.
subtractLevelHistograms
The derived slot of every split in plan, in place: parent minus built.
addLeavesLeaves
Position p of ridx belongs to the last leaf of tab (segment begin, float32 value bits; ascending begins) whose begin is at most p; its row's margin of group gains that leaf's value in float32.
squaredErrorGradients
One thread per row: gradient and hessian of the squared-error objective at the current margin.
logisticGradients
One thread per row: logistic gradient and hessian, the exponential through the captured exp2 table and the software fused multiply-add model.
softmaxGradients
One thread per (row, class); each thread re-scans its row's classes for the maximum and the sum.
partitionScatterPartition
The legacy partition: one thread per row, int64 atomic adds for the left and right counts.
segmentCountPartitionyes
The partition's first pass: each workgroup stores how many of its rows go left.
segmentPlacePartitionyes
The second pass: a left row goes to its block's base plus the left rows before it in the block, a right row after every left row in segment order.
levelBlocksPartition
Workgroup j marks each block of split j's segment with j in blockSplit.
levelCountPartitionyes
segmentCount over every split of a level: block w counts the left rows of its split's block.
levelBasesPartitionyes
Workgroup j turns split j's block counts into block bases in place and stores its left count.
levelPlacePartitionyes
segmentPlace over every split of a level, into scratch.
levelCopyPartition
Copies every split's segment of a level from scratch back into ridx.
copySegmentPartition
Copies the segment [begin, begin + count) of src into dst.
identityPartition
ridx[r] = r for every row: the root's segment.
clipWordsGradient quantisation
Word w of sum s (0 grad+, 1 grad-, 2 hess+, 3 hess-) over rows r*stride + offset: each value's 24-bit mantissa lands at bit exponent - 1.
serialSumsGradient quantisation
The host's four ascending float64 clip sums, by one thread, into out[4].
quantizeGradient quantisation
fixedGrad and fixedHess of each row into q (row-major pairs).
featureScanSplit findingyes
Stage A, one 32-lane wave per feature and a lane per boundary of a 32-boundary tile.
levelScanSplit findingyes
#featureScan for a level: one 32-lane wave per (node, feature), reading node j's slot of the device store at word slotBase[j] (interleaved G and H per bin, then the totals).
levelPickSplit finding
Stage B for a level, a thread per node: SplitFinder.findBest's cross-feature update over the node's records (strict > after the min_child_weight gate, so ties keep the lowest feature).

Source: docs/xpu/catalog-xgboost.md · 5 min read · 1000 words