sparse_attn_indexer_kpool.patch 646 B

123456789101112131415
  1. --- a/vllm/sparse_attn_indexer_kpool.py
  2. +++ b/vllm/sparse_attn_indexer_kpool.py
  3. @@ -807,7 +807,11 @@
  4. else:
  5. topk_dst = topk_indices_buffer[:num_padded_tokens, :topk_tokens]
  6. - if current_platform.is_cuda() and select_k in (512, 1024, 2048):
  7. + if (
  8. + current_platform.is_cuda()
  9. + and select_k in (512, 1024, 2048)
  10. + and not current_platform.is_device_capability_family(120)
  11. + ):
  12. workspace_manager = current_workspace_manager()
  13. (topk_workspace,) = workspace_manager.get_simultaneous(
  14. ((RADIX_TOPK_WORKSPACE_SIZE,), torch.uint8),