Skip to content

Commit 5171cf1

Browse files
LucasWilkinsongemini-code-assist[bot]
authored andcommitted
[CI/Test Fix] Fix CP tests on Blackwell (vllm-project#28404)
Signed-off-by: Lucas Wilkinson <[email protected]> Signed-off-by: Lucas Wilkinson <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 626f4fa commit 5171cf1

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

tests/distributed/test_context_parallel.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from typing import Literal, NamedTuple
1515

1616
import pytest
17+
import torch
1718

1819
from vllm.config.model import RunnerOption
1920
from vllm.logger import init_logger
@@ -254,6 +255,17 @@ def test_cp_generation(
254255
test_options: CPTestOptions,
255256
num_gpus_available,
256257
):
258+
if (
259+
model_id == "deepseek-ai/DeepSeek-V2-Lite-Chat"
260+
and torch.cuda.get_device_capability() < (9, 0)
261+
):
262+
pytest.skip(reason="MLA+DCP requires compute capability of 9.0 or higher")
263+
if (
264+
model_id == "bigcode/gpt_bigcode-santacoder"
265+
and torch.cuda.get_device_capability() != (9, 0)
266+
):
267+
pytest.skip(reason="GQA+DCP currently requires compute capability of 9.0")
268+
257269
_compare_cp_with_tp(
258270
model_id,
259271
parallel_setup,

vllm/attention/ops/common.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ def cp_lse_ag_out_rs(
195195
cp_attn_lse = cp_attn_lse.contiguous()
196196
lses = cp_group.all_gather(cp_attn_lse, dim=0).view_as(lses)
197197
out, lse = correct_attn_out(cp_attn_out, lses, cp_group.rank_in_group, ctx)
198-
assert out.is_contiguous()
199198
out = cp_group.reduce_scatter(out, dim=1)
200199

201200
if return_lse:

0 commit comments

Comments
 (0)