Skip to content

Commit 7047776

Browse files
Lucia (Lu) Fangfacebook-github-bot
Lucia (Lu) Fang
authored andcommitted
fix CUDA_check redefinition in vllm-project#17918
Summary: Fix error: ``` .cu:1: buck-out/v2/gen/fbcode/d068bd6e7ea9cacb/vllm/__vllm_cpp_lib__/buck-headers/cutlass_extensions/common.hpp:21: error: "CUDA_CHECK" redefined [-Werror] ``` Remove duplicate CUDA_CHECK function Differential Revision: D74919134
1 parent fabe89b commit 7047776

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

csrc/cutlass_extensions/common.hpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,6 @@
1515
cutlassGetStatusString(error)); \
1616
}
1717

18-
/**
19-
* Panic wrapper for unwinding CUDA runtime errors
20-
*/
21-
#define CUDA_CHECK(status) \
22-
{ \
23-
cudaError_t error = status; \
24-
TORCH_CHECK(error == cudaSuccess, cudaGetErrorString(error)); \
25-
}
26-
2718
inline int get_cuda_max_shared_memory_per_block_opt_in(int const device) {
2819
int max_shared_mem_per_block_opt_in = 0;
2920
cudaDeviceGetAttribute(&max_shared_mem_per_block_opt_in,

csrc/sparse/cutlass/sparse_scaled_mm_c3x.cuh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
#include <ATen/cuda/CUDAContext.h>
1010

11+
#include "cuda_utils.h"
12+
1113
#include "cutlass/cutlass.h"
1214

1315
#include "cutlass/gemm/device/gemm_universal_adapter.h"
@@ -95,9 +97,9 @@ struct cutlass_sparse_3x_gemm {
9597
// clang-format off
9698
using CollectiveMainloop =
9799
typename cutlass::gemm::collective::CollectiveBuilder<
98-
cutlass::arch::Sm90, cutlass::arch::OpClassSparseTensorOp,
99-
ElementAB, cutlass::layout::RowMajor, AlignmentAB,
100-
ElementAB, cutlass::layout::ColumnMajor, AlignmentAB,
100+
cutlass::arch::Sm90, cutlass::arch::OpClassSparseTensorOp,
101+
ElementAB, cutlass::layout::RowMajor, AlignmentAB,
102+
ElementAB, cutlass::layout::ColumnMajor, AlignmentAB,
101103
ElementAcc, TileShape, ClusterShape,
102104
Stages,
103105
KernelSchedule>::CollectiveOp;

0 commit comments

Comments
 (0)