Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 10 Oct 19:04
· 39 commits to main since this release
Immutable release. Only release title and notes can be modified.
ad4901e

hessboost v0.3.0

Minor release: NVIDIA CUDA joins Metal and wgpu as a GPU backend that reproduces the single-threaded CPU model bit for bit — histogram training and compact-forest prediction — shipped on Linux through the opt-in hessboost[cuda] runtime, a second PyPI distribution carrying the CUDA-enabled extension. Also a faster dense prediction path and license texts in every distribution. Existing users need no source changes.

Full Changelog: v0.2.4...v0.3.0

Highlights Since v0.2.4

CUDA training and prediction

  • device = "cuda" (or "cuda:<n>"; gpu/gpu:<n> are accepted too) trains hist and approx and predicts on NVIDIA GPUs, reproducing the single-threaded CPU model bit for bit: every node follows the CPU's own bin-summation order (tree::hist::sum_order), sums exactly in integers wherever the CPU's sums are provably exact, and otherwise runs the CPU's f64 chains on the device — depthwise numeric splits are searched and the sibling subtracted resident on the GPU, while categorical and loss-guided scans are downloaded and decided by the host.
  • The kernels are Rust compiled to committed PTX (cuda-kernels/, cuda-oxide), so a consumer build needs no CUDA compiler, no cuda-oxide, and no NVRTC: only the driver (CUDA 12.8 or later, compute capability 7.5+) is opened at run time. cuda-kernels/build.sh refuses PTX with an approximate, flush-to-zero, or contractible floating-point instruction, and CI rebuilds the PTX and compares it byte for byte.
  • Node order, the column sampler, bounds, and interaction state stay on the host, so the tree is the host builder's; the GPU also keeps a plain gbtree fit's training margins for reg:squarederror and the logistic objectives, computing gradients and adding leaf values without per-row transfers. Non-finite gradients, mismatched inputs, and everything after a CUDA error run on the CPU, and backend::cuda::available / unavailable_reason / device_name report per-ordinal status.
  • scripts/bench_xgb.py --device cuda trains XGBoost's CUDA backend and hessboost side by side and records the GPU. Qualification: an L40S (compute capability 8.9) and a T4G host ran the CUDA suites with HESSBOOST_REQUIRE_CUDA=1, Compute Sanitizer's four modes clean.

Python: hessboost[cuda]

  • pip install 'hessboost[cuda]' installs hessboost-runtime-cuda: the same extension built with its cuda feature, as manylinux x86_64/aarch64 wheels (abi3 and free-threaded 3.14t) and an sdist. hessboost._hessboost replaces itself in sys.modules with the runtime's extension, and a runtime of another release raises ImportError.
  • Without the extra, device="cuda" and to_gpu("cuda") refuse with a message naming hessboost[cuda]. The default wheels and sdist stay CUDA-free and install with no CUDA anywhere.
  • Every wheel and sdist now ships its license text, enforced by a publish check (Apache-2.0 §4(a)).

Prediction

  • predict and predict_margin broadcast base_score into the margin buffer by doubling instead of one tiny extend_from_slice per row: up to a third faster on the benchmark's large dense cases (5–33%), with the same bytes at 1 and 8 threads.

Pull Requests by Category

Features

  • feat(cuda): add CPU-bit-identical NVIDIA training and prediction (#147)
  • feat(python): ship CUDA as the opt-in hessboost[cuda] runtime (#155)

Performance

  • perf(predict): broadcast base_score by doubling in initial_margins (#156)

Misc

New Contributors