From f2e12a682ffc40ad7be52ed05e1954dce32bd0bc Mon Sep 17 00:00:00 2001 From: Disty0 Date: Sat, 4 Oct 2025 19:17:05 +0300 Subject: [PATCH] SDNQ remove use_contiguous_mm path in re_quant --- modules/sdnq/dequantizer.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/sdnq/dequantizer.py b/modules/sdnq/dequantizer.py index 411ae236c..3881cfe34 100644 --- a/modules/sdnq/dequantizer.py +++ b/modules/sdnq/dequantizer.py @@ -4,7 +4,7 @@ from typing import Tuple import torch -from .common import dtype_dict, compile_func, use_contiguous_mm +from .common import dtype_dict, compile_func from .packed_int import pack_int_symetric, unpack_int_symetric, pack_int_asymetric, unpack_int_asymetric @@ -51,11 +51,7 @@ def quantize_fp8(input: torch.FloatTensor, dim: int = -1) -> Tuple[torch.Tensor, def re_quantize_int8(weight: torch.FloatTensor) -> Tuple[torch.CharTensor, torch.FloatTensor]: if weight.ndim > 2: # convs weight = weight.flatten(1,-1) - if use_contiguous_mm: - weight, scale = quantize_int8(weight.t(), dim=0) - else: - weight, scale = quantize_int8(weight, dim=-1) - weight, scale = weight.t_(), scale.t_() + weight, scale = quantize_int8(weight.t(), dim=0) return weight, scale