edgeai-tidl-tools
edgeai-tidl-tools copied to clipboard
FAIL : This is an invalid model. Error: the graph is not acyclic.
I have a ONNX model and I'm trying to compile using this tool. This model is not acyclic but the message says so.
Number of OD backbone nodes = 0
Size of odBackboneNodeIds = 0
Preliminary subgraphs created = 2
Final number of subgraphs created are : 1, - Offloaded Nodes - 306, Total Nodes - 313
Traceback (most recent call last):
File "onnxrt_compiler_tsr.py", line 201, in <module>
run_model(config)
File "onnxrt_compiler_tsr.py", line 137, in run_model
sess_options=so)
File "/home/paul/.virtualenvs/tidl81/lib/python3.6/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 283, in __init__
self._create_inference_session(providers, provider_options)
File "/home/paul/.virtualenvs/tidl81/lib/python3.6/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 315, in _create_inference_session
sess.initialize_session(providers, provider_options)
onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : This is an invalid model. Error: the graph is not acyclic.
The model itself should be okay since
-
There is no such error when I just use
['CPUExecutionProvider']
. -
Here is the
tempDir/runtimes_visualization.svg
. The backbone is based on mobileNet. There are 14 output tensors. The network is not acyclic. -
When I compile manually with
ti-processor-sdk-rtos-j721e-evm-08_01_00_13/tidl_j7_08_01_00_05/ti_dl/utils/tidlModelImport/out/tidl_model_import
, I was able to compile the model into TIDL bin files.
Is this tool only for small example networks? The manual way (i.e, ./out/tidl_model_import.out ./custom/tidl_import_model.txt
) is too cumbersome to setup, so I was going to use this tool.
Here is the onnx model. (I don't need any post-processing.) debug-b1.zip
I gave these options:
framework: 'MMDetection'
meta_arch_type: 3
meta_layers_names_list: ''
model_path: ''
model_type: 'od'
num_images: 3
od_type: 'SSD'
mean: [0, 0, 0]
std: [1., 1., 1.]
image_size: [512, 256]