Skip to content

Commit

Permalink
Merge branch 'branch-22.02' into fea-nvtx-ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
achirkin committed Dec 16, 2021
2 parents 409c049 + d2e5b7a commit 029c259
Show file tree
Hide file tree
Showing 144 changed files with 239 additions and 254 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
2 changes: 1 addition & 1 deletion cpp/include/raft/comms/helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
#include <raft/handle.hpp>
#include <raft/mr/device/buffer.hpp>

#include <iostream>
#include <nccl.h>
#include <ucp/api/ucp.h>
#include <iostream>

namespace raft {
namespace comms {
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/comms/mpi_comms.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
#include <mpi.h>
#include <nccl.h>

#include <raft/cudart_utils.h>
#include <raft/comms/comms.hpp>
#include <raft/comms/util.hpp>
#include <raft/cudart_utils.h>
#include <raft/error.hpp>
#include <raft/handle.hpp>

Expand Down
8 changes: 4 additions & 4 deletions cpp/include/raft/comms/std_comms.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,29 @@

#include <raft/error.hpp>

#include <raft/cudart_utils.h>
#include <raft/comms/util.hpp>
#include <raft/cudart_utils.h>

#include <cuda_runtime.h>

#include <raft/comms/ucp_helper.hpp>
#include <ucp/api/ucp.h>
#include <ucp/api/ucp_def.h>
#include <raft/comms/ucp_helper.hpp>

#include <nccl.h>

#include <unordered_map>
#include <unordered_set>
#include <utility>

#include <stdlib.h>
#include <time.h>
#include <algorithm>
#include <chrono>
#include <cstdio>
#include <exception>
#include <memory>
#include <stdlib.h>
#include <thread>
#include <time.h>

namespace raft {
namespace comms {
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/cudart_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

#include <cuda_runtime.h>

#include <execinfo.h>
#include <chrono>
#include <cstdio>
#include <execinfo.h>
#include <iomanip>
#include <iostream>
#include <mutex>
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/distance/detail/distance.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#pragma once

#include <cuda_runtime_api.h>
#include <raft/linalg/distance_type.h>
#include <raft/cuda_utils.cuh>
#include <raft/distance/detail/canberra.cuh>
#include <raft/distance/detail/chebyshev.cuh>
Expand All @@ -31,6 +30,7 @@
#include <raft/distance/detail/l1.cuh>
#include <raft/distance/detail/minkowski.cuh>
#include <raft/distance/detail/russell_rao.cuh>
#include <raft/linalg/distance_type.h>
#include <rmm/device_uvector.hpp>

namespace raft {
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/distance/detail/fused_l2_nn.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@

#pragma once

#include <stdint.h>
#include <cub/cub.cuh>
#include <limits>
#include <raft/cuda_utils.cuh>
#include <raft/distance/detail/pairwise_distance_base.cuh>
#include <raft/linalg/contractions.cuh>
#include <stdint.h>

namespace raft {
namespace distance {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/
#pragma once
#include <raft/cudart_utils.h>
#include <raft/cuda_utils.cuh>
#include <raft/cudart_utils.h>
#include <raft/linalg/contractions.cuh>
#include <raft/linalg/norm.cuh>
#include <raft/vectorized.cuh>
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/distance/distance.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

#pragma once

#include <raft/linalg/distance_type.h>
#include <raft/distance/detail/distance.cuh>
#include <raft/handle.hpp>
#include <raft/linalg/distance_type.h>
#include <rmm/device_uvector.hpp>

namespace raft {
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/distance/fused_l2_nn.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@

#pragma once

#include <stdint.h>
#include <cub/cub.cuh>
#include <limits>
#include <raft/cuda_utils.cuh>
#include <raft/distance/detail/fused_l2_nn.cuh>
#include <raft/handle.hpp>
#include <stdint.h>

namespace raft {
namespace distance {
Expand Down
4 changes: 2 additions & 2 deletions cpp/include/raft/handle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
///@todo: enable once we have migrated cuml-comms layer too
//#include <common/cuml_comms_int.hpp>

#include "cudart_utils.h"
#include <raft/comms/comms.hpp>
#include <raft/linalg/cublas_wrappers.h>
#include <raft/linalg/cusolver_wrappers.h>
#include <raft/sparse/cusparse_wrappers.h>
#include <raft/comms/comms.hpp>
#include <rmm/cuda_stream_pool.hpp>
#include <rmm/exec_policy.hpp>
#include "cudart_utils.h"

namespace raft {

Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/label/classlabels.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#include <cub/cub.cuh>

#include <raft/cudart_utils.h>
#include <raft/cuda_utils.cuh>
#include <raft/cudart_utils.h>
#include <raft/linalg/unary_op.cuh>
#include <rmm/device_scalar.hpp>
#include <rmm/device_uvector.hpp>
Expand Down
4 changes: 2 additions & 2 deletions cpp/include/raft/label/merge_labels.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@

#pragma once

#include <math.h>
#include <limits>
#include <math.h>

#include <raft/cuda_utils.cuh>
#include <raft/cudart_utils.h>
#include <raft/linalg/init.h>
#include <raft/cuda_utils.cuh>

namespace raft {
namespace label {
Expand Down
4 changes: 2 additions & 2 deletions cpp/include/raft/linalg/cholesky_r1_update.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

#pragma once

#include <raft/linalg/cublas_wrappers.h>
#include <raft/linalg/cusolver_wrappers.h>
#include <raft/cuda_utils.cuh>
#include <raft/handle.hpp>
#include <raft/linalg/binary_op.cuh>
#include <raft/linalg/cublas_wrappers.h>
#include <raft/linalg/cusolver_wrappers.h>

namespace raft {
namespace linalg {
Expand Down
4 changes: 2 additions & 2 deletions cpp/include/raft/linalg/eig.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
#pragma once

#include <cuda_runtime_api.h>
#include <raft/cudart_utils.h>
#include <raft/linalg/cusolver_wrappers.h>
#include <raft/cuda_utils.cuh>
#include <raft/cudart_utils.h>
#include <raft/handle.hpp>
#include <raft/linalg/cusolver_wrappers.h>
#include <raft/matrix/matrix.hpp>
#include <rmm/device_scalar.hpp>
#include <rmm/device_uvector.hpp>
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/linalg/gemm.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
#pragma once

#include <cublas_v2.h>
#include <raft/linalg/cublas_wrappers.h>
#include <raft/cuda_utils.cuh>
#include <raft/handle.hpp>
#include <raft/linalg/cublas_wrappers.h>

namespace raft {
namespace linalg {
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/linalg/gemv.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#pragma once

#include <cublas_v2.h>
#include <raft/linalg/cublas_wrappers.h>
#include <raft/cuda_utils.cuh>
#include <raft/linalg/cublas_wrappers.h>

#include <raft/handle.hpp>

Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/linalg/init.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

#pragma once

#include <rmm/exec_policy.hpp>
#include <thrust/copy.h>
#include <thrust/device_ptr.h>
#include <thrust/iterator/counting_iterator.h>
#include <rmm/exec_policy.hpp>

namespace raft {
namespace linalg {
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/linalg/lanczos.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
#include <curand.h>

#include <raft/cudart_utils.h>
#include <raft/linalg/cublas_wrappers.h>
#include <raft/handle.hpp>
#include <raft/linalg/cublas_wrappers.h>
#include <raft/spectral/lapack.hpp>
#include <raft/spectral/matrix_wrappers.hpp>
#include <raft/spectral/warn_dbg.hpp>
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/linalg/reduce.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

#pragma once

#include <raft/cuda_utils.cuh>
#include "coalesced_reduction.cuh"
#include "strided_reduction.cuh"
#include <raft/cuda_utils.cuh>

namespace raft {
namespace linalg {
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/linalg/strided_reduction.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

#pragma once

#include "unary_op.cuh"
#include <cub/cub.cuh>
#include <raft/cuda_utils.cuh>
#include <type_traits>
#include "unary_op.cuh"

namespace raft {
namespace linalg {
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/linalg/subtract.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

#pragma once

#include <raft/cuda_utils.cuh>
#include "binary_op.cuh"
#include "unary_op.cuh"
#include <raft/cuda_utils.cuh>

namespace raft {
namespace linalg {
Expand Down
12 changes: 6 additions & 6 deletions cpp/include/raft/linalg/svd.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@

#pragma once

#include <raft/cudart_utils.h>
#include <raft/linalg/cublas_wrappers.h>
#include <raft/linalg/cusolver_wrappers.h>
#include "eig.cuh"
#include "gemm.cuh"
#include "transpose.h"
#include <raft/common/nvtx.hpp>
#include <raft/cuda_utils.cuh>
#include <raft/cudart_utils.h>
#include <raft/handle.hpp>
#include <raft/linalg/cublas_wrappers.h>
#include <raft/linalg/cusolver_wrappers.h>
#include <raft/matrix/math.hpp>
#include <raft/matrix/matrix.hpp>
#include <rmm/device_scalar.hpp>
#include <rmm/device_uvector.hpp>
#include "eig.cuh"
#include "gemm.cuh"
#include "transpose.h"

namespace raft {
namespace linalg {
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/linalg/transpose.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

#pragma once

#include <raft/linalg/cublas_wrappers.h>
#include <raft/handle.hpp>
#include <raft/linalg/cublas_wrappers.h>
#include <rmm/exec_policy.hpp>

namespace raft {
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/linalg/unary_op.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

#pragma once

#include <raft/cudart_utils.h>
#include <raft/cuda_utils.cuh>
#include <raft/cudart_utils.h>
#include <raft/vectorized.cuh>

namespace raft {
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/matrix/detail/math.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ void signFlip(math_t* inout, int n_rows, int n_cols, cudaStream_t stream)

} // end namespace detail
} // end namespace matrix
} // end namespace raft
} // end namespace raft
12 changes: 1 addition & 11 deletions cpp/include/raft/matrix/math.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,17 +240,7 @@ void reciprocal(math_t* in,
d_dest,
d_src,
len,
[=] __device__(math_t a) {
if (setzero) {
if (abs(a) <= thres) {
return math_t(0);
} else {
return scalar / a;
}
} else {
return scalar / a;
}
},
[=] __device__(math_t a) { return setzero && (abs(a) <= thres) ? math_t{0} : scalar / a; },
stream);
}

Expand Down
6 changes: 3 additions & 3 deletions cpp/include/raft/matrix/matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@

#include "detail/matrix.cuh"

#include <algorithm>
#include <cstddef>
#include <cuda_runtime.h>
#include <cusolverDn.h>
#include <raft/cudart_utils.h>
#include <raft/linalg/cublas_wrappers.h>
#include <algorithm>
#include <cstddef>
#include <raft/handle.hpp>
#include <raft/linalg/cublas_wrappers.h>

namespace raft {
namespace matrix {
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/mr/device/buffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

#pragma once

#include "allocator.hpp"
#include <memory>
#include <raft/mr/buffer_base.hpp>
#include "allocator.hpp"

namespace raft {
namespace mr {
Expand Down
Loading

0 comments on commit 029c259

Please sign in to comment.