Skip to content

Commit

Permalink
Remove IncludeCategories from .clang-format (#4438)
Browse files Browse the repository at this point in the history
It was recently noticed that the `IncludeCategories`:
```
IncludeCategories:
  - Regex:           '^<ext/.*\.h>'
    Priority:        2
  - Regex:           '^<.*\.h>'
    Priority:        1
  - Regex:           '^<.*'
    Priority:        2
  - Regex:           '.*'
    Priority:        3
```
In the `.clang-format` are not really necessary as `ext` has no meaning in RAPIDS. This PR removes these.

Note these changes are being made in all repos:
* `cudf`: rapidsai/cudf#9876
* `rmm`: rapidsai/rmm#933

Authors:
  - Conor Hoekstra (https://github.com/codereport)

Approvers:
  - William Hicks (https://github.com/wphicks)
  - Divye Gala (https://github.com/divyegala)

URL: #4438
  • Loading branch information
codereport authored Jan 8, 2022
1 parent 03132e8 commit 416ce61
Show file tree
Hide file tree
Showing 295 changed files with 968 additions and 932 deletions.
9 changes: 0 additions & 9 deletions cpp/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,6 @@ ForEachMacros:
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^<ext/.*\.h>'
Priority: 2
- Regex: '^<.*\.h>'
Priority: 1
- Regex: '^<.*'
Priority: 2
- Regex: '.*'
Priority: 3
IncludeIsMainRegex: '([-_](test|unittest))?$'
IndentCaseLabels: true
IndentPPDirectives: None
Expand Down
4 changes: 2 additions & 2 deletions cpp/bench/common/ml_benchmark.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2021, NVIDIA CORPORATION.
* Copyright (c) 2019-2022, 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 @@ -18,10 +18,10 @@

#include <benchmark/benchmark.h>
#include <cuda_runtime.h>
#include <raft/cudart_utils.h>
#include <cuml/common/logger.hpp>
#include <cuml/common/utils.hpp>
#include <memory>
#include <raft/cudart_utils.h>
#include <raft/mr/device/allocator.hpp>
#include <sstream>
#include <string>
Expand Down
4 changes: 2 additions & 2 deletions cpp/bench/prims/distance_common.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2021, NVIDIA CORPORATION.
* Copyright (c) 2019-2022, 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,8 +14,8 @@
* limitations under the License.
*/

#include <raft/cudart_utils.h>
#include <common/ml_benchmark.hpp>
#include <raft/cudart_utils.h>
#include <raft/distance/distance.hpp>
#include <raft/distance/specializations.hpp>

Expand Down
4 changes: 2 additions & 2 deletions cpp/bench/prims/fused_l2_nn.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2021, NVIDIA CORPORATION.
* Copyright (c) 2019-2022, 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,9 @@
* limitations under the License.
*/

#include <raft/cudart_utils.h>
#include <common/ml_benchmark.hpp>
#include <limits>
#include <raft/cudart_utils.h>
#include <raft/distance/fused_l2_nn.hpp>
#include <raft/handle.hpp>
#include <raft/linalg/norm.cuh>
Expand Down
6 changes: 3 additions & 3 deletions cpp/bench/prims/gram_matrix.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2021, NVIDIA CORPORATION.
* Copyright (c) 2019-2022, 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,12 +14,12 @@
* limitations under the License.
*/

#include <cuml/matrix/kernelparams.h>
#include <raft/linalg/cublas_wrappers.h>
#include <common/ml_benchmark.hpp>
#include <cuml/matrix/kernelparams.h>
#include <matrix/grammatrix.cuh>
#include <matrix/kernelfactory.cuh>
#include <memory>
#include <raft/linalg/cublas_wrappers.h>
#include <raft/random/rng.hpp>
#include <sstream>
#include <string>
Expand Down
4 changes: 2 additions & 2 deletions cpp/bench/prims/permute.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2021, NVIDIA CORPORATION.
* Copyright (c) 2019-2022, 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,8 +14,8 @@
* limitations under the License.
*/

#include <raft/cudart_utils.h>
#include <common/ml_benchmark.hpp>
#include <raft/cudart_utils.h>
#include <raft/mr/device/allocator.hpp>
#include <raft/random/rng.hpp>
#include <random/permute.cuh>
Expand Down
4 changes: 2 additions & 2 deletions cpp/bench/prims/rng.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2021, NVIDIA CORPORATION.
* Copyright (c) 2019-2022, 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,8 +14,8 @@
* limitations under the License.
*/

#include <raft/cudart_utils.h>
#include <common/ml_benchmark.hpp>
#include <raft/cudart_utils.h>
#include <raft/random/rng.hpp>

namespace MLCommon {
Expand Down
4 changes: 2 additions & 2 deletions cpp/bench/sg/arima_loglikelihood.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021, NVIDIA CORPORATION.
* Copyright (c) 2020-2022, 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 @@ -24,8 +24,8 @@
#include <raft/random/rng.hpp>
#include <rmm/device_uvector.hpp>

#include <raft/cudart_utils.h>
#include "benchmark.cuh"
#include <raft/cudart_utils.h>

namespace ML {
namespace Bench {
Expand Down
10 changes: 5 additions & 5 deletions cpp/bench/sg/benchmark.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2021, NVIDIA CORPORATION.
* Copyright (c) 2019-2022, 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,15 +16,15 @@

#pragma once

#include "../common/ml_benchmark.hpp"
#include "dataset.cuh"
#include "dataset_ts.cuh"
#include <benchmark/benchmark.h>
#include <cuda_runtime.h>
#include <raft/cudart_utils.h>
#include <cuml/common/logger.hpp>
#include <raft/cudart_utils.h>
#include <raft/handle.hpp>
#include <raft/mr/device/allocator.hpp>
#include "../common/ml_benchmark.hpp"
#include "dataset.cuh"
#include "dataset_ts.cuh"

namespace ML {
namespace Bench {
Expand Down
6 changes: 3 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-2021, NVIDIA CORPORATION.
* Copyright (c) 2019-2022, 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,13 @@

#pragma once

#include <raft/cudart_utils.h>
#include <raft/linalg/transpose.h>
#include <cuml/datasets/make_blobs.hpp>
#include <fstream>
#include <iostream>
#include <raft/cuda_utils.cuh>
#include <raft/cudart_utils.h>
#include <raft/handle.hpp>
#include <raft/linalg/transpose.h>
#include <raft/linalg/unary_op.cuh>
#include <random/make_regression.cuh>
#include <sstream>
Expand Down
4 changes: 2 additions & 2 deletions cpp/bench/sg/dataset_ts.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021, NVIDIA CORPORATION.
* Copyright (c) 2020-2022, 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,8 +16,8 @@

#pragma once

#include <raft/cudart_utils.h>
#include <raft/cuda_utils.cuh>
#include <raft/cudart_utils.h>
#include <raft/handle.hpp>
#include <raft/random/rng.hpp>

Expand Down
4 changes: 2 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-2021, NVIDIA CORPORATION.
* Copyright (c) 2019-2022, 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,8 +16,8 @@

#include <cuml/cluster/dbscan.hpp>

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

namespace ML {
namespace Bench {
Expand Down
8 changes: 4 additions & 4 deletions cpp/bench/sg/fil.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2021, NVIDIA CORPORATION.
* Copyright (c) 2019-2022, 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,13 @@

#include <cuml/fil/fil.h>

#include "benchmark.cuh"
#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 <cuml/common/logger.hpp>
#include <cuml/ensemble/randomforest.hpp>
#include <utility>
#include "benchmark.cuh"

namespace ML {
namespace Bench {
Expand Down
4 changes: 2 additions & 2 deletions cpp/bench/sg/kmeans.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2021, NVIDIA CORPORATION.
* Copyright (c) 2019-2022, 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,10 +14,10 @@
* limitations under the License.
*/

#include "benchmark.cuh"
#include <cuml/cluster/kmeans.hpp>
#include <cuml/common/logger.hpp>
#include <utility>
#include "benchmark.cuh"

namespace ML {
namespace Bench {
Expand Down
8 changes: 4 additions & 4 deletions cpp/bench/sg/linkage.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2021, NVIDIA CORPORATION.
* Copyright (c) 2019-2022, 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,12 +14,12 @@
* limitations under the License.
*/

#include <raft/linalg/distance_type.h>
#include <raft/sparse/hierarchy/common.h>
#include "benchmark.cuh"
#include <cuml/cluster/linkage.hpp>
#include <cuml/common/logger.hpp>
#include <raft/linalg/distance_type.h>
#include <raft/sparse/hierarchy/common.h>
#include <utility>
#include "benchmark.cuh"

namespace ML {
namespace Bench {
Expand Down
4 changes: 2 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-2021, NVIDIA CORPORATION.
* Copyright (c) 2019-2022, 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,10 +14,10 @@
* limitations under the License.
*/

#include "benchmark.cuh"
#include <cmath>
#include <cuml/ensemble/randomforest.hpp>
#include <utility>
#include "benchmark.cuh"

namespace ML {
namespace Bench {
Expand Down
4 changes: 2 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-2021, NVIDIA CORPORATION.
* Copyright (c) 2019-2022, 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,10 +14,10 @@
* limitations under the License.
*/

#include "benchmark.cuh"
#include <cmath>
#include <cuml/ensemble/randomforest.hpp>
#include <utility>
#include "benchmark.cuh"

namespace ML {
namespace Bench {
Expand Down
11 changes: 6 additions & 5 deletions cpp/bench/sg/svc.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021, NVIDIA CORPORATION.
* Copyright (c) 2020-2022, 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,14 @@
* limitations under the License.
*/

#include "benchmark.cuh"
#include <cmath>
#include <cuml/matrix/kernelparams.h>
#include <cuml/svm/svc.hpp>
#include <cuml/svm/svm_model.h>
#include <cuml/svm/svm_parameter.h>
#include <cmath>
#include <cuml/svm/svc.hpp>
#include <sstream>
#include <utility>
#include "benchmark.cuh"

namespace ML {
namespace Bench {
Expand Down Expand Up @@ -66,7 +66,8 @@ class SVC : public BlobsFixture<D, D> {
this->data.y.data(),
this->svm_param,
this->kernel,
this->model);
this->model,
static_cast<D*>(nullptr));
CUDA_CHECK(cudaStreamSynchronize(this->stream));
ML::SVM::svmFreeBuffers(*this->handle, this->model);
});
Expand Down
8 changes: 4 additions & 4 deletions cpp/bench/sg/svr.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021, NVIDIA CORPORATION.
* Copyright (c) 2020-2022, 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,14 @@
* limitations under the License.
*/

#include "benchmark.cuh"
#include <cmath>
#include <cuml/matrix/kernelparams.h>
#include <cuml/svm/svc.hpp>
#include <cuml/svm/svm_model.h>
#include <cuml/svm/svm_parameter.h>
#include <cmath>
#include <cuml/svm/svc.hpp>
#include <cuml/svm/svr.hpp>
#include <utility>
#include "benchmark.cuh"

namespace ML {
namespace Bench {
Expand Down
Loading

0 comments on commit 416ce61

Please sign in to comment.