Xilinx / finn

Dataflow compiler for QNN inference on FPGAs
https://xilinx.github.io/finn
BSD 3-Clause "New" or "Revised" License
708 stars 225 forks source link

cycle-free graph violated: partition depends on itself #863

Open sansi-zhang opened 1 year ago

sansi-zhang commented 1 year ago

Hi @fpjentzsch, I ran into the same problem and I tried the same thing with ResNet-50 but it still failed.

In detail

I ran into a problem while executing model.transform(CreateDataflowPartition()).

image

I made some adjustments and tests (see https://github.com/Xilinx/finn/issues/860#issuecomment-1649853296 for details), but the error still occurred.

Then I looked at the answers in this issue, and I used the ResNet-50 process to re-tune my code, but I was still stuck.

Part of the onnx file when resnet-50 is not used, see https://github.com/Xilinx/finn/issues/860#issuecomment-1649853296

Part of the onnx file when using resnet-50, as follows.

image

image

I guessed that it was due to the concat operation, so I stopped using concat and split all the output, but still had the same problem. image

I hope you can help me solve this problem.

Thanks again.

Originally posted by @Special-zhang in https://github.com/Xilinx/finn/discussions/431#discussioncomment-6546507