This commit is contained in:
Disty0
2025-11-29 01:46:04 +03:00
parent 01a0f6b356
commit d9bc31e7da
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ def apply_sdnq_options_to_module(model, dtype: torch.dtype = None, dequantize_fp
def apply_sdnq_options_to_model(model, dtype: torch.dtype = None, dequantize_fp32: bool = None, use_quantized_matmul: bool = None):
if use_quantized_matmul and not use_torch_compile:
raise ValueError("SDNQ Quantized MatMul requires a working Triton install.")
raise RuntimeError("SDNQ Quantized MatMul requires a working Triton install.")
model = apply_sdnq_options_to_module(model, dtype=dtype, dequantize_fp32=dequantize_fp32, use_quantized_matmul=use_quantized_matmul)
if hasattr(model, "quantization_config"):
if use_quantized_matmul is not None:
+1 -1
View File
@@ -909,7 +909,7 @@ class SDNQConfig(QuantizationConfigMixin):
Safety checker that arguments are correct
"""
if self.use_quantized_matmul and not use_torch_compile:
raise ValueError("SDNQ Quantized MatMul requires a working Triton install.")
raise RuntimeError("SDNQ Quantized MatMul requires a working Triton install.")
if self.weights_dtype not in accepted_weight_dtypes:
raise ValueError(f"SDNQ only support weight dtypes in {accepted_weight_dtypes} but found {self.weights_dtype}")
if self.quantized_matmul_dtype is not None and self.quantized_matmul_dtype not in accepted_matmul_dtypes: