Skip to content

Commit 57e369e

Browse files
committed
Remove graph opt lvls.
1 parent 19a3a33 commit 57e369e

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/transformers/onnx/__main__.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
from pathlib import Path
1717
from typing import Callable, Tuple, Union
1818

19-
from onnxruntime import GraphOptimizationLevel
2019
from transformers.models.albert import AlbertOnnxConfig
2120
from transformers.models.auto import AutoTokenizer
2221
from transformers.models.bart import BartOnnxConfig
@@ -69,14 +68,6 @@
6968
"xlm-roberta": {"default": XLMRobertaOnnxConfig.default},
7069
}
7170

72-
# ONNX Runtime optimization levels for humans
73-
ONNX_OPTIMIZATION_LEVELS = {
74-
"disabled": GraphOptimizationLevel.ORT_DISABLE_ALL,
75-
"default": GraphOptimizationLevel.ORT_ENABLE_BASIC,
76-
"extended": GraphOptimizationLevel.ORT_ENABLE_EXTENDED,
77-
"all": GraphOptimizationLevel.ORT_ENABLE_ALL,
78-
}
79-
8071

8172
def get_model_from_framework_and_features(framework: str, features: str, model: str):
8273
"""

0 commit comments

Comments
 (0)