From 09c6cafd3786f6bcf9a14fabbbbc4f6163916725 Mon Sep 17 00:00:00 2001 From: cloudgpuapp <129925370+cloudgpuapp@users.noreply.github.com> Date: Fri, 27 Nov 2026 12:06:41 +0800 Subject: [PATCH] Add RTX A6000 and A40 GPU profiles --- README.md | 2 +- src/quantpreflight/detect.py | 9 +++++++-- src/quantpreflight/hardware/gpus.toml | 26 ++++++++++++++++++++++++++ tests/test_detect.py | 5 +++++ 4 files changed, 39 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bed8571..126e97e 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ Run `quantpreflight explain QPF006` for the details of any rule. | :--- | :--- | | Formats | AWQ, GPTQ, Compressed-Tensors, FP8, NVFP4, MXFP4, Marlin, AutoRound, bitsandbytes, BitNet, MLX, GGUF, Safetensors | | Engines | vLLM, SGLang, TensorRT-LLM, llama.cpp | -| NVIDIA GPUs | T4, A10G, A100-40GB, A100, L4, L40S, RTX4090, H100, H200, B200, RTX5090, GB10 | +| NVIDIA GPUs | T4, A10G, RTXA6000, A40, A100-40GB, A100, L4, L40S, RTX4090, H100, H200, B200, RTX5090, GB10 | | AMD GPUs | MI250X, MI300X, MI325X | | Model families | Llama, Mistral, Qwen, DeepSeek, Gemma, Phi, GLM, Mamba and hybrids, with a generic fallback for the rest | diff --git a/src/quantpreflight/detect.py b/src/quantpreflight/detect.py index 28fe15d..e229371 100644 --- a/src/quantpreflight/detect.py +++ b/src/quantpreflight/detect.py @@ -4,6 +4,7 @@ from dataclasses import dataclass from importlib import metadata +import re import shutil import subprocess @@ -29,9 +30,13 @@ def _squash(text: str) -> str: def match_gpu_name(name: str, arch: str | None = None) -> str | None: """Match a device name such as `NVIDIA L40S` to a GPU profile, falling back to its architecture.""" - # Longest names first, so an L40S isn't read as an L4 + # Longest names first, so an L40S isn't read as an L4. For short IDs + # require a whole model token: an RTX A4000 must not match an A40. + normalized_name = _squash(name) + tokens = set(re.findall(r"[A-Z0-9]+", name.upper())) for gpu_id in sorted(load_gpu_profiles(), key=len, reverse=True): - if _squash(gpu_id) in _squash(name): + normalized_id = _squash(gpu_id) + if normalized_id in (tokens if len(normalized_id) <= 3 else normalized_name): return gpu_id if arch: try: diff --git a/src/quantpreflight/hardware/gpus.toml b/src/quantpreflight/hardware/gpus.toml index 81dd999..5b061c8 100644 --- a/src/quantpreflight/hardware/gpus.toml +++ b/src/quantpreflight/hardware/gpus.toml @@ -27,6 +27,32 @@ supports_fp8_block_scale = false supports_nvfp4 = false supports_marlin = true +[[gpus]] +id = "RTXA6000" +aliases = ["rtx-a6000", "rtx a6000", "nvidia rtx a6000"] +vendor = "nvidia" +arch = "sm_86" +compute_capability = 86 +vram_gb = 48.0 +supports_bf16 = true +supports_fp8_w8a8 = false +supports_fp8_block_scale = false +supports_nvfp4 = false +supports_marlin = true + +[[gpus]] +id = "A40" +aliases = ["nvidia a40"] +vendor = "nvidia" +arch = "sm_86" +compute_capability = 86 +vram_gb = 48.0 +supports_bf16 = true +supports_fp8_w8a8 = false +supports_fp8_block_scale = false +supports_nvfp4 = false +supports_marlin = true + [[gpus]] id = "A100-40GB" aliases = ["a100-40g", "a100_40gb"] diff --git a/tests/test_detect.py b/tests/test_detect.py index 27c30d0..88dbfb2 100644 --- a/tests/test_detect.py +++ b/tests/test_detect.py @@ -25,6 +25,11 @@ ("NVIDIA GeForce RTX 4090", "sm_89", "RTX4090"), ("NVIDIA GeForce RTX 3090", "sm_86", "A10G"), ("NVIDIA A10", "sm_86", "A10G"), + ("NVIDIA RTX A6000", "sm_86", "RTXA6000"), + ("NVIDIA A40", "sm_86", "A40"), + ("NVIDIA A40-48GB", None, "A40"), + ("NVIDIA RTX A4000", "sm_86", "A10G"), + ("NVIDIA RTX A4000", None, None), ("NVIDIA A100-SXM4-40GB", "sm_80", "A100"), ("NVIDIA H100 80GB HBM3", "sm_90", "H100"), ("NVIDIA GeForce RTX 5090", "sm_120", "RTX5090"),