Repository navigation
v0.3.0
·
39 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
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) trainshistandapproxand 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'sf64chains 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.shrefuses 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
gbtreefit's training margins forreg:squarederrorand 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, andbackend::cuda::available/unavailable_reason/device_namereport per-ordinal status. scripts/bench_xgb.py --device cudatrains 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 withHESSBOOST_REQUIRE_CUDA=1, Compute Sanitizer's four modes clean.
Python: hessboost[cuda]
pip install 'hessboost[cuda]'installshessboost-runtime-cuda: the same extension built with itscudafeature, as manylinux x86_64/aarch64 wheels (abi3 and free-threaded 3.14t) and an sdist.hessboost._hessboostreplaces itself insys.moduleswith the runtime's extension, and a runtime of another release raisesImportError.- Without the extra,
device="cuda"andto_gpu("cuda")refuse with a message naminghessboost[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
predictandpredict_marginbroadcastbase_scoreinto the margin buffer by doubling instead of one tinyextend_from_sliceper 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)