This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[FAQ] AM68A: How to leverage edgeai-tidl-tool's Advanced Examples for custom model compilation ?

Part Number: AM68A

I have custom model that i want to compile using edgeai-tidl-tools, with following details

1. The standard OSRT example scripts needs pre and post processing params, how can we bypass this and use randomly generated tensors as input.

2. How to deal with TIDL unsupported params ? 

  • Please follow below listed steps,

    Download the edgeai-tidl-tools from official github repos : (

    1.  Set up edgeai-tidl-tools

    2. Compile your model

    • You can find advance example code under below path  
      • ls examples/osrt_python/advanced_examples/unit_tests_validation/ort/

    • You have to modify Please download the update python script ( for your model. You may need to change the path for your model (line# 118). Note that this script generates input tensor randomly.
      • python -d  # delegate all the layers to see if the onnx model is good
      • python -c  # Compile the model, based on tensor_bits 
      • python      # Run inference
        • You may come across error if "../outputs/output_ref/onnx" or "../outputs/output_test/onnx" doesn't exist. You have to make these directories
    • This script uses config params specified in examples/osrt_python/advanced_examples/unit_tests_validation/ You have to set
      • "advanced_options:add_data_convert_ops" : 3, (line #69)

    • And you may want to change the following params:
      • tensor_bits = 32  (line# 20 - 32 for floating, 16 and 8 for fixed point)
      • debug_level = 0 (line# 21 - 1~ 3 recommended)
    • If particular layers are not supported, you can put such layers in "deny_list" (line# 52) in For example,
      • "deny_list:layer_name":"p2o.GlobalAveragePool.4,p2o.Conv.101,p2o.Conv.104",

    • Then you can find artifacts directory created in "artifacts_folder", which is specified in (line# 16)