MI30x: More graph captures for larger batch sizes and concurrencies (#3420)

This commit is contained in:
HAI
2025-02-11 11:04:38 -08:00
committed by GitHub
parent 2491cc928d
commit d81ac4434e

View File

@@ -33,6 +33,9 @@ from sglang.srt.model_executor.forward_batch_info import (
ForwardBatch,
ForwardMode,
)
from sglang.srt.utils import is_hip
is_hip_ = is_hip()
if TYPE_CHECKING:
from sglang.srt.model_executor.model_runner import ModelRunner
@@ -129,6 +132,8 @@ def get_batch_sizes_to_capture(model_runner: ModelRunner):
if bs <= model_runner.req_to_token_pool.size
and bs <= server_args.cuda_graph_max_bs
]
if is_hip_:
capture_bs += [i * 8 for i in range(21, 33)]
compile_bs = (
[bs for bs in capture_bs if bs <= server_args.torch_compile_max_bs]
if server_args.enable_torch_compile