Skip to content

Commit 37e8cc4

Browse files
committed
disable untill ipex version 2.5.0
1 parent aa3008f commit 37e8cc4

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

optimum/exporters/ipex/model_patcher.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def patch_op(m, target_m, new_op_name, new_op):
6262

6363

6464
def _patch_llama_model(model):
65-
if is_ipex_version("<=", "2.3.0"):
65+
if is_ipex_version("<", "2.5.0"):
6666
raise ImportError("Only ipex version > 2.3.0 supports RotaryEmbedding and IndirectAccessKVCache")
6767

6868
from intel_extension_for_pytorch.llm.modules import IndirectAccessKVCache, RotaryEmbedding

optimum/exporters/ipex/modeling_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def _llama_model_forward(
219219
# Adapted from https://github.com/huggingface/transformers/blob/v4.38.2/src/transformers/models/llama/modeling_llama.py#L694
220220
class _IPEXLlamaDecoderLayerRef(nn.Module):
221221
def __init__(self, module, config, distributed=False):
222-
if is_ipex_version("<=", "2.3.0"):
222+
if is_ipex_version("<", "2.5.0"):
223223
raise ImportError("Only ipex version > 2.3.0 supports Linear2SiluMul and LinearAdd")
224224

225225
from intel_extension_for_pytorch.llm.modules import Linear2SiluMul, LinearAdd

optimum/intel/ipex/modeling_base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161

6262
def _is_patched_with_ipex(model, task):
63-
if is_ipex_version("<=", "2.3.0"):
63+
if is_ipex_version("<", "2.5.0"):
6464
return False
6565

6666
if isinstance(model, torch.jit.ScriptModule):

tests/ipex/test_modeling.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def test_pipeline(self, model_arch):
271271
}
272272
)
273273
)
274-
@unittest.skipIf(is_ipex_version("<=", "2.3.0"), reason="Only ipex version > 2.3.0 supports ipex model patching")
274+
@unittest.skipIf(is_ipex_version("<", "2.5.0"), reason="Only ipex version > 2.3.0 supports ipex model patching")
275275
def test_ipex_patching_beam_search(self, test_name, model_arch, use_cache):
276276
model_id = MODEL_NAMES[model_arch]
277277
set_seed(SEED)
@@ -296,7 +296,7 @@ def test_ipex_patching_beam_search(self, test_name, model_arch, use_cache):
296296
}
297297
)
298298
)
299-
@unittest.skipIf(is_ipex_version("<=", "2.3.0"), reason="Only ipex version > 2.3.0 supports ipex model patching")
299+
@unittest.skipIf(is_ipex_version("<", "2.5.0"), reason="Only ipex version > 2.3.0 supports ipex model patching")
300300
def test_ipex_patching_topk(self, test_name, model_arch, use_cache):
301301
model_id = MODEL_NAMES[model_arch]
302302
set_seed(SEED)
@@ -320,7 +320,7 @@ def test_ipex_patching_topk(self, test_name, model_arch, use_cache):
320320
}
321321
)
322322
)
323-
@unittest.skipIf(is_ipex_version("<=", "2.3.0"), reason="Only ipex version > 2.3.0 supports ipex model patching")
323+
@unittest.skipIf(is_ipex_version("<", "2.5.0"), reason="Only ipex version > 2.3.0 supports ipex model patching")
324324
def test_ipex_patching_topp(self, test_name, model_arch, use_cache):
325325
model_id = MODEL_NAMES[model_arch]
326326
set_seed(SEED)

0 commit comments

Comments
 (0)