[Bugfix] Preserve available host memory for integrated MUSA devices (#43398)

Signed-off-by: Xucheng Zhou <aden1350@outlook.com>
This commit is contained in:
adenzhou1350
2026-10-11 20:34:58 -07:00
committed by GitHub
parent 6ac8602e8d
commit cd8ed1bb55
2 changed files with 38 additions and 1 deletions
+2 -1
View File
@@ -540,7 +540,8 @@ def get_available_gpu_memory(
# available due to not including cache memory. So we use the system available
# memory metric instead.
free_gpu_memory = psutil.virtual_memory().available
free_gpu_memory, total_gpu_memory = torch.musa.mem_get_info()
else:
free_gpu_memory, _ = torch.musa.mem_get_info(gpu_id)
elif device == "mps":
from sglang.srt.hardware_backend.mlx.runtime import use_mlx