Skip to content

Commit f602963

Browse files
committed
test
1 parent 73ef3f9 commit f602963

File tree

3 files changed

+3
-1185
lines changed

3 files changed

+3
-1185
lines changed

optimum/exporters/openvino/__main__.py

+2
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ def main_export(
137137
>>> main_export("gpt2", output="gpt2_onnx/")
138138
```
139139
"""
140+
device = "cpu"
140141
original_task = task
141142
task = TasksManager.map_from_synonym(task)
142143
framework = TasksManager.determine_framework(model_name_or_path, subfolder=subfolder, framework=framework)
@@ -237,6 +238,7 @@ class StoreAttr(object):
237238
framework=framework,
238239
device=device,
239240
library_name=library_name,
241+
torch_dype=torch.float32,
240242
**loading_kwargs,
241243
)
242244

optimum/exporters/openvino/convert.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ def ts_patched_forward(*args, **kwargs):
404404
ov_model = convert_model(model, example_input=dummy_inputs, input=input_info)
405405

406406
except Exception as ex:
407-
logger.warning(f"Export model to OpenVINO directly failed with: \n{ex}.\nModel will be exported to ONNX")
407+
logger.warning(f"Export model to OpenVINO directly failed with: \n{ex}.\nModel will be exported to ONNX {dummy_inputs}")
408408

409409
if stateful:
410410
# cannot raise because stateful is enabled by default and it would break backward compatibility for models that couldn't convert to OV directly

0 commit comments

Comments
 (0)