From 04510ef61d40d643d7eddc5ee1114ce1d1bffb09 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Wed, 30 Mar 2022 15:27:48 -0500 Subject: [PATCH 1/7] Avoid thrust::detail call. --- cpp/src/fil/fil.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/fil/fil.cu b/cpp/src/fil/fil.cu index 887a79e7dc..688b10938d 100644 --- a/cpp/src/fil/fil.cu +++ b/cpp/src/fil/fil.cu @@ -581,7 +581,7 @@ void check_params(const forest_params_t* params, bool dense) ASSERT(params->blocks_per_sm >= 0, "blocks_per_sm must be nonnegative"); ASSERT(params->n_items >= 0, "n_items must be non-negative"); ASSERT(params->threads_per_tree > 0, "threads_per_tree must be positive"); - ASSERT(thrust::detail::is_power_of_2(params->threads_per_tree), + ASSERT(params->threads_per_tree & (params->threads_per_tree - 1) == 0, "threads_per_tree must be a power of 2"); ASSERT(params->threads_per_tree <= FIL_TPB, "threads_per_tree must not " From aa0a3d08ce581665ab03efa5177286be992a5a75 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Wed, 30 Mar 2022 15:42:03 -0500 Subject: [PATCH 2/7] Add missing thrust includes. --- 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 +++++ .../decisiontree/batched-levelalgo/kernels/quantiles.cu | 3 +++ cpp/src/explainer/tree_shap.cu | 7 ++++++- cpp/src/genetic/fitness.cuh | 2 ++ cpp/src/glm/qn/glm_base.cuh | 4 ++++ 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 | 3 +++ 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 | 4 ++++ cpp/src/umap/runner.cuh | 1 + cpp/src/umap/simpl_set_embed/algo.cuh | 3 +++ cpp/src/umap/supervised.cuh | 1 + cpp/src_prims/linalg/init.h | 1 + cpp/src_prims/metrics/adjusted_rand_index.cuh | 4 ++++ cpp/src_prims/metrics/batched/silhouette_score.cuh | 2 ++ cpp/src_prims/metrics/contingencyMatrix.cuh | 2 ++ cpp/src_prims/metrics/scores.cuh | 2 ++ cpp/src_prims/timeSeries/stationarity.cuh | 1 + cpp/test/prims/knn_regression.cu | 1 + 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 | 2 ++ 52 files changed, 161 insertions(+), 3 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