From 862f9ed3d8878395fb8a455a9fe99a5ad25d08be Mon Sep 17 00:00:00 2001 From: Bingxu Chen Date: Thu, 27 Aug 2026 09:32:51 +0800 Subject: [PATCH] [AMD] Fall back to CPU tensor for decode retraction on ROCm (#36343) --- python/sglang/srt/mem_cache/kv_cache_builder.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/sglang/srt/mem_cache/kv_cache_builder.py b/python/sglang/srt/mem_cache/kv_cache_builder.py index 52b700bc1..3382beb04 100644 --- a/python/sglang/srt/mem_cache/kv_cache_builder.py +++ b/python/sglang/srt/mem_cache/kv_cache_builder.py @@ -47,6 +47,7 @@ from sglang.srt.runtime_context import ( get_parallel, get_schedule, ) +from sglang.srt.utils import is_hip if TYPE_CHECKING: @@ -143,6 +144,9 @@ def resolve_decode_retraction_backup(*, tp_worker: BaseTpWorker) -> str: backend = ( "host_pool" if disagg.disaggregation_mode == "decode" + # Large ROCm retraction restores can fault the GPU process. Keep + # host_pool opt-in on HIP until the retraction path is safe at scale. + and not is_hip() and not get_parallel().dcp_enabled and not disagg.disaggregation_decode_enable_radix_cache # KV offload already owns a host pool; a second one double-books host memory.