100 Commits
Author SHA1 Message Date
Jiaming Yuan 9ecb7583e9 [EM] Add basic distributed GPU tests. (#10861)
- Split Hist and Approx tests in unittests.
- Basic GPU tests for distributed.
2024-10-01 01:28:43 +08:00
Jiaming Yuan 92f1c48a22 [EM] Get quantile cuts from the extmem qdm. (#10860) 2024-10-01 00:59:28 +08:00
Jiaming Yuan 8cf2f7aed8 [CI] Set timeout for freebsd vm launch. (#10858) 2024-09-30 18:26:27 +08:00
Jiaming Yuan c9f89c4241 [R] Rename ExternalDMatrix -> ExtMemDMatrix. (#10849) 2024-09-29 05:45:53 +08:00
Jiaming Yuan 271f4a80e7 Use CUDA virtual memory for pinned memory allocation. (#10850)
- Add a grow-only virtual memory allocator.
- Define a driver API wrapper. Split up the runtime API wrapper.
2024-09-28 04:26:44 +08:00
Jiaming Yuan 13b9874fd6 [jvm-packages] Bump rapids version. (#10857) 2024-09-28 04:02:24 +08:00
Jiaming Yuan cc2daadec3 Fix git ignore. [skip ci] (#10854) 2024-09-28 01:43:29 +08:00
Jiaming Yuan bc69a3e877 [EM] Improve memory estimation for quantile sketching. (#10843)
I- Add basic estimation for RMM.
- Re-estimate after every sub-batch.
- Some debug logs for memory usage.
- Fix the locking mechanism in the memory allocator logger.
2024-09-25 03:20:09 +08:00
Jiaming Yuan 68a8865bc5 [CI] Fix PyLint errors. (#10837) 2024-09-24 14:09:32 +08:00
Jiaming Yuan e228c1a121 [EM] Make page concatenation optional. (#10826)
This PR introduces a new parameter `extmem_concat_pages` to make the page concatenation optional for GPU hist. In addition, the document is updated for the new GPU-based external memory.
2024-09-24 06:19:28 +08:00
Jiaming Yuan 2a37a8880c Check correct dump format for gblinear. (#10831) 2024-09-21 00:32:52 +08:00
Jiaming Yuan 24241ed6e3 [EM] Compress dense ellpack. (#10821)
This helps reduce the memory copying needed for dense data. In addition, it helps reduce memory usage even if external memory is not used.

- Decouple the number of symbols needed in the compressor with the number of features when the data is dense.
- Remove the fetch call in the `at_end_` iteration.
- Reduce synchronization and kernel launches by using the `uvector` and ctx.
2024-09-20 18:20:56 +08:00
Jiaming Yuan d5e1c41b69 [coll] Use loky for rabit op tests. (#10828) 2024-09-20 16:46:05 +08:00
Jiaming Yuan 96bbf80457 [EM] Suport quantile objectives for GPU-based external memory. (#10820)
- Improved error message for memory usage.
- Support quantile-based objectives for GPU external memory.
2024-09-17 13:27:02 +08:00
Jiaming Yuan d94f6679fc [EM] Avoid synchronous calls and unnecessary ATS access. (#10811)
- Pass context into various functions.
- Factor out some CUDA algorithms.
- Use ATS only for update position.
2024-09-10 14:33:14 +08:00
Jiaming Yuan ed5f33df16 [EM] Multi-level quantile sketching for GPU. (#10813) 2024-09-10 13:08:34 +08:00
Jiaming YuanandCorentin Santos 3ef8383d93 [doc] Fix custom_metric_obj.rst [skip ci] (#10796) (#10815)
Added the square to the derivative in the hessian

Co-authored-by: Corentin Santos <corentin.santos@iphc.cnrs.fr>
2024-09-10 05:11:43 +08:00
Jiaming Yuan 5f7f31d464 [EM] Refactor ellpack construction. (#10810)
- Remove the calculation of n_symbols in the accessor.
- Pack initialization steps into the parameter list.
- Pass the context into various ctors.
- Specialization for dense data to prepare for further compression.
2024-09-09 14:10:10 +08:00
Jiaming Yuan e1a2c1bbb3 [EM] Merge GPU partitioning with histogram building. (#10766)
- Stop concatenating pages if there's no subsampling.
- Use a single iteration for histogram build and partitioning.
2024-08-31 03:25:37 +08:00
Jiaming Yuan 98ac153265 Avoid warning from NVCC. (#10757) 2024-08-30 16:11:31 +08:00
Jiaming YuanandPhilip Hyunsu Cho 5cc7c735e5 Don't link gputreeshap. (#10758)
Co-authored-by: Philip Hyunsu Cho <chohyu01@cs.washington.edu>
2024-08-30 14:40:58 +08:00
Jiaming Yuan 34d4ab455e [EM] Avoid stream sync in quantile sketching. (#10765)
.
2024-08-30 12:33:24 +08:00
Jiaming Yuan 61dd854a52 [EM] Refactor GPU histogram builder. (#10764)
- Expose the maximum number of cached nodes to be consistent with the CPU implementation. Also easier for testing.
- Extract the subtraction trick for easier testing.
- Split up the `GradientQuantiser` to avoid circular dependency.
2024-08-30 02:39:14 +08:00
Jiaming Yuan 34937fea41 [EM] Python wrapper for the ExtMemQuantileDMatrix. (#10762)
Not exposed to the document yet.

- Add C API.
- Add Python API.
- Basic CPU tests.
2024-08-29 04:08:25 +08:00
Jiaming Yuan 7510a87466 [EM] Reuse the quantile container. (#10761)
Use the push method to merge the quantiles instead of creating multiple containers. This
reduces the memory usage by consistent pruning.
2024-08-29 01:39:55 +08:00
Jiaming Yuan 4fe67f10b4 [EM] Have one partitioner for each batch. (#10760)
- Initialize one partitioner for each batch.
- Collect partition size during initialization.
- Support base ridx in the finalization.
2024-08-29 01:35:17 +08:00
Jiaming Yuan 64afe9873b Increase timeout in C++ tests from 1 to 5 seconds. (#10756)
To avoid CI failures on FreeBSD.
2024-08-28 02:27:14 +08:00
Jiaming Yuan bde1265caf [EM] Return a full DMatrix instead of a Ellpack from the GPU sampler. (#10753) 2024-08-28 01:05:11 +08:00
Jiaming Yuan d6ebcfb032 [EM] Support CPU quantile objective for external memory. (#10751) 2024-08-27 04:16:57 +08:00
Jiaming Yuan 06c4246ff1 [CI] Workaround mypy errors. (#10754) 2024-08-27 02:54:11 +08:00
Jiaming Yuan 25966e4ba8 [EM] Pass batch parameter into extmem format. (#10736)
- Allow customization for format reading.
- Customize the number of pre-fetch batches.
2024-08-27 02:37:50 +08:00
Jiaming Yuan fd0138c91c [coll] Improve column split tests with named threads. (#10735) 2024-08-24 12:43:47 +08:00
Jiaming Yuan 55aef8f546 [EM] Avoid resizing host cache. (#10734)
* [EM] Avoid resizing host cache.

- Add SAM allocator and resource.
- Use page-based cache instead of stream-based cache.
2024-08-23 06:34:01 +08:00
Jiaming Yuan 142bdc73ec [EM] Support SHAP contribution with QDM. (#10724)
- Add GPU support.
- Add external memory support.
- Update the GPU tree shap.
2024-08-22 05:25:10 +08:00
Jiaming Yuan cb54374550 Update clang-tidy. (#10730)
- Install cmake using pip.
- Fix compile command generation.
- Clean up the tidy script and remove the need to load the yaml file.
- Fix modernized type traits.
- Fix span class. Polymorphism support is dropped
2024-08-22 04:12:18 +08:00
Jiaming Yuan 9b88495840 [multi] Implement weight feature importance. (#10700) 2024-08-22 02:06:47 +08:00
Jiaming Yuan 402e7837fb Fix potential race in feature constraint. (#10719) 2024-08-21 16:50:31 +08:00
Jiaming Yuan 508ac13243 Check cub errors. (#10721)
- Make sure cuda error returned by cub scan is caught.
- Avoid temporary buffer allocation in thrust device vector.
2024-08-21 02:50:26 +08:00
Jiaming Yuan fd365c147e [doc] Brief note about RMM SAM allocator. [skip ci] (#10712) 2024-08-17 04:21:39 +08:00
Jiaming Yuan ec3f327c20 Add managed memory allocator. (#10711) 2024-08-17 03:02:34 +08:00
Jiaming Yuan 8d7fe262d9 [EM] Enable access to the number of batches. (#10691)
- Expose `NumBatches` in `DMatrix`.
- Small cleanup for removing legacy CUDA stream and ~force CUDA context initialization~.
- Purge old external memory data generation code.
2024-08-17 02:59:45 +08:00
Jiaming Yuan 033a666900 [EM] Log the page size of ellpack. (#10713) 2024-08-17 01:35:47 +08:00
Jiaming Yuan abe65e3769 Reduce thread contention in column split histogram test. (#10708) 2024-08-17 01:00:32 +08:00
Jiaming Yuan 2258bc870d Add more tests and doc for QDM. (#10692) 2024-08-16 23:30:04 +08:00
Jiaming Yuan 582ea104b5 [EM] Enable prediction cache for GPU. (#10707)
- Use `UpdatePosition` for all nodes and skip `FinalizePosition` when external memory is used.
- Create `encode/decode` for node position, this is just as a refactor.
- Reuse code between update position and finalization.
2024-08-15 21:41:59 +08:00
Jiaming Yuan 2ecc85ffad [EM] Support ExtMemQdm in the GPU predictor. (#10694) 2024-08-13 12:21:11 +08:00
Jiaming Yuan 43704549a2 [coll] Reduce the amount of open files (socket). (#10693)
Reduce the chance of hitting `Failed to call `socket`: Too many open files`.
2024-08-13 05:23:49 +08:00
Jiaming Yuan d414fdf2e7 [EM] Add GPU version of the external memory QDM. (#10689) 2024-08-10 10:49:43 +08:00
Jiaming Yuan 7bccc1ea2c [EM] CPU implementation for external memory QDM. (#10682)
- A new DMatrix type.
- Extract common code into a new QDM base class.

Not yet working:
- Not exposed to the interface yet, will wait for the GPU implementation.
- ~No meta info yet, still working on the source.~
- Exporting data to CSR is not supported yet.
2024-08-09 09:38:02 +08:00
Jiaming Yuan cc3b56fc37 Cleanup GPU Hist tests. (#10677)
* Cleanup GPU Hist tests.

- Remove GPU Hist gradient sampling test. The same properties are tested in the gradient
  sampler test suite.
- Move basic histogram tests into the histogram test suite.
- Remove the header inclusion of the `updater_gpu_hist.cu` in tests.
2024-08-06 11:50:44 +08:00
Jiaming Yuan 6ccf116601 [dask] Reduce the flakiness of tests. (#10678) 2024-08-06 06:04:10 +08:00
Jiaming Yuan 3d8107adb8 Support doc link for the sklearn module. (#10287) 2024-08-06 02:35:32 +08:00
Jiaming Yuan a269055b2b [coll] Use loky for tests. (#10676)
This makes the tests easier to run and debug. In addition, they can now work on Windows as
well.
2024-08-03 07:33:42 +08:00
Jiaming Yuan a185b693dc Reduce warnings and flakiness in tests. (#10659)
- Fix warnings in tests.
- Try to reduce the flakiness of dask test.
2024-08-03 07:32:47 +08:00
Jiaming Yuan 2e7ba900ef [CI] Add timeout limit to JVM tests. (#10673) 2024-08-03 01:51:13 +08:00
Jiaming Yuan 574c20dc1d Enable CI build for the federated-secure branch. (#10671) 2024-08-02 22:13:17 +08:00
Jiaming YuanandPhilip Hyunsu Cho 77c844cef7 Reduce thread contention in column split tests. (#10658)
---------

Co-authored-by: Philip Hyunsu Cho <chohyu01@cs.washington.edu>
2024-08-01 18:36:46 +08:00
Jiaming YuanandHyunsu Cho fb77ed7603 [CI] Fix Python wheel workflow. (#10649)
* [CI] Fix Python wheel workflow.

* Use Python 3.10 for building wheels

---------

Co-authored-by: Hyunsu Cho <phcho@nvidia.com>
2024-07-30 10:13:47 -07:00
Jiaming Yuan 827d0e8edb [breaking] Bump Python requirement to 3.10. (#10434)
- Bump the Python requirement.
- Fix type hints.
- Use loky to avoid deadlock.
- Workaround cupy-numpy compatibility issue on Windows caused by the `safe` casting rule.
- Simplify the repartitioning logic to avoid dask errors.
2024-07-30 17:31:06 +08:00
Jiaming Yuan 449be7a402 Quick fix for clang-tidy error. (#10641) 2024-07-26 18:21:16 +08:00
Jiaming Yuan fcae6301ec [dask] Disable broadcast in the scatter call. (#10632) 2024-07-25 04:16:34 +08:00
Jiaming Yuan 485d90218c Catch exceptions during file read. (#10623) 2024-07-23 03:48:19 +08:00
Jiaming Yuan a19bbc9be5 Avoid caching allocator for large allocations. (#10582) 2024-07-23 03:48:03 +08:00
Jiaming Yuan b2cae34a8e Fix integer overflow. (#10615) 2024-07-23 02:13:15 +08:00
Jiaming Yuan 6d9fcb771e Move device histogram storage into histogram.cuh. (#10608) 2024-07-21 14:10:13 +08:00
Jiaming Yuan cb62f9e73b [EM] Prevent init with CUDA malloc resource. (#10606) 2024-07-21 05:08:29 +08:00
Jiaming Yuan 0846ad860c Optionally skip cupy on windows. (#10611) 2024-07-20 22:12:12 +08:00
Jiaming Yuan 344ddeb9ca Drop support for CUDA legacy stream. (#10607) 2024-07-20 06:14:56 +08:00
Jiaming Yuan 7ab93f3ce3 [CI] Fix test environment. (#10609)
* [CI] Fix test environment.

* Remove shell.

* Remove.

* Update Dockerfile.i386
2024-07-18 10:04:17 -07:00
Jiaming Yuan 292bb677e5 [EM] Support mmap backed ellpack. (#10602)
- Support resource view in ellpack.
- Define the CUDA version of MMAP resource.
- Define the CUDA version of malloc resource.
- Refactor cuda runtime API wrappers, and add memory access related wrappers.
- gather windows macros into a single header.
2024-07-18 08:20:21 +08:00
Jiaming Yuan e9fbce9791 Refactor DeviceUVector. (#10595)
Create a wrapper instead of using inheritance to avoid inconsistent interface of the class.
2024-07-18 03:33:01 +08:00
Jiaming Yuan a6a8a55ffa Merge approx tests. (#10583) 2024-07-16 19:03:48 +08:00
Jiaming Yuan 5a92ffe3ca Partial fix for CTK 12.5 (#10574) 2024-07-16 17:41:50 +08:00
Jiaming Yuan bbd308595a [jvm-packages] Bump rapids version. (#10588) 2024-07-15 20:21:25 +08:00
Jiaming Yuan 5fea9d24f2 Small cleanup for CMake scripts. (#10573)
- Remove rabit.
2024-07-12 05:18:23 +08:00
Jiaming Yuan 6c403187ec Fix column split race condition. (#10572) 2024-07-12 01:07:12 +08:00
Jiaming Yuan 1ca4bfd20e Avoid thrust vector initialization. (#10544)
* Avoid thrust vector initialization.

- Add a wrapper for rmm device uvector.
- Split up the `Resize` method for HDV.
2024-07-11 17:29:27 +08:00
Jiaming Yuan 89da9f9741 [fed] Split up federated test CMake file. (#10566)
- Collect all federated test files into the same directory.
- Independently list the files.
2024-07-11 13:09:18 +08:00
Jiaming Yuan 5f910cd4ff [EM] Handle base idx in GPU histogram. (#10549) 2024-07-11 03:26:30 +08:00
Jiaming Yuan 34b154c284 Avoid the use of size_t in the partitioner. (#10541)
- Avoid the use of size_t in the partitioner.
- Use `Span` instead of `Elem` where `node_id` is not needed.
- Remove the `const_cast`.
- Make sure the constness is not removed in the `Elem` by making it reference only.

size_t is implementation-defined, which causes issue when we want to pass pointer or span.
2024-07-11 00:43:08 +08:00
Jiaming Yuan baba3e9eb0 Fix empty partition. (#10559) 2024-07-10 13:01:47 +08:00
Jiaming Yuan 8e2b874b4c [doc] Add notes about RMM and device ordinal. [skip ci] (#10562)
- Remove the experimental tag, we have been running it for a long time now.
- Add notes about avoiding set CUDA device.
- Add link in parameter.
2024-07-10 13:00:57 +08:00
Jiaming Yuan 3ec74a1ba9 [doc] Add build_info to autodoc. [skip ci] (#10551) 2024-07-10 04:05:20 +08:00
Jiaming Yuan 2266db17d1 [R] Update roxygen. (#10556) 2024-07-08 17:02:46 +08:00
Jiaming Yuan 00264eb72b [EM] Basic distributed test for external memory. (#10492) 2024-07-06 01:15:20 +08:00
Jiaming Yuan 620b2b155a Cache GPU histogram kernel configuration. (#10538) 2024-07-04 15:38:59 +08:00
Jiaming Yuan cd1d108c7d [doc] Fix learning to rank tutorial. [skip ci] (#10539) 2024-07-03 22:52:26 +08:00
Jiaming Yuan 6243e7c43d [doc] Update link to release notes. [skip ci] (#10533) 2024-07-03 12:16:53 +08:00
Jiaming Yuan 628411a654 Enhance the threadpool implementation. (#10531)
- Accept an initialization function.
- Support void return tasks.
2024-07-03 12:13:27 +08:00
Jiaming Yuan 9cb4c938da [EM] Move prefetch in reset into the end of the iteration. (#10529) 2024-07-03 03:48:18 +08:00
Jiaming Yuan e537b0969f Fix boolean array for arrow-backed DF. (#10527) 2024-07-02 17:02:54 +08:00
Jiaming Yuan d33043a348 [coll] Allow using local host for testing. (#10526)
- Don't try to retrieve the IP address if a host is specified.
- Fix compiler deprecation warning.
2024-07-02 15:34:38 +08:00
Jiaming Yuan a39fef2c67 [fed] Fixes for the encrypted GRPC backend. (#10503) 2024-07-02 15:15:12 +08:00
Jiaming Yuan 5f0c1e902b Small cleanup for error message. (#10502)
- The `Fail` function can handle file location automatically.
- Report concatenated error for connection poll.
- Typos.
2024-07-02 13:36:41 +08:00
Jiaming Yuan e8a962575a [EM] Allow staging ellpack on host for GPU external memory. (#10488)
- New parameter `on_host`.
- Abstract format creation and stream creation into policy classes.
2024-06-28 04:42:18 +08:00
Jiaming Yuan 824fba783e Remove support for deprecated format in Python. (#10490) 2024-06-27 11:31:53 +08:00
Jiaming Yuan 2d88d17008 Remove deprecated DeviceQuantileDMatrix. (#10491) 2024-06-27 11:30:51 +08:00
Jiaming Yuan 26eb68859f Consistently report error in tests. (#10453) 2024-06-21 14:35:22 +08:00
Jiaming Yuan b38c7fe2ce 2.1.0 release news.(#10378) 2024-06-21 14:34:53 +08:00
Jiaming Yuan 2b400b18d5 Small cleanup for rowset collection. (#10401) 2024-06-19 18:06:23 +08:00