Closed senekor closed 2 months ago
The error message cycle-free graph violated: partition depends on itself
indicates that not all layers in the network were converted to HW layers. From the code you've shared, it looks like you are using the standard builder steps. For MobileNet-v1, there are additional custom steps required. You can find an example build flow in finn-examples: https://github.com/Xilinx/finn-examples/tree/main/build/mobilenet-v1
Or if you would like to try a manual approach, you can have a look our end2end test for MobileNet-v1: https://github.com/Xilinx/finn/blob/dev/tests/end2end/test_end2end_mobilenet_v1.py
To debug an error like this, you can open the step_convert_to_hw_layers.onnx
and check if all nodes are converted to fpgadataflow
nodes (which is indicated by the domain attribute). And see if you can apply additional transformations from the library to convert all layers.
Thanks a lot! I was able to make it work with the finn-examples repo as reference.
Prerequisites
Please make sure to check off these prerequisites before submitting a bug report.
Quick summary
I'm trying to compile Mobilenet V1 with FINN and I'm getting the error message "cycle-free graph violated: partition depends on itself". This looks like an internal error, so I'm not sure what I can do to fix it.
Steps to Reproduce
Add what needs to be done to reproduce the bug. Add code examples where useful and make sure to include the resulting ONNX files, and the commit hash you are working on.
It should fail during
step_create_dataflow_partition
.Expected behavior
No error messages, stiched IP is created successfully.
Actual behavior
Error message during
step_create_dataflow_partition
:ONNX files
(renamed to
.txt
because GitHub rejected.onnx
)This was produced by taking the pretrained model from brevitas and exporting it as ONNX.
mobilnet_v1.txt
I can't upload the intermediate model produced in
step_convert_to_hx
, because it's too big at 117 MB.