From 3d3dd3c45782cebe0151e24eafd49b21dd9da065 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Thu, 7 Jul 2022 14:09:51 -0500 Subject: [PATCH] Clean up Thrust includes. (#4675) ## Description This PR cleans up some `#include`s for Thrust. This is meant to help ease the transition to Thrust 1.17 when that is updated in rapids-cmake. ## Context I opened a PR https://github.com/rapidsai/cudf/pull/10489 that updates cuDF to Thrust 1.16. Notably, Thrust reduced the number of internal header inclusions: > [#1572](https://github.com/NVIDIA/thrust/pull/1572) Removed several unnecessary header includes. Downstream projects may need to update their includes if they were relying on this behavior. I spoke with @robertmaynard and he recommended making similar changes to clean up includes ("include what we use," in essence) to make sure we have compatibility with future versions of Thrust across all RAPIDS libraries. This changeset also removes dependence on `thrust/detail` headers. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - William Hicks (https://github.com/wphicks) URL: https://github.com/rapidsai/cuml/pull/4675 --- cpp/src/arima/batched_arima.cu | 1 + cpp/src/arima/batched_kalman.cu | 1 + cpp/src/dbscan/corepoints/compute.cuh | 5 ++++- cpp/src/dbscan/runner.cuh | 5 +++++ .../batched-levelalgo/kernels/quantiles.cu | 3 +++ cpp/src/explainer/tree_shap.cu | 5 +++++ cpp/src/fil/fil.cu | 2 +- cpp/src/genetic/fitness.cuh | 2 ++ cpp/src/glm/qn/glm_base.cuh | 5 +++++ cpp/src/hdbscan/condensed_hierarchy.cu | 8 ++++++++ cpp/src/hdbscan/detail/condense.cuh | 4 ++++ cpp/src/hdbscan/detail/extract.cuh | 2 ++ cpp/src/hdbscan/detail/membership.cuh | 2 ++ cpp/src/hdbscan/detail/reachability.cuh | 3 +++ cpp/src/hdbscan/detail/select.cuh | 7 +++++++ cpp/src/hdbscan/detail/stabilities.cuh | 4 ++++ cpp/src/hdbscan/detail/utils.h | 7 ++++++- cpp/src/hdbscan/runner.h | 4 ++++ cpp/src/hierarchy/pw_dist_graph.cuh | 5 +++++ cpp/src/kmeans/kmeans_mg_impl.cuh | 6 ++++++ cpp/src/kmeans/sg_impl.cuh | 3 +++ cpp/src/pca/sign_flip_mg.cu | 2 ++ cpp/src/randomforest/randomforest.cuh | 8 +++++--- cpp/src/solver/lars_impl.cuh | 3 +++ cpp/src/svm/linear.cu | 2 ++ cpp/src/svm/smosolver.cuh | 3 +++ cpp/src/svm/svc_impl.cuh | 1 + cpp/src/svm/workingset.cuh | 2 ++ cpp/src/tsne/barnes_hut_tsne.cuh | 4 ++++ cpp/src/tsne/distances.cuh | 3 +++ cpp/src/tsne/exact_kernels.cuh | 4 ++++ cpp/src/tsne/exact_tsne.cuh | 4 ++++ cpp/src/tsne/fft_tsne.cuh | 6 ++++++ cpp/src/tsne/tsne_runner.cuh | 2 ++ cpp/src/tsvd/tsvd.cuh | 2 ++ cpp/src/umap/init_embed/spectral_algo.cuh | 9 ++++++--- cpp/src/umap/runner.cuh | 1 + cpp/src/umap/simpl_set_embed/algo.cuh | 15 ++++++++------ cpp/src/umap/supervised.cuh | 1 + cpp/src_prims/linalg/init.h | 1 + cpp/src_prims/metrics/adjusted_rand_index.cuh | 4 ++++ .../metrics/batched/silhouette_score.cuh | 2 ++ cpp/src_prims/metrics/contingencyMatrix.cuh | 2 ++ cpp/src_prims/metrics/scores.cuh | 6 +++++- cpp/src_prims/timeSeries/stationarity.cuh | 20 +++++++++++-------- cpp/test/prims/knn_regression.cu | 11 ++++++++-- cpp/test/sg/fil_test.cu | 1 + cpp/test/sg/kmeans_test.cu | 1 + cpp/test/sg/multi_sum_test.cu | 1 + cpp/test/sg/rf_test.cu | 7 +++++++ cpp/test/sg/shap_kernel.cu | 3 +++ cpp/test/sg/svc_test.cu | 3 +++ cpp/test/sg/tsne_test.cu | 1 + 53 files changed, 193 insertions(+), 26 deletions(-) diff --git a/cpp/src/arima/batched_arima.cu b/cpp/src/arima/batched_arima.cu index 9bf5cf3225..3bf5384342 100644 --- a/cpp/src/arima/batched_arima.cu +++ b/cpp/src/arima/batched_arima.cu @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/cpp/src/arima/batched_kalman.cu b/cpp/src/arima/batched_kalman.cu index f0c042f9c4..c05cce367f 100644 --- a/cpp/src/arima/batched_kalman.cu +++ b/cpp/src/arima/batched_kalman.cu @@ -20,6 +20,7 @@ #include #include +#include #include #include diff --git a/cpp/src/dbscan/corepoints/compute.cuh b/cpp/src/dbscan/corepoints/compute.cuh index 5945f00280..547604b508 100644 --- a/cpp/src/dbscan/corepoints/compute.cuh +++ b/cpp/src/dbscan/corepoints/compute.cuh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, NVIDIA CORPORATION. + * Copyright (c) 2021-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. @@ -18,6 +18,9 @@ #include +#include +#include + namespace ML { namespace Dbscan { namespace CorePoints { diff --git a/cpp/src/dbscan/runner.cuh b/cpp/src/dbscan/runner.cuh index e3e8dcd8aa..7eaa901d2e 100644 --- a/cpp/src/dbscan/runner.cuh +++ b/cpp/src/dbscan/runner.cuh @@ -34,6 +34,11 @@ #include