Conversion using `snpe-pytorch-to-dlc`:
> snpe-pytorch-to-dlc -i conv_transpose_module.pt --input_dim 'input_0' 1,128,64,64 --debug
In particular dimension 1 conflicts: 0 does not match 1.
Full trace:
2022-10-31 13:28:03,636 - 2972 - WARNING - Untyped Tensor found, assume it is float32
2022-10-31 13:28:03,844 - 209 - ERROR - Encountered Error: Traceback (most recent call last):
9: TVMFuncCall
8: std::_Function_handler<void (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*), tvm::runtime::TypedPackedFunc<tvm::IRModule (tvm::transform::Pass, tvm::IRModule)>::AssignTypedLambda<tvm::transform::{lambda(tvm::transform::Pass, tvm::IRModule)#7}>(tvm::transform::{lambda(tvm::transform::Pass, tvm::IRModule)#7}, std::string)::{lambda(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)#1}>::_M_invoke(std::_Any_data const&, tvm::runtime::TVMArgs&&, tvm::runtime::TVMRetValue*&&)
7: tvm::transform::Pass::operator()(tvm::IRModule) const
6: tvm::transform::Pass::operator()(tvm::IRModule, tvm::transform::PassContext const&) const
5: tvm::transform::ModulePassNode::operator()(tvm::IRModule, tvm::transform::PassContext const&) const
4: std::_Function_handler<void (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*), tvm::runtime::TypedPackedFunc<tvm::IRModule (tvm::IRModule, tvm::transform::PassContext)>::AssignTypedLambda<tvm::relay::transform::InferType()::{lambda(tvm::IRModule, tvm::transform::PassContext const&)#1}>(tvm::relay::transform::InferType()::{lambda(tvm::IRModule, tvm::transform::PassContext const&)#1})::{lambda(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)#1}>::_M_invoke(std::_Any_data const&, tvm::runtime::TVMArgs&&, tvm::runtime::TVMRetValue*&&)
3: tvm::DiagnosticContext::Render()
2: tvm::DiagnosticRenderer::Render(tvm::DiagnosticContext const&)
1: std::_Function_handler<void (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*), tvm::runtime::TypedPackedFunc<void (tvm::DiagnosticContext)>::AssignTypedLambda<tvm::TerminalRenderer(std::ostream&)::{lambda(tvm::DiagnosticContext const&)#1}>(tvm::TerminalRenderer(std::ostream&)::{lambda(tvm::DiagnosticContext const&)#1})::{lambda(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)#1}>::_M_invoke(std::_Any_data const&, tvm::runtime::TVMArgs&&, tvm::runtime::TVMRetValue*&&)
0: tvm::ReportAt(tvm::DiagnosticContext const&, std::ostream&, tvm::Span const&, tvm::Diagnostic const&)
File "/prj/qct/webtech_hyd/pcgbait/projects/zsnpe_waipio/SNPE/ThirdParty/tvm/src/tvm_fork/src/ir/diagnostic.cc", line 238
TVMError: The source maps are not populated for this module. Please use `tvm.relay.transform.AnnotateSpans` to attach source maps for error reporting. Error: The Relay type checker is unable to show the following types match.
In particular dimension 1 conflicts: 0 does not match 1.
Traceback (most recent call last):
File "/snpe-1.66.0.3729/bin/x86_64-linux-clang/snpe-pytorch-to-dlc", line 47, in main
converter = PyTorchConverterFrontend(args)
File "/snpe-1.66.0.3729/lib/python/qti/aisw/converters/pytorch/pytorch_to_ir.py", line 23, in __init__
**kwargs)
File "/snpe-1.66.0.3729/lib/python/qti/aisw/converters/relay/relay_to_ir.py", line 269, in __init__
self.importer.convert_to_relay(self.input_model_path)
File "/snpe-1.66.0.3729/lib/python/qti/aisw/converters/relay/importers/pytorch_importer.py", line 238, in convert_to_relay
self.mod, self.params = from_pytorch(pytorch_model, shape_list, self.dtype_dict)
File "/snpe-1.66.0.3729/lib/python/qti/tvm/relay/frontend/pytorch.py", line 3335, in from_pytorch
ret = converter.convert_operators(_get_operator_nodes(graph.nodes()), outputs, ret_name)[0]
File "/snpe-1.66.0.3729/lib/python/qti/tvm/relay/frontend/pytorch.py", line 2746, in convert_operators
self.record_output_type(relay_out)
File "/snpe-1.66.0.3729/lib/python/qti/tvm/relay/frontend/pytorch.py", line 220, in record_output_type
self.infer_type_with_prelude(output)
File "/snpe-1.66.0.3729/lib/python/qti/tvm/relay/frontend/pytorch.py", line 168, in infer_type_with_prelude
body = self.infer_type(val, self.prelude.mod)
File "/snpe-1.66.0.3729/lib/python/qti/tvm/relay/frontend/pytorch.py", line 161, in infer_type
new_mod = transform.InferType()(new_mod)
File "/snpe-1.66.0.3729/lib/python/qti/tvm/ir/transform.py", line 161, in __call__
return _ffi_transform_api.RunPass(self, mod)
File "/snpe-1.66.0.3729/lib/python/qti/tvm/_ffi/_ctypes/packed_func.py", line 237, in __call__
raise get_last_ffi_error()
qti.tvm._ffi.base.TVMError: Traceback (most recent call last):
9: TVMFuncCall
8: std::_Function_handler<void (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*), tvm::runtime::TypedPackedFunc<tvm::IRModule (tvm::transform::Pass, tvm::IRModule)>::AssignTypedLambda<tvm::transform::{lambda(tvm::transform::Pass, tvm::IRModule)#7}>(tvm::transform::{lambda(tvm::transform::Pass, tvm::IRModule)#7}, std::string)::{lambda(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)#1}>::_M_invoke(std::_Any_data const&, tvm::runtime::TVMArgs&&, tvm::runtime::TVMRetValue*&&)
7: tvm::transform::Pass::operator()(tvm::IRModule) const
6: tvm::transform::Pass::operator()(tvm::IRModule, tvm::transform::PassContext const&) const
5: tvm::transform::ModulePassNode::operator()(tvm::IRModule, tvm::transform::PassContext const&) const
4: std::_Function_handler<void (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*), tvm::runtime::TypedPackedFunc<tvm::IRModule (tvm::IRModule, tvm::transform::PassContext)>::AssignTypedLambda<tvm::relay::transform::InferType()::{lambda(tvm::IRModule, tvm::transform::PassContext const&)#1}>(tvm::relay::transform::InferType()::{lambda(tvm::IRModule, tvm::transform::PassContext const&)#1})::{lambda(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)#1}>::_M_invoke(std::_Any_data const&, tvm::runtime::TVMArgs&&, tvm::runtime::TVMRetValue*&&)
3: tvm::DiagnosticContext::Render()
2: tvm::DiagnosticRenderer::Render(tvm::DiagnosticContext const&)
1: std::_Function_handler<void (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*), tvm::runtime::TypedPackedFunc<void (tvm::DiagnosticContext)>::AssignTypedLambda<tvm::TerminalRenderer(std::ostream&)::{lambda(tvm::DiagnosticContext const&)#1}>(tvm::TerminalRenderer(std::ostream&)::{lambda(tvm::DiagnosticContext const&)#1})::{lambda(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)#1}>::_M_invoke(std::_Any_data const&, tvm::runtime::TVMArgs&&, tvm::runtime::TVMRetValue*&&)
0: tvm::ReportAt(tvm::DiagnosticContext const&, std::ostream&, tvm::Span const&, tvm::Diagnostic const&)
File "/prj/qct/webtech_hyd/pcgbait/projects/zsnpe_waipio/SNPE/ThirdParty/tvm/src/tvm_fork/src/ir/diagnostic.cc", line 238
TVMError: The source maps are not populated for this module. Please use `tvm.relay.transform.AnnotateSpans` to attach source maps for error reporting. Error: The Relay type checker is unable to show the following types match.
In particular dimension 1 conflicts: 0 does not match 1.
Dear developer,
Could you help to convert your pth model to onnx and try again if this issue still have?
BR.
Wei
Hi, thanks for the response.
Filed provided:
- conv_transpose.onnx: https://drive.google.com/file/d/1PRPsOu5_bC2rvquuYEyMLDSBRd8Spzbx/view?u...
- conv_transpose.dlc: https://drive.google.com/file/d/1z11rYo_MMNJFKsIPUUs6VZfB0Mo_n1B6/view?u...
That is, the conversion from ONNX -> DLC works. However I ave not yet confirmed that the execution actually works.
---