From 54154cf69880a201009fbb94f532cf7dc4764e0c Mon Sep 17 00:00:00 2001 From: Disty0 Date: Thu, 29 May 2025 20:22:49 +0300 Subject: [PATCH] Cleanup --- modules/intel/ipex/hijacks.py | 2 ++ modules/model_quant_sdnq.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/intel/ipex/hijacks.py b/modules/intel/ipex/hijacks.py index 0064e0695..0ce8abdc5 100644 --- a/modules/intel/ipex/hijacks.py +++ b/modules/intel/ipex/hijacks.py @@ -20,6 +20,8 @@ if os.environ.get('IPEX_FORCE_ATTENTION_SLICE', '0') == '0': use_dynamic_attention = False except Exception: use_dynamic_attention = True + else: + use_dynamic_attention = True else: use_dynamic_attention = bool(os.environ.get('IPEX_FORCE_ATTENTION_SLICE', '0') == '1') diff --git a/modules/model_quant_sdnq.py b/modules/model_quant_sdnq.py index 2dd10b850..cf2805894 100644 --- a/modules/model_quant_sdnq.py +++ b/modules/model_quant_sdnq.py @@ -1,4 +1,4 @@ -# pylint: disable=redefined-builtin,no-member +# pylint: disable=redefined-builtin,no-member,protected-access from typing import Any, Dict, List, Tuple, Optional, Union from dataclasses import dataclass @@ -320,7 +320,7 @@ def int8_matmul( output_shape = list(input.shape) output_shape[-1] = weight.shape[-1] input, scale = quantize_int8_matmul_input_compiled(input, scale) - result = decompress_symmetric_compiled(torch._int_mm(input, weight), scale, return_dtype, output_shape) # pylint: disable=protected-access + result = decompress_symmetric_compiled(torch._int_mm(input, weight), scale, return_dtype, output_shape) if bias is not None: result.add_(bias) return result @@ -673,7 +673,7 @@ class SDNQ_T5DenseGatedActDense(torch.nn.Module): # forward can't find what self if shared.opts.sdnq_decompress_compile: try: - torch._dynamo.config.cache_size_limit = max(8192, torch._dynamo.config.cache_size_limit) # pylint: disable=protected-access + torch._dynamo.config.cache_size_limit = max(8192, torch._dynamo.config.cache_size_limit) decompress_asymmetric_compiled = torch.compile(decompress_asymmetric, fullgraph=True) decompress_symmetric_compiled = torch.compile(decompress_symmetric, fullgraph=True) decompress_int4_asymmetric_compiled = torch.compile(decompress_int4_asymmetric, fullgraph=True)