Skip to content

Commit 5fa43cf

Browse files
hbarclayclaude
andcommitted
Revert "operatorx attention: vLLM's default CUDA-graph capture ceiling, independent of linear"
This reverts commit dbbb2f2: adapting attention to the multi-device work belongs on that branch. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent dbbb2f2 commit 5fa43cf

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

‎operatorx/runners/common/vllm/attention.py‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -508,20 +508,13 @@ def _cudagraph(ctx: dict) -> bool:
508508
return _full_graph(ctx["engine"])
509509

510510

511-
def _max_capture_size() -> int:
512-
"""The largest batch vLLM captures by default (VllmConfig._set_cudagraph_sizes); the
513-
engine here runs eagerly, so its own config lists no capture sizes."""
514-
from vllm.platforms import current_platform
515-
return 1024 if current_platform.is_device_capability_family(100) else 512
516-
517-
518511
def _full_graph(eng: _Engine) -> bool:
519512
from vllm.v1.attention.backend import AttentionCGSupport
520513
qs = {r.num_tokens - r.num_computed_tokens for r in eng.reqs}
521514
if len(qs) != 1:
522515
return False
523516
q = qs.pop()
524-
if q * len(eng.reqs) > _max_capture_size():
517+
if q * len(eng.reqs) > vllm_linear._capture_sizes()[-1]:
525518
return False
526519
need = AttentionCGSupport.UNIFORM_SINGLE_TOKEN_DECODE if q == 1 else AttentionCGSupport.UNIFORM_BATCH
527520
for gs in eng.runner.attn_groups:

0 commit comments

Comments
 (0)