Skip to content

MobileNetV1 - "size of variable 'srl' is too large to handle" from Q_srl.v at step "step_out_of_context_synthesis" #1260

@kalahel

Description

@kalahel

Prerequisites

Please make sure to check off these prerequisites before submitting a bug report.

  • The bug appears on the current main-branch.
  • Check that the issue hasn't already been reported, by checking the currently open issues.
  • If there are steps to reproduce the problem, make sure to write them down below.
  • If relevant, please include the ONNX files, which were created directly before and/or after the bug.

Quick summary

I'm currently working on a split of the MobileNetV1 from finn example. I split it for its first part to fit in a Zynq7020 (onnx below). The problem is that I get "size of variable 'srl' is too large to handle" at step "step_out_of_context_synthesis".

Configuration

  • Vivado 2022.2 linux
  • Finn running on ubuntu on a WSL
  • Targeting a Zynq 7020

Onnx model

https://file.io/DivU9fhs8KuU

Details and steps

To get to the model above, I ran the steps from the finn examples scripts (same way as the readme) :

step_mobilenet_streamline,
step_mobilenet_lower_convs,
step_mobilenet_convert_to_hw_layers_separate_th,
"step_create_dataflow_partition",
"step_specialize_layers",
"step_apply_folding_config",
"step_minimize_bit_width",

I then split the model to fit on a Zynq7020 (not a Pynq but similar).

Then ran it to a script containing only those build steps :

    "step_generate_estimate_reports",
    "step_hw_codegen",
    "step_hw_ipgen",
    "step_set_fifo_depths",
    "step_create_stitched_ip",
    "step_measure_rtlsim_performance",
    "step_out_of_context_synthesis",
    "step_synthesize_bitfile",

Everything runs fine until step_out_of_context_synthesis, where the script seems to stop, I investigated the generated vivado project for this step and go this report :

vivado.log

In short the error is :
size of variable 'srl' is too large to handle; the size of the variable is 1204216, the limit is 1000000 [/synth_out_of_context_6dkwtifv/results_finn_design_wrapper/Q_srl.v:100]

I think it caused by the input size of the model : 224x224x3 x 8 bits = 1 204 224.

I tried fixing it manually with a tcl command set_param synth.elaboration.rodinMoreOptions "rt::set_parameter var_size_limit 4194304" (source) seemingly fixing it and now I get the error :
ERROR: [Synth 8-403] loop limit (65536) exceeded [/synth_out_of_context_moj0vvpc/results_finn_design_wrapper/Q_srl.v:179].

How can I fix this behavior ? I assume that if the example is working on the alveo, vivado should be able to synthesize loop and array this big.

Thanks you for your time,
Mat

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions