Skip to content

Commit

Permalink
Merge branch 'branch-24.04' into reuse-indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis authored Feb 29, 2024
2 parents fbcfa3c + a356ec6 commit 5095760
Show file tree
Hide file tree
Showing 355 changed files with 1,648 additions and 1,204 deletions.
2 changes: 1 addition & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To install cuML from source, ensure the following dependencies are met:
It is recommended to use conda for environment/package management. If doing so, development environment .yaml files are located in `conda/environments/all_*.yaml`. These files contains most of the dependencies mentioned above (notable exceptions are `gcc` and `zlib`). To create a development environment named `cuml_dev`, you can use the follow commands:

```bash
conda create -n cuml_dev python=3.10
conda create -n cuml_dev python=3.11
conda env update -n cuml_dev --file=conda/environments/all_cuda-118_arch-x86_64.yaml
conda activate cuml_dev
```
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ dependencies:
- pytest-cov
- pytest-xdist
- pytest==7.*
- python>=3.9,<3.11
- python>=3.9,<3.12
- raft-dask==24.4.*
- rapids-dask-dependency==24.4.*
- recommonmark
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-122_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ dependencies:
- pytest-cov
- pytest-xdist
- pytest==7.*
- python>=3.9,<3.11
- python>=3.9,<3.12
- raft-dask==24.4.*
- rapids-dask-dependency==24.4.*
- recommonmark
Expand Down
2 changes: 1 addition & 1 deletion conda/recipes/cuml-cpu/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ requirements:
- cython>=3.0.0
run:
- python x.x
- numpy
- numpy>=1.23
- pandas
- scikit-learn=1.2
- hdbscan<=0.8.30
Expand Down
26 changes: 22 additions & 4 deletions cpp/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: true
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
Expand All @@ -27,7 +27,7 @@ AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterClass: false
Expand Down Expand Up @@ -71,8 +71,26 @@ ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeIsMainRegex: '([-_](test|unittest))?$'
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^"' # quoted includes
Priority: 1
- Regex: '^<(common|benchmarks|tests)/' # benchmark/test includes
Priority: 2
- Regex: '^<cuml/' # cuML includes
Priority: 3
- Regex: '^<(cudf|raft|kvikio|cumlprims)' # Other RAPIDS includes
Priority: 4
- Regex: '^<rmm/' # RMM includes
Priority: 5
- Regex: '^<(thrust|cub|cuda)/' # CCCL includes
Priority: 6
- Regex: '^<(cooperative_groups|cuco|cuda|device_types|driver_types|math_constants|nvtx3)' # CUDA includes
Priority: 6
- Regex: '^<.*\..*' # other system includes (e.g. with a '.')
Priority: 7
- Regex: '^<[^.]+' # STL includes (no '.')
Priority: 8
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 2
Expand Down
13 changes: 9 additions & 4 deletions cpp/bench/common/ml_benchmark.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2022, NVIDIA CORPORATION.
* Copyright (c) 2019-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,13 +16,18 @@

#pragma once

#include <benchmark/benchmark.h>
#include <cuda_runtime.h>
#include <cuml/common/logger.hpp>
#include <cuml/common/utils.hpp>
#include <memory>

#include <raft/util/cudart_utils.hpp>

#include <rmm/mr/device/per_device_resource.hpp>

#include <cuda_runtime.h>

#include <benchmark/benchmark.h>

#include <memory>
#include <sstream>
#include <string>
#include <vector>
Expand Down
14 changes: 8 additions & 6 deletions cpp/bench/sg/arima_loglikelihood.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2022, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,18 +14,20 @@
* limitations under the License.
*/

#include <thrust/execution_policy.h>
#include <thrust/for_each.h>
#include <thrust/iterator/counting_iterator.h>
#include "benchmark.cuh"

#include <cuml/tsa/arima_common.h>
#include <cuml/tsa/batched_arima.hpp>

#include <raft/core/handle.hpp>
#include <raft/random/rng.cuh>
#include <raft/util/cudart_utils.hpp>

#include <rmm/device_uvector.hpp>

#include "benchmark.cuh"
#include <raft/util/cudart_utils.hpp>
#include <thrust/execution_policy.h>
#include <thrust/for_each.h>
#include <thrust/iterator/counting_iterator.h>

namespace ML {
namespace Bench {
Expand Down
10 changes: 7 additions & 3 deletions cpp/bench/sg/benchmark.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2022, NVIDIA CORPORATION.
* Copyright (c) 2019-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,12 +19,16 @@
#include "../common/ml_benchmark.hpp"
#include "dataset.cuh"
#include "dataset_ts.cuh"
#include <benchmark/benchmark.h>
#include <cuda_runtime.h>

#include <cuml/common/logger.hpp>

#include <raft/core/handle.hpp>
#include <raft/util/cudart_utils.hpp>

#include <cuda_runtime.h>

#include <benchmark/benchmark.h>

namespace ML {
namespace Bench {

Expand Down
8 changes: 5 additions & 3 deletions cpp/bench/sg/dataset.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2023, NVIDIA CORPORATION.
* Copyright (c) 2019-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,14 +17,16 @@
#pragma once

#include <cuml/datasets/make_blobs.hpp>
#include <fstream>
#include <iostream>

#include <raft/core/handle.hpp>
#include <raft/linalg/transpose.cuh>
#include <raft/linalg/unary_op.cuh>
#include <raft/random/make_regression.cuh>
#include <raft/util/cuda_utils.cuh>
#include <raft/util/cudart_utils.hpp>

#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
Expand Down
5 changes: 3 additions & 2 deletions cpp/bench/sg/dbscan.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2023, NVIDIA CORPORATION.
* Copyright (c) 2019-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,9 +14,10 @@
* limitations under the License.
*/

#include "benchmark.cuh"

#include <cuml/cluster/dbscan.hpp>

#include "benchmark.cuh"
#include <utility>

namespace ML {
Expand Down
8 changes: 5 additions & 3 deletions cpp/bench/sg/fil.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2023, NVIDIA CORPORATION.
* Copyright (c) 2019-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,14 +14,16 @@
* limitations under the License.
*/

#include <cuml/fil/fil.h>

#include "benchmark.cuh"

#include <cuml/common/logger.hpp>
#include <cuml/ensemble/randomforest.hpp>
#include <cuml/fil/fil.h>
#include <cuml/tree/algo_helper.h>

#include <treelite/c_api.h>
#include <treelite/tree.h>

#include <utility>

namespace ML {
Expand Down
16 changes: 9 additions & 7 deletions cpp/bench/sg/filex.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, NVIDIA CORPORATION.
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,20 +14,22 @@
* limitations under the License.
*/

#include "benchmark.cuh"

#include <cuml/common/logger.hpp>
#include <cuml/ensemble/randomforest.hpp>
#include <cuml/experimental/fil/detail/raft_proto/device_type.hpp>
#include <cuml/experimental/fil/infer_kind.hpp>
#include <cuml/experimental/fil/tree_layout.hpp>
#include <cuml/experimental/fil/treelite_importer.hpp>
#include <cuml/fil/fil.h>

#include "benchmark.cuh"
#include <chrono>
#include <cstdint>
#include <cuml/common/logger.hpp>
#include <cuml/ensemble/randomforest.hpp>
#include <cuml/tree/algo_helper.h>

#include <treelite/c_api.h>
#include <treelite/tree.h>

#include <chrono>
#include <cstdint>
#include <utility>

namespace ML {
Expand Down
5 changes: 4 additions & 1 deletion cpp/bench/sg/kmeans.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2023, NVIDIA CORPORATION.
* Copyright (c) 2019-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,10 +15,13 @@
*/

#include "benchmark.cuh"

#include <cuml/cluster/kmeans.hpp>
#include <cuml/common/logger.hpp>

#include <raft/distance/distance_types.hpp>
#include <raft/random/rng_state.hpp>

#include <utility>

namespace ML {
Expand Down
5 changes: 4 additions & 1 deletion cpp/bench/sg/linkage.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2022, NVIDIA CORPORATION.
* Copyright (c) 2019-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,10 +15,13 @@
*/

#include "benchmark.cuh"

#include <cuml/cluster/linkage.hpp>
#include <cuml/common/logger.hpp>

#include <raft/distance/distance_types.hpp>
#include <raft/sparse/hierarchy/common.h>

#include <utility>

namespace ML {
Expand Down
6 changes: 4 additions & 2 deletions cpp/bench/sg/rf_classifier.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2023, NVIDIA CORPORATION.
* Copyright (c) 2019-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,8 +15,10 @@
*/

#include "benchmark.cuh"
#include <cmath>

#include <cuml/ensemble/randomforest.hpp>

#include <cmath>
#include <utility>

namespace ML {
Expand Down
6 changes: 4 additions & 2 deletions cpp/bench/sg/rf_regressor.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2023, NVIDIA CORPORATION.
* Copyright (c) 2019-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,8 +15,10 @@
*/

#include "benchmark.cuh"
#include <cmath>

#include <cuml/ensemble/randomforest.hpp>

#include <cmath>
#include <utility>

namespace ML {
Expand Down
7 changes: 5 additions & 2 deletions cpp/bench/sg/svc.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,11 +15,14 @@
*/

#include "benchmark.cuh"
#include <cmath>

#include <cuml/svm/svc.hpp>
#include <cuml/svm/svm_model.h>
#include <cuml/svm/svm_parameter.h>

#include <raft/distance/kernels.cuh>

#include <cmath>
#include <sstream>
#include <utility>

Expand Down
Loading

0 comments on commit 5095760

Please sign in to comment.