Simplify GPU quantile tests and tighten sketch container ownership#12160
Draft
RAMitchell wants to merge 12 commits intodmlc:masterfrom
Draft
Simplify GPU quantile tests and tighten sketch container ownership#12160RAMitchell wants to merge 12 commits intodmlc:masterfrom
RAMitchell wants to merge 12 commits intodmlc:masterfrom
Conversation
…-strategy # Conflicts: # tests/cpp/common/test_hist_util.cu
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors GPU quantile sketch tests and tightens the GPU SketchContainer interface so the container computes its own per-batch cut layout and owns more of its maintenance behavior.
Changes:
- Simplify/realign GPU quantile tests to exercise
SketchContainer::Push/Prune/Merge/AllReducemore directly and share CPU/GPU cut invariant validation via helpers. - Update GPU sketch container API so
Push(...)computes batch-local cut pointers internally; remove redundant external prune inQuantileDMatrix. - Simplify categorical dedup bookkeeping by updating the column scan buffer directly; remove redundant GPU wrapper tests from
test_hist_util.cu.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/cpp/common/test_quantile.h | Updates helper header guard and seed generation used by quantile tests. |
| tests/cpp/common/test_quantile.cu | Major GPU quantile test rewrite: new synthetic batch helpers + property-style tests; updated calls to new SketchContainer::Push signature. |
| tests/cpp/common/test_quantile.cc | Replaces local container-invariant logic with shared ValidateContainerCuts helper. |
| tests/cpp/common/test_quantile_helpers.h | Adds shared ValidateContainerCuts(...) helper used by both CPU/GPU tests. |
| tests/cpp/common/test_hist_util.cu | Removes redundant DeviceSketch wrapper tests; updates categorical dedup test for new API. |
| src/data/quantile_dmatrix.cu | Removes per-batch external prune now handled internally by the sketch container. |
| src/common/quantile.cuh | Tightens SketchContainer::Push signature; renames intermediate sizing helper to per-feature semantics. |
| src/common/quantile.cu | Implements internal batch-local cut pointer construction and prunes using a per-feature bound. |
| src/common/hist_util.cuh | Removes external cut-pointer plumbing; relies on SketchContainer::Push to compute cut layout. |
| src/common/hist_util.cu | Simplifies categorical dedup to update column scan only; updates weighted sketch path to new Push API. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This continues the GPU quantile test rewrite and tightens the GPU
SketchContainerinterface so the sketch owns more of its own sizing and maintenance behavior.
What Changed
tests/cpp/common/test_quantile.cuSketchContainer::Push(...)input for push/prune/merge coveragePush(...)SketchContainer::Push(...)now computes its own batch-local cut layoutQuantileDMatrixtests/cpp/common/test_hist_util.cuTesting
Built
testxgboostwith CUDA and ran focused GPU coverage, including:GPUQuantile.*GPUQuantileProperty.InvariantsMGPUQuantileTest.SameOnAllWorkersHistUtilGPU testsLocal result:
SameOnAllWorkersstill skips locally without federated/NCCL support