[Bugfix][ROCm] Capture CUDA graphs on the current stream (#53818)

Signed-off-by: fanxingran <xingran.fan@amd.com>
This commit is contained in:
fanxingran
2026-08-26 23:16:45 +08:00
committed by GitHub
parent 28b484e5d7
commit 080a66a69c
3 changed files with 11 additions and 3 deletions
+2 -1
View File
@@ -17,6 +17,7 @@ from vllm.config import VllmConfig, get_layers_from_vllm_config, replace
from vllm.distributed.parallel_state import get_pp_group
from vllm.logger import init_logger
from vllm.model_executor.layers.attention_layer_base import AttentionLayerBase
from vllm.utils.torch_utils import current_stream
from vllm.v1.attention.backend import CommonAttentionMetadata
from vllm.v1.kv_cache_interface import (
KVCacheConfig,
@@ -130,7 +131,7 @@ class Gemma4Proposer(SpecDecodeBaseProposer):
torch.accelerator.synchronize()
g = torch.cuda.CUDAGraph()
with torch.cuda.graph(g):
with torch.cuda.graph(g, stream=current_stream()):
static_output = masked_emb.get_top_tokens(
static_input,
lm_head_weight,