From 2b39d7ceeef15711063aa43870ecf23d9607e011 Mon Sep 17 00:00:00 2001 From: changwangss Date: Sun, 28 Jan 2024 23:36:07 -0800 Subject: [PATCH] Fix WOQ IPEX condition Signed-off-by: changwangss --- intel_extension_for_transformers/llm/quantization/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intel_extension_for_transformers/llm/quantization/utils.py b/intel_extension_for_transformers/llm/quantization/utils.py index 26cf41c6fce..0bfc9c0a288 100644 --- a/intel_extension_for_transformers/llm/quantization/utils.py +++ b/intel_extension_for_transformers/llm/quantization/utils.py @@ -105,7 +105,7 @@ def _replace_linear( is_removed = False if (isinstance(module, torch.nn.Linear) or isinstance(module, WeightOnlyLinear) - or (is_ipex_available and isinstance(module, ipex.nn.utils._weight_prepack._IPEXLinear))) \ + or (is_ipex_available() and isinstance(module, ipex.nn.utils._weight_prepack._IPEXLinear))) \ and (name not in modules_to_not_convert): # Check if the current key is not in the `modules_to_not_convert` if not any(