[Bugfix][Platform] Fall back to torch when device-level NVML memory is unsupported (GB10) (#57378)
Signed-off-by: hclsys <chenglunhu@gmail.com> Signed-off-by: Chenglun Hu <chenglunhu@gmail.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
@@ -2937,10 +2937,14 @@ class EngineArgs:
|
||||
try:
|
||||
device_memory = current_platform.get_device_total_memory()
|
||||
device_name = current_platform.get_device_name().lower()
|
||||
# GB10 (DGX Spark, cc 12.1) has the memory but not the compute of
|
||||
# a large discrete GPU, keep it on the small tier.
|
||||
is_gb10 = current_platform.is_device_capability((12, 1))
|
||||
except Exception:
|
||||
# This is only used to set default_max_num_batched_tokens
|
||||
device_memory = 0
|
||||
device_name = ""
|
||||
is_gb10 = False
|
||||
|
||||
# NOTE(Kuntai): Setting large `max_num_batched_tokens` for A100 reduces
|
||||
# throughput, see PR #17885 for more details.
|
||||
@@ -2955,7 +2959,11 @@ class EngineArgs:
|
||||
UsageContext.LLM_CLASS: 1024,
|
||||
UsageContext.OPENAI_API_SERVER: 1024,
|
||||
}
|
||||
elif device_memory >= 70 * GiB_bytes and "a100" not in device_name:
|
||||
elif (
|
||||
device_memory >= 70 * GiB_bytes
|
||||
and "a100" not in device_name
|
||||
and not is_gb10
|
||||
):
|
||||
# For GPUs like H100 and H200, use larger offline defaults.
|
||||
default_max_num_batched_tokens = {
|
||||
UsageContext.LLM_CLASS: 16384,
|
||||
|
||||
Reference in New Issue
Block a user