Skip to content

Commit

Permalink
Move cub_namespace over to utils (#2848)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #2848

- Move cub_namespace over to utils

Reviewed By: spcyppt

Differential Revision: D59707528

fbshipit-source-id: c555fbb0d0df65485d78afde11aa33d0649d12c9
  • Loading branch information
q10 authored and facebook-github-bot committed Jul 16, 2024
1 parent 2ea2419 commit af1c56c
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
#include <ATen/cuda/Atomic.cuh>

// clang-format off
#include "fbgemm_gpu/cub_namespace_prefix.cuh"
#include "fbgemm_gpu/utils/cub_namespace_prefix.cuh"
#include <cub/device/device_radix_sort.cuh>
#include <cub/device/device_run_length_encode.cuh>
#include <cub/device/device_scan.cuh>
#include "fbgemm_gpu/cub_namespace_postfix.cuh"
#include "fbgemm_gpu/utils/cub_namespace_postfix.cuh"
// clang-format on

#include <cuda.h>
Expand Down
4 changes: 2 additions & 2 deletions fbgemm_gpu/include/fbgemm_gpu/sparse_ops.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <cuda.h>

// clang-format off
#include "./cub_namespace_prefix.cuh"
#include "fbgemm_gpu/utils/cub_namespace_prefix.cuh"
#include <cub/block/block_reduce.cuh>
#include "./cub_namespace_postfix.cuh"
#include "fbgemm_gpu/utils/cub_namespace_postfix.cuh"
// clang-format on
4 changes: 2 additions & 2 deletions fbgemm_gpu/include/fbgemm_gpu/utils/inclusive_sum_scan.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#define HIPCUB_ARCH 1
#include <hipcub/backend/rocprim/block/block_scan.hpp>
#else
#include "fbgemm_gpu/cub_namespace_prefix.cuh"
#include "fbgemm_gpu/utils/cub_namespace_prefix.cuh"
#include <cub/block/block_scan.cuh>
#include "fbgemm_gpu/cub_namespace_postfix.cuh"
#include "fbgemm_gpu/utils/cub_namespace_postfix.cuh"
#endif
// clang-format on

Expand Down
4 changes: 2 additions & 2 deletions fbgemm_gpu/src/jagged_tensor_ops/common.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#include <cub/cub.cuh>

// clang-format off
#include "fbgemm_gpu/cub_namespace_prefix.cuh"
#include "fbgemm_gpu/utils/cub_namespace_prefix.cuh"
#include <cub/device/device_scan.cuh>
#include "fbgemm_gpu/cub_namespace_postfix.cuh"
#include "fbgemm_gpu/utils/cub_namespace_postfix.cuh"
// clang-format on

#include "fbgemm_gpu/fbgemm_tensor_accessor.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#include "common.cuh"

#include "fbgemm_gpu/cub_namespace_postfix.cuh"
#include "fbgemm_gpu/cub_namespace_prefix.cuh"
#include "fbgemm_gpu/utils/cub_namespace_postfix.cuh"
#include "fbgemm_gpu/utils/cub_namespace_prefix.cuh"

#include <cub/device/device_scan.cuh>

Expand Down
4 changes: 2 additions & 2 deletions fbgemm_gpu/src/layout_transform_ops/layout_transform_ops.cu
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
*/

// clang-format off
#include "fbgemm_gpu/cub_namespace_prefix.cuh"
#include "fbgemm_gpu/utils/cub_namespace_prefix.cuh"
#include <cub/device/device_scan.cuh>
#include "fbgemm_gpu/utils/dispatch_macros.h"
#include "fbgemm_gpu/cub_namespace_postfix.cuh"
#include "fbgemm_gpu/utils/cub_namespace_postfix.cuh"
// clang-format on

#include <ATen/ATen.h>
Expand Down
4 changes: 2 additions & 2 deletions fbgemm_gpu/src/sparse_ops/common.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#include <torch/library.h>

// clang-format off
#include "fbgemm_gpu/cub_namespace_prefix.cuh"
#include "fbgemm_gpu/utils/cub_namespace_prefix.cuh"
#include <cub/device/device_scan.cuh>
#include "fbgemm_gpu/cub_namespace_postfix.cuh"
#include "fbgemm_gpu/utils/cub_namespace_postfix.cuh"
// clang-format on

#include "fbgemm_gpu/embedding_backward_template_helpers.cuh"
Expand Down
4 changes: 2 additions & 2 deletions fbgemm_gpu/src/split_embeddings_cache/common.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
#include "common.h"

// clang-format off
#include "fbgemm_gpu/cub_namespace_prefix.cuh"
#include "fbgemm_gpu/utils/cub_namespace_prefix.cuh"
#include <cub/device/device_radix_sort.cuh>
#include <cub/device/device_run_length_encode.cuh>
#include <cub/device/device_select.cuh>
#include <cub/block/block_reduce.cuh>
#include "fbgemm_gpu/cub_namespace_postfix.cuh"
#include "fbgemm_gpu/utils/cub_namespace_postfix.cuh"
// clang-format on

#include <ATen/cuda/CUDAContext.h>
Expand Down
4 changes: 2 additions & 2 deletions fbgemm_gpu/src/split_embeddings_utils/radix_sort_pairs.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
#include "fbgemm_gpu/ops_utils.h" // @manual

// clang-format off
#include "fbgemm_gpu/cub_namespace_prefix.cuh" // @manual
#include "fbgemm_gpu/utils/cub_namespace_prefix.cuh" // @manual
#include <cub/device/device_radix_sort.cuh>
#include <cub/device/device_run_length_encode.cuh>
#include <cub/device/device_scan.cuh>
#include "fbgemm_gpu/cub_namespace_postfix.cuh" // @manual
#include "fbgemm_gpu/utils/cub_namespace_postfix.cuh" // @manual
// clang-format on

using Tensor = at::Tensor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
#include "fbgemm_gpu/split_embeddings_utils.cuh" // @manual

// clang-format off
#include "fbgemm_gpu/cub_namespace_prefix.cuh" // @manual
#include "fbgemm_gpu/utils/cub_namespace_prefix.cuh" // @manual
#include <cub/device/device_radix_sort.cuh>
#include <cub/device/device_run_length_encode.cuh>
#include <cub/device/device_scan.cuh>
#include "fbgemm_gpu/cub_namespace_postfix.cuh" // @manual
#include "fbgemm_gpu/utils/cub_namespace_postfix.cuh" // @manual
// clang-format on

using Tensor = at::Tensor;
Expand Down

0 comments on commit af1c56c

Please sign in to comment.