Skip to content

Commit

Permalink
fix clang formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mdoijade committed Mar 7, 2024
1 parent f02902c commit 7571459
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 33 deletions.
5 changes: 3 additions & 2 deletions cpp/include/raft/distance/detail/fused_distance_nn.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

#pragma once

#include <cstddef> // size_t
#include <limits> // std::numeric_limits
#include <raft/core/kvp.hpp> // raft::KeyValuePair
#include <raft/core/operators.hpp> // raft::identity_op
#include <raft/distance/detail/distance_ops/l2_exp.cuh> // ops::l2_exp_distance_op
Expand All @@ -32,6 +30,9 @@
#include <raft/util/arch.cuh> // raft::util::arch::SM_*
#include <raft/util/cuda_utils.cuh> // raft::ceildiv, raft::shfl

#include <cstddef> // size_t
#include <limits> // std::numeric_limits

namespace raft {
namespace distance {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,15 @@
#define cutlass raft_cutlass
#endif

#include <cutlass/cutlass.h>
#include <cutlass/gemm/device/gemm.h>
#include <cutlass/gemm/device/gemm_grouped.h>
#include <cutlass/gemm/device/gemm_universal_adapter.h>
#include <rmm/device_uvector.hpp>

#include <cutlass/layout/matrix.h>
#include <cutlass/layout/tensor.h>
#include <cutlass/matrix_coord.h>
#include <cutlass/tensor_view.h>

#include <cuda/semaphore>
#include <raft/distance/detail/fused_distance_nn/epilogue_elementwise.cuh> // FusedDistanceNNEpilogueElementwise
#include <raft/distance/detail/fused_distance_nn/gemm.h> // FusedDistanceNNGemm
#include <raft/util/cudart_utils.hpp> // getMultiProcessorCount
#include <raft/util/cutlass_utils.cuh> // RAFT_CUTLASS_TRY

#include <rmm/device_uvector.hpp>

#include <cuda/semaphore>

#include <cutlass/cutlass.h>
#include <cutlass/gemm/device/gemm.h>
#include <cutlass/gemm/device/gemm_grouped.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,15 @@

#pragma once

#include <cuda/semaphore>

#include <cutlass/array.h>
#include <cutlass/cutlass.h>
#include <cutlass/epilogue/thread/activation.h>
#include <cutlass/functional.h>
#include <cutlass/numeric_conversion.h>
#include <cutlass/numeric_types.h>

#include <cuda/semaphore>
#include <cutlass/epilogue/thread/activation.h>

/////////////////////////////////////////////////////////////////////////////////////////////////

namespace cutlass {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

#pragma once

#include <cstddef> // size_t
#include <limits> // std::numeric_limits
#include <raft/core/kvp.hpp> // raft::KeyValuePair
#include <raft/core/operators.hpp> // raft::identity_op
#include <raft/distance/detail/distance_ops/cosine.cuh> // ops::l2_exp_distance_op
Expand All @@ -29,6 +27,9 @@
#include <raft/util/arch.cuh> // raft::util::arch::SM_*
#include <raft/util/cuda_utils.cuh> // raft::ceildiv, raft::shfl

#include <cstddef> // size_t
#include <limits> // std::numeric_limits

namespace raft {
namespace distance {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

#pragma once

#include <cstddef> // size_t
#include <limits> // std::numeric_limits
#include <raft/core/kvp.hpp> // raft::KeyValuePair
#include <raft/core/operators.hpp> // raft::identity_op
#include <raft/distance/detail/distance_ops/l2_exp.cuh> // ops::l2_exp_distance_op
Expand All @@ -29,6 +27,9 @@
#include <raft/util/arch.cuh> // raft::util::arch::SM_*
#include <raft/util/cuda_utils.cuh> // raft::ceildiv, raft::shfl

#include <cstddef> // size_t
#include <limits> // std::numeric_limits

namespace raft {
namespace distance {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

#pragma once

#include <cstddef> // size_t
#include <limits> // std::numeric_limits
#include <raft/core/kvp.hpp> // raft::KeyValuePair
#include <raft/core/operators.hpp> // raft::identity_op
#include <raft/distance/detail/distance_ops/l2_exp.cuh> // ops::l2_exp_distance_op
Expand All @@ -29,6 +27,9 @@
#include <raft/util/cuda_utils.cuh> // raft::ceildiv, raft::shfl
#include <raft/util/device_atomics.cuh>

#include <cstddef> // size_t
#include <limits> // std::numeric_limits

namespace raft {
namespace distance {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@

#pragma once

#include <cstddef> // size_t
#include <limits> // std::numeric_limits
#include <raft/core/kvp.hpp> // raft::KeyValuePair
#include <raft/distance/detail/distance_ops/l2_exp.cuh> // ops::l2_exp_distance_op
#include <raft/distance/detail/pairwise_distance_base.cuh> // PairwiseDistances
#include <raft/linalg/contractions.cuh> // Policy

#include <cstddef> // size_t
#include <limits> // std::numeric_limits

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

#pragma once

#include <cstdint> // int64_t
#include <raft/core/kvp.hpp> // raft::KeyValuePair
#include <raft/core/resources.hpp> // raft::resources
#include <raft/distance/fused_distance_nn_helpers.cuh> // include initialize and reduce operations
#include <raft/util/raft_explicit.hpp> // RAFT_EXPLICIT

#include <cstdint> // int64_t

#ifdef RAFT_EXPLICIT_INSTANTIATE_ONLY

namespace raft {
Expand Down
7 changes: 5 additions & 2 deletions cpp/include/raft/distance/fused_distance_nn-inl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@

#pragma once

#include <cub/cub.cuh>
#include <limits>
#include <raft/core/resources.hpp>
#include <raft/distance/detail/fused_distance_nn.cuh>
#include <raft/distance/fused_distance_nn_helpers.cuh>
#include <raft/linalg/contractions.cuh>
#include <raft/util/cuda_utils.cuh>

#include <cub/cub.cuh>

#include <stdint.h>

#include <limits>
#include <type_traits>

namespace raft {
Expand Down
6 changes: 3 additions & 3 deletions cpp/include/raft/distance/fused_l2_nn-ext.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

#pragma once

#include <raft/core/kvp.hpp> // raft::KeyValuePair
#include <raft/core/resources.hpp> // raft::resources
#include <raft/core/kvp.hpp> // raft::KeyValuePair
#include <raft/core/resources.hpp> // raft::resources
#include <raft/distance/fused_distance_nn_helpers.cuh> // include initialize and reduce operations
#include <raft/util/raft_explicit.hpp> // RAFT_EXPLICIT
#include <raft/util/raft_explicit.hpp> // RAFT_EXPLICIT

#include <cstdint> // int64_t

Expand Down
3 changes: 2 additions & 1 deletion cpp/src/distance/fused_distance_nn.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
* limitations under the License.
*/

#include <cstdint> // int64_t
#include <raft/core/kvp.hpp> // raft::KeyValuePair
#include <raft/distance/fused_distance_nn-inl.cuh>

#include <cstdint> // int64_t

#define instantiate_raft_distance_fusedDistanceNNMinReduce(DataT, OutT, IdxT) \
template void raft::distance::fusedDistanceNNMinReduce<DataT, OutT, IdxT>( \
OutT * min, \
Expand Down
2 changes: 2 additions & 0 deletions cpp/src/raft_runtime/distance/fused_distance_min_arg.cu
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
*/

#include "fused_distance_min_arg.hpp"

#include <raft/core/device_mdarray.hpp>
#include <raft/core/kvp.hpp>
#include <raft/core/resource/cuda_stream.hpp>
#include <raft/core/resource/thrust_policy.hpp>
#include <raft/core/resources.hpp>
#include <raft/distance/distance_types.hpp>
#include <raft/linalg/norm.cuh>

#include <thrust/for_each.h>
#include <thrust/tuple.h>

Expand Down
1 change: 1 addition & 0 deletions cpp/src/raft_runtime/distance/fused_distance_min_arg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <raft/distance/fused_distance_nn.cuh>
#include <raft/distance/fused_l2_nn.cuh>
#include <raft/linalg/norm.cuh>

#include <thrust/for_each.h>
#include <thrust/tuple.h>

Expand Down
1 change: 1 addition & 0 deletions cpp/src/raft_runtime/distance/fused_l2_min_arg.cu
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

#include "fused_distance_min_arg.hpp"

#include <raft/core/device_mdarray.hpp>
#include <raft/core/kvp.hpp>
#include <raft/core/resource/cuda_stream.hpp>
Expand Down
4 changes: 3 additions & 1 deletion cpp/test/distance/fused_cosine_nn.cu
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#undef RAFT_EXPLICIT_INSTANTIATE_ONLY // Search with filter instantiation

#include "../test_utils.cuh"
#include <gtest/gtest.h>

#include <raft/core/kvp.hpp>
#include <raft/core/resource/cuda_stream.hpp>
#include <raft/distance/detail/fused_distance_nn.cuh>
Expand All @@ -27,6 +27,8 @@
#include <raft/util/cuda_utils.cuh>
#include <raft/util/cudart_utils.hpp>

#include <gtest/gtest.h>

namespace raft {
namespace distance {

Expand Down

0 comments on commit 7571459

Please sign in to comment.