From 73def253b5d2d962ad2e445cc89eb63cbd1d6970 Mon Sep 17 00:00:00 2001 From: Baizhou Zhang Date: Thu, 29 May 2025 12:37:30 -0700 Subject: [PATCH] Fix mem_fraction_static for AMD CI (#6748) --- python/sglang/srt/server_args.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/sglang/srt/server_args.py b/python/sglang/srt/server_args.py index 12823b5ab..d7feb50d2 100644 --- a/python/sglang/srt/server_args.py +++ b/python/sglang/srt/server_args.py @@ -28,6 +28,7 @@ from sglang.srt.utils import ( configure_ipv6, get_device, get_device_memory_capacity, + is_cuda, is_flashinfer_available, is_hip, is_port_available, @@ -261,7 +262,7 @@ class ServerArgs: self.mem_fraction_static = 0.88 else: self.mem_fraction_static = 0.88 - if gpu_mem is not None and gpu_mem > 180 * 1000: + if gpu_mem is not None and gpu_mem > 180 * 1000 and is_cuda(): self.mem_fraction_static = 0.79 elif gpu_mem is not None and gpu_mem > 96 * 1024: mem_fraction = self.mem_fraction_static