Skip to content

Commit cab63f2

Browse files
q10facebook-github-bot
authored andcommitted
Fix missing operator registration (#4042)
Summary: X-link: facebookresearch/FBGEMM#1129 - Fix missing operator registration Pull Request resolved: #4042 Reviewed By: sryap, spcyppt Differential Revision: D73866259 Pulled By: q10 fbshipit-source-id: 3c87a4090fa908a99fe1b38460c1973b19a213f3
1 parent 9d14e24 commit cab63f2

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

fbgemm_gpu/FbgemmGpu.cmake

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ set(fbgemm_gpu_sources_cpu_static
3939
src/layout_transform_ops/layout_transform_ops_cpu.cpp
4040
src/quantize_ops/quantize_ops_cpu.cpp
4141
src/quantize_ops/quantize_ops_meta.cpp
42+
src/sparse_ops/sparse_async_batched_cumsum.cpp
4243
src/sparse_ops/sparse_ops_cpu.cpp
4344
src/sparse_ops/sparse_ops_meta.cpp
4445
${tbe_eeg_cpu_sources})
@@ -101,6 +102,7 @@ if(NOT FBGEMM_BUILD_VARIANT STREQUAL BUILD_VARIANT_CPU)
101102
src/quantize_ops/quantize_msfp.cu
102103
src/quantize_ops/quantize_padded_fp8_rowwise.cu
103104
src/quantize_ops/quantize_mx.cu
105+
src/sparse_ops/sparse_async_batched_cumsum.cu
104106
src/sparse_ops/sparse_block_bucketize_features.cu
105107
src/sparse_ops/sparse_bucketize_features.cu
106108
src/sparse_ops/sparse_batched_unary_embeddings.cu

fbgemm_gpu/src/sparse_ops/sparse_async_batched_cumsum.cu

+8
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,19 @@
66
* LICENSE file in the root directory of this source tree.
77
*/
88

9+
#ifdef __HIP_PLATFORM_AMD__
10+
#include <hipcub/block/block_scan.hpp>
11+
#else
912
#include <cub/block/block_scan.cuh>
13+
#endif
1014
#include "common.cuh"
1115

1216
static constexpr uint32_t kMaxThreads = 1024;
1317

18+
#ifdef __HIP_PLATFORM_AMD__
19+
namespace cub = hipcub;
20+
#endif
21+
1422
namespace fbgemm_gpu {
1523

1624
C10_ALWAYS_INLINE uint32_t next_power_of_2(uint32_t n) {

0 commit comments

Comments
 (0)