PROCESSOR-SDK-J722S: [TIDL] Convert default onnx/tflite model to TIDL format fail

Part Number: PROCESSOR-SDK-J722S
Other Parts Discussed in Thread: AM69A

Tool/software:

Hi team:

TIDL version : 10.00.08.00

SDK LINUX image: 10.00.00.08

I use the example code: ~/edgeai-tidl-tools/examples/jupyter_notebooks/custom-model-onnx.ipynb and custom-model-tflite.ipynb to convert default model(onnx/tflite) file to TIDL format,

where default model is provided from /edgeai-tidl-tools/examples/jupyter_notebooks/models/public

But I get the two error below:

-------- Running Calibration in Float Mode to Collect Tensor Statistics --------
[=============================================================================] 100 %

------------------ Fixed-point Calibration Iteration [1 / 3]: ------------------
Illegal instruction (core dumped)                                             ] 25 %
[TIDL Import]  ERROR: Failed to run calibration pass, system command returned error: 33792 -- [tidl_import_core.cpp, 675]
[TIDL Import]  ERROR: Failed to run Calibration - Failed in function: tidlRunQuantStatsTool -- [tidl_import_core.cpp, 1720]
[TIDL Import] [QUANTIZATION] ERROR:  - Failed in function: TIDL_quantStatsFixedOrFloat -- [tidl_import_quantize.cpp, 3574]
[TIDL Import] [QUANTIZATION] ERROR:  - Failed in function: TIDL_runIterativeCalibration -- [tidl_import_quantize.cpp, 3722]
[TIDL Import] [QUANTIZATION] ERROR:  - Failed in function: TIDL_import_quantize -- [tidl_import_quantize.cpp, 4545]
[TIDL Import]  ERROR:  - Failed in function: TIDL_import_backend -- [tidl_import_core.cpp, 4139]
[TIDL Import]  ERROR:  - Failed in function: TIDL_runtimesPostProcessNet -- [tidl_runtimes_import_common.cpp, 1390]
tidl_tfLiteRtImport_delegate.cpp Invoke 647 
100%|█████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:10<00:00,  2.56s/it]

******** WARNING ******* : Could not open custom-artifacts/tflite/mobilev1//allowedNode.txt for reading... Entire model will run on ARM without any delegation to TIDL !

Please help me to check this symptom,

Thanks for your kindly help.

  • Hi, 

    What specific model are you using?

    Chris

  • Hi Chris:

    I use the ~/edgeai-tidl-tools/examples/jupyter_notebooks/models/public/onnx/resnet18_opset9.onnx 

    and  ~/edgeai-tidl-tools/examples/jupyter_notebooks/models/public/tflite/mobilenet_v1_1.0_224.onnx 

    above model are the example model in TIDL(10.00.08.00)

    I would like to confirm if the absence of a GPU in my testing environment could affect the results of the process?

    Thanks

  • Hi Chris,

    I occasionally encounter a "Bus error (core dumped)" in TIDL_subgraphRtCreate (log below) while running the model resnet18_opset9.onnx. I have already checked, and the available memory appears to be sufficient.

     

    [Ken debug] show support providers : ['TIDLExecutionProvider', 'TIDLCompilationProvider', 'CPUExecutionProvider']
    [Debug] TIDL_TOOLS_PATH = /home/ken/TIDL00.00.08.00/do_once/edgeai-tidl-tools/tidl_tools
    2024-12-11 21:31:15.243468669 [W:onnxruntime:, graph.cc:3480 CleanUnusedInitializersAndNodeArgs] Removing initializer 'layer4.1.bn1.num_batches_tracked'. It is not used by any node and should be removed from the model.
    2024-12-11 21:31:15.243501699 [W:onnxruntime:, graph.cc:3480 CleanUnusedInitializersAndNodeArgs] Removing initializer 'layer4.0.bn2.num_batches_tracked'. It is not used by any node and should be removed from the model.
    2024-12-11 21:31:15.243510738 [W:onnxruntime:, graph.cc:3480 CleanUnusedInitializersAndNodeArgs] Removing initializer 'layer3.0.downsample.1.num_batches_tracked'. It is not used by any node and should be removed from the model.
    2024-12-11 21:31:15.243517742 [W:onnxruntime:, graph.cc:3480 CleanUnusedInitializersAndNodeArgs] Removing initializer 'layer4.0.downsample.1.num_batches_tracked'. It is not used by any node and should be removed from the model.
    2024-12-11 21:31:15.243524477 [W:onnxruntime:, graph.cc:3480 CleanUnusedInitializersAndNodeArgs] Removing initializer 'layer3.0.bn1.num_batches_tracked'. It is not used by any node and should be removed from the model.
    2024-12-11 21:31:15.243531038 [W:onnxruntime:, graph.cc:3480 CleanUnusedInitializersAndNodeArgs] Removing initializer 'layer3.1.bn2.num_batches_tracked'. It is not used by any node and should be removed from the model.
    2024-12-11 21:31:15.243538926 [W:onnxruntime:, graph.cc:3480 CleanUnusedInitializersAndNodeArgs] Removing initializer 'layer2.0.downsample.1.num_batches_tracked'. It is not used by any node and should be removed from the model.
    2024-12-11 21:31:15.243545474 [W:onnxruntime:, graph.cc:3480 CleanUnusedInitializersAndNodeArgs] Removing initializer 'layer3.1.bn1.num_batches_tracked'. It is not used by any node and should be removed from the model.
    2024-12-11 21:31:15.243551952 [W:onnxruntime:, graph.cc:3480 CleanUnusedInitializersAndNodeArgs] Removing initializer 'layer1.0.bn2.num_batches_tracked'. It is not used by any node and should be removed from the model.
    2024-12-11 21:31:15.243558777 [W:onnxruntime:, graph.cc:3480 CleanUnusedInitializersAndNodeArgs] Removing initializer 'layer1.1.bn2.num_batches_tracked'. It is not used by any node and should be removed from the model.
    2024-12-11 21:31:15.243565775 [W:onnxruntime:, graph.cc:3480 CleanUnusedInitializersAndNodeArgs] Removing initializer 'bn1.num_batches_tracked'. It is not used by any node and should be removed from the model.
    2024-12-11 21:31:15.243573424 [W:onnxruntime:, graph.cc:3480 CleanUnusedInitializersAndNodeArgs] Removing initializer 'layer1.0.bn1.num_batches_tracked'. It is not used by any node and should be removed from the model.
    2024-12-11 21:31:15.243580562 [W:onnxruntime:, graph.cc:3480 CleanUnusedInitializersAndNodeArgs] Removing initializer 'layer2.1.bn1.num_batches_tracked'. It is not used by any node and should be removed from the model.
    2024-12-11 21:31:15.243586884 [W:onnxruntime:, graph.cc:3480 CleanUnusedInitializersAndNodeArgs] Removing initializer 'layer1.1.bn1.num_batches_tracked'. It is not used by any node and should be removed from the model.
    2024-12-11 21:31:15.243593299 [W:onnxruntime:, graph.cc:3480 CleanUnusedInitializersAndNodeArgs] Removing initializer 'layer4.1.bn2.num_batches_tracked'. It is not used by any node and should be removed from the model.
    2024-12-11 21:31:15.243600069 [W:onnxruntime:, graph.cc:3480 CleanUnusedInitializersAndNodeArgs] Removing initializer 'layer4.0.bn1.num_batches_tracked'. It is not used by any node and should be removed from the model.
    2024-12-11 21:31:15.243606536 [W:onnxruntime:, graph.cc:3480 CleanUnusedInitializersAndNodeArgs] Removing initializer 'layer2.0.bn1.num_batches_tracked'. It is not used by any node and should be removed from the model.
    2024-12-11 21:31:15.243612767 [W:onnxruntime:, graph.cc:3480 CleanUnusedInitializersAndNodeArgs] Removing initializer 'layer3.0.bn2.num_batches_tracked'. It is not used by any node and should be removed from the model.
    2024-12-11 21:31:15.243620848 [W:onnxruntime:, graph.cc:3480 CleanUnusedInitializersAndNodeArgs] Removing initializer 'layer2.0.bn2.num_batches_tracked'. It is not used by any node and should be removed from the model.
    2024-12-11 21:31:15.243628754 [W:onnxruntime:, graph.cc:3480 CleanUnusedInitializersAndNodeArgs] Removing initializer 'layer2.1.bn2.num_batches_tracked'. It is not used by any node and should be removed from the model.
    tidl_tools_path                                 = /home/ken/TIDL00.00.08.00/do_once/edgeai-tidl-tools/tidl_tools 
    artifacts_folder                                = custom-artifacts/onnx/resnet18_opset9.onnx 
    tidl_tensor_bits                                = 8 
    debug_level                                     = 3 
    num_tidl_subgraphs                              = 16 
    tidl_denylist                                   = 
    tidl_denylist_layer_name                        = 
    tidl_denylist_layer_type                        = 
    tidl_allowlist_layer_name                       = 
    model_type                                      =  
    tidl_calibration_accuracy_level                 = 7 
    tidl_calibration_options:num_frames_calibration = 4 
    tidl_calibration_options:bias_calibration_iterations = 3 
    mixed_precision_factor = -1.000000 
    model_group_id = 0 
    power_of_2_quantization                         = 2 
    ONNX QDQ Enabled                                = 0 
    enable_high_resolution_optimization             = 0 
    pre_batchnorm_fold                              = 1 
    add_data_convert_ops                            = 1 
    output_feature_16bit_names_list                 =  
    m_params_16bit_names_list                       =  
    m_single_core_layers_names_list                 =  
    Inference mode                                  = 0 
    Number of cores                                 = 1 
    reserved_compile_constraints_flag               = 1601 
    partial_init_during_compile                     = 0 
    ti_internal_reserved_1                          = 
    
    ========================= [Model Compilation Started] =========================
    
    Model compilation will perform the following stages:
    1. Parsing
    2. Graph Optimization
    3. Quantization & Calibration
    4. Memory Planning
    
    ============================== [Version Summary] ==============================
    
    -------------------------------------------------------------------------------
    |          TIDL Tools Version          |              10_00_08_00             |
    -------------------------------------------------------------------------------
    |         C7x Firmware Version         |              10_00_02_00             |
    -------------------------------------------------------------------------------
    |            Runtime Version           |            1.14.0+10000005           |
    -------------------------------------------------------------------------------
    |          Model Opset Version         |                   9                  |
    -------------------------------------------------------------------------------
    
    NOTE: The runtime version here specifies ONNXRT_VERSION+TIDL_VERSION
    Ex: 1.14.0+1000XXXX -> ONNXRT 1.14.0 and a TIDL_VERSION 10.00.XX.XX
    
    ============================== [Parsing Started] ==============================
    
    [TIDL Import] [PARSER] WARNING: Network not identified as Object Detection network : (1) Ignore if network is not Object Detection network (2) If network is Object Detection network, please specify "model_type":"OD" as part of OSRT compilation options
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Conv,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Relu,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - MaxPool,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Conv,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Relu,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Conv,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Add,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Relu,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Conv,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Relu,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Conv,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Add,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Relu,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Conv,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Conv,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Relu,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Conv,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Add,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Relu,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Conv,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Relu,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Conv,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Add,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Relu,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Conv,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Conv,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Relu,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Conv,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Add,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Relu,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Conv,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Relu,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Conv,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Add,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Relu,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Conv,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Conv,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Relu,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Conv,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Add,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Relu,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Conv,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Relu,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Conv,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Add,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Relu,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - GlobalAveragePool,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Flatten,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    [TIDL Import] [PARSER] SUPPORTED: Layers type supported by TIDL --- layer type - Gemm,  Node name -  -- [tidl_onnxRtImport_core.cpp, 529]
    
    ------------------------- Subgraph Information Summary -------------------------
    -------------------------------------------------------------------------------
    |          Core           |      No. of Nodes       |   Number of Subgraphs   |
    -------------------------------------------------------------------------------
    | C7x                     |                      49 |                       1 |
    | CPU                     |                       0 |                       x |
    -------------------------------------------------------------------------------
    Running Runtimes GraphViz - /home/ken/TIDL00.00.08.00/do_once/edgeai-tidl-tools/tidl_tools/tidl_graphVisualiser_runtimes.out custom-artifacts/onnx/resnet18_opset9.onnx/allowedNode.txt custom-artifacts/onnx/resnet18_opset9.onnx/tempDir/graphvizInfo.txt custom-artifacts/onnx/resnet18_opset9.onnx/tempDir/runtimes_visualization.svg 
    ============================= [Parsing Completed] =============================
    
    TIDL_createStateImportFunc Started:
    Compute on node : TIDLExecutionProvider_TIDL_0_0
      0,            Conv, 3, 1, input.1, 124
      1,            Relu, 1, 1, 124, 125
      2,         MaxPool, 1, 1, 125, 126
      3,            Conv, 3, 1, 126, 128
      4,            Relu, 1, 1, 128, 129
      5,            Conv, 3, 1, 129, 131
      6,             Add, 2, 1, 131, 132
      7,            Relu, 1, 1, 132, 133
      8,            Conv, 3, 1, 133, 135
      9,            Relu, 1, 1, 135, 136
     10,            Conv, 3, 1, 136, 138
     11,             Add, 2, 1, 138, 139
     12,            Relu, 1, 1, 139, 140
     13,            Conv, 3, 1, 140, 142
     14,            Relu, 1, 1, 142, 143
     15,            Conv, 3, 1, 143, 145
     16,            Conv, 3, 1, 140, 147
     17,             Add, 2, 1, 145, 148
     18,            Relu, 1, 1, 148, 149
     19,            Conv, 3, 1, 149, 151
     20,            Relu, 1, 1, 151, 152
     21,            Conv, 3, 1, 152, 154
     22,             Add, 2, 1, 154, 155
     23,            Relu, 1, 1, 155, 156
     24,            Conv, 3, 1, 156, 158
     25,            Relu, 1, 1, 158, 159
     26,            Conv, 3, 1, 159, 161
     27,            Conv, 3, 1, 156, 163
     28,             Add, 2, 1, 161, 164
     29,            Relu, 1, 1, 164, 165
     30,            Conv, 3, 1, 165, 167
     31,            Relu, 1, 1, 167, 168
     32,            Conv, 3, 1, 168, 170
     33,             Add, 2, 1, 170, 171
     34,            Relu, 1, 1, 171, 172
     35,            Conv, 3, 1, 172, 174
     36,            Relu, 1, 1, 174, 175
     37,            Conv, 3, 1, 175, 177
     38,            Conv, 3, 1, 172, 179
     39,             Add, 2, 1, 177, 180
     40,            Relu, 1, 1, 180, 181
     41,            Conv, 3, 1, 181, 183
     42,            Relu, 1, 1, 183, 184
     43,            Conv, 3, 1, 184, 186
     44,             Add, 2, 1, 186, 187
     45,            Relu, 1, 1, 187, 188
     46, GlobalAveragePool, 1, 1, 188, 189
     47,         Flatten, 1, 1, 189, 190
     48,            Gemm, 3, 1, 190, 191
    
    Input tensor name -  input.1 
    Output tensor name - 191 
      0%|                                                                                                                                                                                                                    | 0/4 [00:00<?, ?it/s]In TIDL_onnxRtImportInit subgraph_name=subgraph_0
    Layer 0, subgraph id subgraph_0, name=191
    Layer 1, subgraph id subgraph_0, name=input.1
    ==================== [Optimization for subgraph_0 Started] ====================
    
    In TIDL_runtimesOptimizeNet: LayerIndex = 51, dataIndex = 50 
    ----------------------------- Optimization Summary -----------------------------
    ---------------------------------------------------------------------------------
    |          Layer         | Nodes before optimization | Nodes after optimization |
    ---------------------------------------------------------------------------------
    | TIDL_InnerProductLayer |                         1 |                        1 |
    | TIDL_EltWiseLayer      |                         8 |                        8 |
    | TIDL_ReLULayer         |                        17 |                        0 |
    | TIDL_FlattenLayer      |                         1 |                        0 |
    | TIDL_ConvolutionLayer  |                        20 |                       20 |
    | TIDL_PoolingLayer      |                         2 |                        2 |
    ---------------------------------------------------------------------------------
    
    =================== [Optimization for subgraph_0 Completed] ===================
    
    In TIDL_runtimesPostProcessNet 
    ************ in TIDL_subgraphRtCreate ************ 
     The soft limit is 10240
    The hard limit is 10240
    MEM: Init ... !!!
    MEM: Init ... Done !!!
     0.0s:  VX_ZONE_INIT:Enabled
     0.4s:  VX_ZONE_ERROR:Enabled
     0.5s:  VX_ZONE_WARNING:Enabled
     0.2289s:  VX_ZONE_INIT:[tivxInit:190] Initialization Done !!!
    Bus error (core dumped)

    Do you have any suggestions or insights regarding this issue?

    Thank you for your kind assistance!

    Best regards,
    Ken 

  • Hi Ken,

    If you are getting intermittent failures, this is indicative of a problem in edgeai-tidl-tools/tidl_tools.  Something was probably not installed correctly, or the ENV var was not set correctly.  To re-install tidl_tools:

    Move the tidl_tools/ directory to another name.

    Make sure SOC is set, for example "export SOC=am69a"

    After that is installed make sure TIDL_TOOLS_PATH is set correctly. 
    TIDL_TOOLS_PATH=<SOME_PATH>/edgeai-tidl-tools/tidl_tools

    Also, can you try importing the model using OSRT-python?

    To do this, go to edgeai-tidl-tools/examples/osrt_python/ort and edit ../models_config.py to add your model (just copy a similar model config and set model_path to your model).  For example:

    model_path = os.path.join('/<path_to_your_model>/', 'mobilenet_v2_toy_model.onnx')

    then in edgeai-tidl-tools/examples/osrt_python/ort run:

    python3 ./onnxrt_ep.py -c -m <your_model_name>

    your_model_name will be specified as the first entry for your model in model_configs.py.  For example:

    "your_model_name": create_model_config(
    source=AttrDict(
    #model_url= 'file://home/a0194920local/10.0/edgeai-tidl-tools/models/public/mymodel.onnx',
    opt= True,
    infer_shape = True
    ), #set to dummy url for local file
    preprocess=AttrDict(
    resize=448,
    crop=224,
    data_layout="NCHW",
    resize_with_pad=False,
    reverse_channels=False,
    ),
    session=AttrDict(
    session_name='onnxrt' ,
    model_path = os.path.join('/home/a0194920local/', 'mobilenet_v2_toy_model.onnx'),
    #model_path = os.path.join(models_base_path, 'mymodel.onnx'),
    input_mean=[123.675, 116.28, 103.53], #confirmed by HQV
    input_scale = [0.017125, 0.017507, 0.017429], # confirmed by HQV
    ),
    task_type="classification",
    optional_options=AttrDict(
    #debug_level= 3,
    tensor_bits= 8,
    # "deny_list:layer_name" : '/original_model/backbone/arms.0/Mul',
    ),
    extra_info=AttrDict(
    num_images=numImages,
    num_classes=3,
    #model_type="detection"
    #model_type= 'segmentation',
    ),
    ),

  • Hi Chirs:

    I Try the python3 ./onnxrt_ep.py with default model, then can work.

    I will try my custom model.

    Sorry that I have a question : 

    If I aim to produce a converted model with an input type of uint8, is it mandatory for the original model to also have an input type of uint8?

    Alternatively, can I provide an original model with an input type of float and utilize the conversion tool to transform it into a model with an input type of uint8?

    Thanks for your kindly help.

  • The E2E responses will be delayed due to the TI Holiday (Christmas). Thank you for your patience.

  • Hi Ken,

    Please open a new thread with your new question.  These threads are searchable, and we like to keep them to a single topic.

    Chris