Skip to content

Commit 0c80be3

Browse files
committed
pass config when convert class
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
1 parent b0cec9c commit 0c80be3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

optimum/exporters/ipex/model_patcher.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def _patch_bert_model(model):
119119
Patch bert model:
120120
1. Linear fusion with Linear + Gelu
121121
"""
122-
convert_class(model, BertIntermediate, _IPEXIntermediate)
122+
convert_class(model, BertIntermediate, _IPEXIntermediate, model.config)
123123
return model
124124

125125

@@ -128,7 +128,7 @@ def _patch_vit_model(model):
128128
Patch vit model:
129129
1. Linear fusion with Linear + Gelu
130130
"""
131-
convert_class(model, ViTIntermediate, _IPEXIntermediate)
131+
convert_class(model, ViTIntermediate, _IPEXIntermediate, model.config)
132132
return model
133133

134134

0 commit comments

Comments
 (0)