From 48381c3b6da092a681798046db89609d2c7bf723 Mon Sep 17 00:00:00 2001 From: YC Tseng Date: Wed, 7 Jan 2026 17:37:40 +0800 Subject: [PATCH] [AMD] suppress warning for amd (#16620) --- python/sglang/srt/layers/quantization/awq.py | 3 ++- python/sglang/srt/layers/quantization/gguf.py | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/python/sglang/srt/layers/quantization/awq.py b/python/sglang/srt/layers/quantization/awq.py index 5497900a0..5af870780 100644 --- a/python/sglang/srt/layers/quantization/awq.py +++ b/python/sglang/srt/layers/quantization/awq.py @@ -68,7 +68,6 @@ elif _is_hip: awq_dequantize_triton as awq_dequantize, ) - warnings.warn(f"HIP does not support fused_marlin_moe currently.") elif _is_xpu: from sgl_kernel import awq_dequantize @@ -198,6 +197,8 @@ class AWQMarlinConfig(QuantizationConfig): full_config: dict[str, Any], ) -> None: super().__init__() + if _is_hip: + warnings.warn(f"HIP does not support fused_marlin_moe currently.") self.pack_factor = 32 // weight_bits # packed into int32 self.group_size = group_size self.zero_point = zero_point diff --git a/python/sglang/srt/layers/quantization/gguf.py b/python/sglang/srt/layers/quantization/gguf.py index cc969557e..e15629b09 100644 --- a/python/sglang/srt/layers/quantization/gguf.py +++ b/python/sglang/srt/layers/quantization/gguf.py @@ -43,7 +43,8 @@ if _is_cuda: ggml_mul_mat_vec_a8, ) else: - warnings.warn(f"Only CUDA support GGUF quantization currently.") + if not _is_hip: + warnings.warn(f"Only CUDA support GGUF quantization currently.") logger = logging.getLogger(__name__) @@ -53,6 +54,8 @@ class GGUFConfig(QuantizationConfig): def __init__(self, modules_to_not_convert: list[str] | None = None) -> None: super().__init__() + if _is_hip: + warnings.warn(f"Only CUDA support GGUF quantization currently.") self.modules_to_not_convert = modules_to_not_convert or [] def __repr__(self) -> str: