Skip to content

[mt] Unify the quantisers.#12048

Merged
trivialfis merged 4 commits into
dmlc:masterfrom
trivialfis:mt-quantiser
Feb 28, 2026
Merged

[mt] Unify the quantisers.#12048
trivialfis merged 4 commits into
dmlc:masterfrom
trivialfis:mt-quantiser

Conversation

@trivialfis

@trivialfis trivialfis commented Feb 27, 2026

Copy link
Copy Markdown
Member
  • Support distributed training.
  • Host device access. Host access is for single-target. We will migrate to device-only once we can unify the code base between single-target and multi-target more.

ref #9043

- Support distributed training.
- Host device access. Host access is for single-target.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR unifies the gradient quantiser implementation to support distributed training for multi-output models. The changes introduce a new GradientQuantiserGroup class that replaces the previous MultiGradientQuantiser and provides both device-side access (via DeviceSpan()) and host-side access (via operator[]) to quantisers. The implementation moves quantiser construction logic into a new quantiser.cu file and optimizes distributed training by batching multiple collective operations together.

Changes:

  • Introduced unified GradientQuantiserGroup class replacing MultiGradientQuantiser with dual host/device access
  • Moved quantiser implementation to new quantiser.cu file with optimized collective operations for distributed training
  • Updated all quantiser access patterns from .Quantizers() to .DeviceSpan() for device access and operator[] for host access
  • Modified distributed training check to allow distributed training for non-vector-leaf cases

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/tree/gpu_hist/quantiser.cuh Defines new unified GradientQuantiserGroup class with host/device dual interface
src/tree/gpu_hist/quantiser.cu New file containing quantiser implementation with batched collective operations for distributed training
src/tree/gpu_hist/histogram.cu Removed quantiser implementation code (moved to quantiser.cu)
src/tree/updater_gpu_hist.cu Updated single-target quantiser usage to use new GradientQuantiserGroup with operator[] for host access
src/tree/updater_gpu_hist.cuh Updated multi-target quantiser usage and relaxed distributed training restriction to allow non-vector-leaf cases
tests/cpp/tree/gpu_hist/test_sampler.cu Updated test to use new DeviceSpan() API
tests/cpp/tree/gpu_hist/test_histogram.cu Updated tests to use GradientQuantiserGroup with both host and device access patterns
tests/cpp/tree/gpu_hist/test_evaluate_splits.cu Updated test helper to construct quantiser via GradientQuantiserGroup
tests/cpp/tree/gpu_hist/dummy_quantizer.cuh Updated test utilities to use GradientQuantiserGroup
src/predictor/interpretability/shap.cu Minor cleanup to suppress unused parameter warning
Comments suppressed due to low confidence (1)

src/tree/gpu_hist/quantiser.cu:51

  • The LaTeX equation syntax in the documentation comment uses @begin{equation} and @end{equation}, which is not standard Doxygen syntax. Doxygen typically uses \f[ and \f] for display equations or \f$ for inline equations. Consider changing to \f[ and \f] to ensure the equation renders correctly in generated documentation.
 * @begin{equation}
 *   max( fl(\sum^{V}_{v_i>0}{v_i}), fl(\sum^{V}_{v_i<0}|v_i|) )
 * @end{equation}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@trivialfis

Copy link
Copy Markdown
Member Author

cc @rongou

@trivialfis
trivialfis merged commit 6dbf362 into dmlc:master Feb 28, 2026
82 checks passed
@trivialfis
trivialfis deleted the mt-quantiser branch February 28, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants