openvino icon indicating copy to clipboard operation
openvino copied to clipboard

[Bug]: Operators unsupported

Open JoewVm opened this issue 1 year ago • 2 comments

OpenVINO Version

OpenVINO 2024.1.0

Operating System

Windows System

Device used for inference

CPU

Framework

PyTorch

Model used

No response

Issue description

Operators unsupported issue when using OpenVINO to convert pytorch model to openvino model. 当使用OpenVINO将pytorch模型转换为openvino模型时出现算子不支持的问题。 image

Step-by-step reproduction

No response

Relevant log output

Traceback (most recent call last):
  File "d:\dachuang\BYHE-master-mod3\transformer.py", line 41, in <module>
    ov_model = ov.convert_model(
  File "D:\anaconda3\envs\rppg\lib\site-packages\openvino\tools\ovc\convert.py", line 100, in convert_model
    ov_model, _ = _convert(cli_parser, params, True)
  File "D:\anaconda3\envs\rppg\lib\site-packages\openvino\tools\ovc\convert_impl.py", line 547, in _convert
    raise e
  File "D:\anaconda3\envs\rppg\lib\site-packages\openvino\tools\ovc\convert_impl.py", line 489, in _convert
    ov_model = driver(argv, {"conversion_parameters": non_default_params})
  File "D:\anaconda3\envs\rppg\lib\site-packages\openvino\tools\ovc\convert_impl.py", line 240, in driver
    ov_model = moc_emit_ir(prepare_ir(argv), argv)
  File "D:\anaconda3\envs\rppg\lib\site-packages\openvino\tools\ovc\convert_impl.py", line 189, in prepare_ir
    ov_model = moc_pipeline(argv, moc_front_end)
  File "D:\anaconda3\envs\rppg\lib\site-packages\openvino\tools\ovc\moc_frontend\pipeline.py", line 244, in moc_pipeline
    ov_model = moc_front_end.convert(input_model)
  File "D:\anaconda3\envs\rppg\lib\site-packages\openvino\frontend\frontend.py", line 18, in convert
    converted_model = super().convert(model)
openvino._pyopenvino.OpConversionFailure: Check 'is_conversion_successful' failed at src\frontends\pytorch\src\frontend.cpp:143:
FrontEnd API failed with OpConversionFailure:
Model wasn't fully converted. Failed operations detailed log:
-- prim::Constant with a message:
Exception happened during conversion of operation prim::Constant with schema (no schema)
Unable to cast Python instance of type <class 'NoneType'> to C++ type '?' (#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)
-- prim::ListConstruct with a message:
Exception happened during conversion of operation prim::ListConstruct with schema (no schema)
Check '!input_shapes.empty()' failed at src\core\shape_inference\include\concat_shape_inference.hpp:17:
While validating node 'opset1::Concat Concat_758 () -> (dynamic[...])' with friendly_name 'Concat_758'

-- prim::ListUnpack with a message:
prim::ListUnpack: unsupported input node: opset1::Constant aten::size/ShapeOf () -> (i64[0])
-- prim::device with a message:
String constant cannot be converted to OpenVINO opset and should be removed by consuming operation.
Summary:
-- No conversion rule found for operations: aten::__contains__, aten::append, aten::split, prim::layout
-- Conversion is failed for: prim::Constant, prim::ListConstruct, prim::ListUnpack, prim::device

Issue submission checklist

  • [X] I'm reporting an issue. It's not a question.
  • [X] I checked the problem with the documentation, FAQ, open issues, Stack Overflow, etc., and have not found a solution.
  • [X] There is reproducer code and related data files such as images, videos, models, etc.

JoewVm avatar May 21 '24 12:05 JoewVm

@mvafin could we create GFIs based on this request?

mlukasze avatar May 21 '24 12:05 mlukasze

@JoewVm thank you for reaching the OpenVINO! Could you please share the model with us as obviously according to the error some layers are not supported but there might be some model issues as well

andrei-kochin avatar May 21 '24 14:05 andrei-kochin

@JoewVm any updates for us?

andrei-kochin avatar May 28 '24 07:05 andrei-kochin

@JoewVm any updates for us?

Do you mean you need the complete program file for the model?

JoewVm avatar May 29 '24 06:05 JoewVm

@JoewVm Did you provide example_input argument to convert_model? Those operations look like they are generated by scripting, which happens when example_input is not provided.

mvafin avatar Jun 03 '24 10:06 mvafin

@JoewVm any updates on the question from Maxim?

andrei-kochin avatar Jun 21 '24 07:06 andrei-kochin

There was no error after adding example_input, sorry for not replying until now!

@JoewVm Did you provide example_input argument to convert_model? Those operations look like they are generated by scripting, which happens when example_input is not provided.

JoewVm avatar Jun 21 '24 14:06 JoewVm

Closing this as it seems issue has been addressed. Feel free to reopen and ask additional questions related to this topic.

avitial avatar Jun 21 '24 23:06 avitial