Skip to content

Commit 40b86aa

Browse files
[BugFix] Fix: ImportError when building on hopper systems (vllm-project#20513)
Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>
1 parent 4328708 commit 40b86aa

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/vllm/lora @jeejeelee
1717
/vllm/reasoning @aarnphm
1818
/vllm/entrypoints @aarnphm
19-
CMakeLists.txt @tlrmchlsmth
19+
CMakeLists.txt @tlrmchlsmth @LucasWilkinson
2020

2121
# Any change to the VllmConfig changes can have a large user-facing impact,
2222
# so spam a lot of people

csrc/ops.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,6 @@ void cutlass_moe_mm(
239239
torch::Tensor const& b_strides, torch::Tensor const& c_strides,
240240
bool per_act_token, bool per_out_ch);
241241

242-
void cutlass_blockwise_scaled_grouped_mm(
243-
torch::Tensor& output, const torch::Tensor& a, const torch::Tensor& b,
244-
const torch::Tensor& scales_a, const torch::Tensor& scales_b,
245-
const torch::Tensor& problem_sizes, const torch::Tensor& expert_offsets);
246-
247242
void cutlass_fp4_group_mm(
248243
torch::Tensor& output, const torch::Tensor& a, const torch::Tensor& b,
249244
const torch::Tensor& a_blockscale, const torch::Tensor& b_blockscales,

csrc/quantization/cutlass_w8a8/moe/blockwise_scaled_group_mm_sm100.cu

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "core/registration.h"
2+
13
#include <torch/all.h>
24
#include <cutlass/arch/arch.h>
35

@@ -364,4 +366,9 @@ void cutlass_blockwise_scaled_grouped_mm(
364366
TORCH_CHECK(false, "Unsupported output tensor type");
365367
}
366368
#endif
367-
}
369+
}
370+
371+
TORCH_LIBRARY_IMPL_EXPAND(TORCH_EXTENSION_NAME, CUDA, m) {
372+
m.impl("cutlass_blockwise_scaled_grouped_mm",
373+
&cutlass_blockwise_scaled_grouped_mm);
374+
}

csrc/torch_bindings.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,7 @@ TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, ops) {
399399
"Tensor scales_a, Tensor scales_b, "
400400
"Tensor problem_sizes, Tensor expert_offsets) -> ()",
401401
{stride_tag});
402-
ops.impl("cutlass_blockwise_scaled_grouped_mm", torch::kCUDA,
403-
&cutlass_blockwise_scaled_grouped_mm);
402+
// conditionally compiled so impl registration is in source file
404403

405404
// cutlass nvfp4 block scaled group GEMM
406405
ops.def(

0 commit comments

Comments
 (0)