From 5ee93a5956e82a260b9944d2f0cf42f0f225204a Mon Sep 17 00:00:00 2001 From: Zhewen Li Date: Wed, 5 Nov 2025 15:40:10 -0800 Subject: [PATCH] [CI/Build] Update checking logic in cutlass_group_gemm_supported (#27948) Signed-off-by: zhewenli --- vllm/_custom_ops.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vllm/_custom_ops.py b/vllm/_custom_ops.py index 657b11046809..cfcf534c613f 100644 --- a/vllm/_custom_ops.py +++ b/vllm/_custom_ops.py @@ -836,7 +836,11 @@ def cutlass_sparse_scaled_mm_supported(cuda_device_capability: int) -> bool: def cutlass_group_gemm_supported(cuda_device_capability: int) -> bool: - return torch.ops._C.cutlass_group_gemm_supported(cuda_device_capability) + try: + return torch.ops._C.cutlass_group_gemm_supported(cuda_device_capability) + except AttributeError: + # Return False on non-CUDA platforms where it is not available + return False def cutlass_sparse_compress(a: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor]: