Skip to content

Commit d2226a4

Browse files
authored
Fix build error - error: function "torchao::marlin_24_gemm" has already been defined (previous definition at line 83) (#863)
fix compile error
1 parent 3ac2ab8 commit d2226a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torchao/csrc/cuda/sparse_marlin/marlin_kernel_nm.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -852,8 +852,6 @@ __global__ void Marlin_24(
852852
}
853853
}
854854

855-
#endif
856-
857855
#define CALL_IF_2_4(NUM_BITS, THREAD_M_BLOCKS, THREAD_N_BLOCKS, \
858856
THREAD_K_BLOCKS, GROUP_BLOCKS) \
859857
else if (num_bits == NUM_BITS && thread_m_blocks == THREAD_M_BLOCKS && \
@@ -1119,6 +1117,8 @@ torch::Tensor marlin_24_gemm(torch::Tensor& a, torch::Tensor& b_q_weight,
11191117
return c;
11201118
}
11211119

1120+
#endif
1121+
11221122
TORCH_LIBRARY_IMPL(torchao, CUDA, m) {
11231123
m.impl("torchao::marlin_24_gemm", &marlin_24_gemm);
11241124
}

0 commit comments

Comments
 (0)