Forums - snpe-tensorflow-to-dlc conversion failed in tf with UDO

2 posts / 0 new
Last post
snpe-tensorflow-to-dlc conversion failed in tf with UDO
990933841
Join Date: 18 May 21
Posts: 2
Posted: Thu, 2021-06-17 01:03

I have a quantized tensorflow model file, and also define a UDO (json format file). The model defines an OwnOnednnMul and FsmnForward operation, but when it is converted to dlc format through snpe-tensorflow-to-dlc (command line: snpe -tensorflow-to-dlc --input_network model.pb --input_dim xxxx --out_node output --output_path model.dlc --udo udo.json --show_unconsumed_nodes), the following error will appear:


qti.aisw.converters.tensorflow.util.ConverterError: ERROR_TF_INPUT_OPERATION_NOT_FOUND: Input operation not found for Inference/split
2021-06-17 15:52:34,624-183-ERROR-Conversion FAILED: build_layer failed with Exception ERROR_TF_INPUT_OPERATION_NOT_FOUND: Input operation not found for Inference/split in layer SliceLayerBuilder
Traceback (most recent call last):
  File "/opt/snpe-1.50.0.2622/lib/python/qti/aisw/converters/tensorflow/tf_to_ir.py", line 548, in _create_layer
    layer_builder.build_layer(self.graph, self._context, descriptor, inputs, outputs)
  File "/opt/snpe-1.50.0.2622/lib/python/qti/aisw/converters/tensorflow/layers/slice.py", line 75, in build_layer
    input_shape = converter_context.get_input_layer_output_shape_for(descriptor.child_ops[0])
  File "/opt/snpe-1.50.0.2622/lib/python/qti/aisw/converters/tensorflow/tf_to_ir.py", line 200, in get_input_layer_output_shape_for
    output_op = self._get_input_layer_output_op_for(operation, idx)
  File "/opt/snpe-1.50.0.2622/lib/python/qti/aisw/converters/tensorflow/tf_to_ir.py", line 261, in _get_input_layer_output_op_for
    raise ConverterError(code_to_message.get_error_message('ERROR_TF_INPUT_OPERATION_NOT_FOUND')(operation.name))
qti.aisw.converters.tensorflow.util.ConverterError: ERROR_TF_INPUT_OPERATION_NOT_FOUND: Input operation not found for Inference/split

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/snpe-1.50.0.2622/bin/x86_64-linux-clang/snpe-tensorflow-to-dlc", line 52, in main
    ir_graph = converter.convert()
  File "/opt/snpe-1.50.0.2622/lib/python/qti/aisw/converters/tensorflow/tf_to_ir.py", line 339, in convert
    self._convert_layers()
  File "/opt/snpe-1.50.0.2622/lib/python/qti/aisw/converters/tensorflow/tf_to_ir.py", line 390, in _convert_layers
    self._create_layers(descriptors)
  File "/opt/snpe-1.50.0.2622/lib/python/qti/aisw/converters/tensorflow/tf_to_ir.py", line 440, in _create_layers
    self._create_layer(layer_builder, descriptor)
  File "/opt/snpe-1.50.0.2622/lib/python/qti/aisw/converters/tensorflow/tf_to_ir.py", line 553, in _create_layer
    (e, layer_builder.__class__.__name__))
qti.aisw.converters.tensorflow.util.ConverterError: build_layer failed with Exception ERROR_TF_INPUT_OPERATION_NOT_FOUND: Input operation not found for Inference/split in layer SliceLayerBuilder


The content of the UDO file is as follows:
{
  "UdoPackage_0":
  {
    "Operators": [
      {
        "type": "OwnOnednnMul",
        "inputs":[
          {"name": "input", "data_type": "INT_32", "quantization_mode":"TF"}
        ],
        "outputs":[
          {"name": "output", "data_type": "INT_32"}
        ],
        "core_types": ["DSP"],
        "dsp_arch_types": ["v68"]
      },
{
        "type": "FsmnForward",
        "inputs":[
          {"name": "input", "data_type": "INT_32", "quantization_mode":"TF"}
        ],
        "outputs":[
          {"name": "out", "data_type": "INT_32"}
        ],
        "core_types": ["DSP"],
        "dsp_arch_types": ["v68"]
      }
    ],
    "UDO_PACKAGE_NAME": "XXUDOPackage"
  }
}

How can I solve this problem? This problem has been blocked for several days. Any help in solving this issue will be greatly appreciated.


 

  • Up0
  • Down0
892586882
Join Date: 28 Mar 21
Posts: 3
Posted: Sun, 2021-06-27 23:45

you try to use udo with onnx model? and you can add output which your cuntom op with shape. good luck

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.