How to convert your FINN flow to the new custom op structure #1020
jmonks-amd
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Convert existing FINN flow to the new custom op structure
This post highlights the changes required for updating an existing FINN flow to accomadate the latest refactoring work that has taken place. While we strive to capture all possible changes, this list can not be exhaustive and more changes may be necessary depending on custom steps, models, local adjustments etc. which have been made to the user model.
Changes to be made
Rename build steps:
Rename Modules:
Import new step step_specialize_layers.
Update node names in folding config:
mem_mode is not exposed to the user via builder config anymore. This parameter needs to be deleted from the builder config and added per layer to the folding config json instead.
The mem_mode options have also been renamed, see ReadTheDocs for further information on the different modes.
Here is a simple mapping of the renaming:
The MVAU exposes an additional node attribute to set the resource type of the MAC operation (resType). By default this has been
lut
but the default has now changed toauto
. If you are not using this node attribute in your folding config, it might be when changing to the new flow, that the resource type for your MVAU_hls changes.If you have a model that has very tight resource constraints, it might be that the change in the default behavior causes your resources to be too high for a specific target device. By explicitly stating the resType in the folding config json and setting it to a fixed value (
dsp
orlut
), you can make sure that you achieve the desired behavior.(Optional) Make use of the new specialize layers functionality.
A specialize_layers_config.json config file can be specified to set the preferred_impl_style for each layer.
Point to the config file in the builder config:
Final Remarks
To reiterate, the above list is intended as a guide to help convert existing models to the new refactored FINN flow. This list is not exhaustive and can only take into consideration the standard flow. Changes will likely need to be made to any custom steps/models/modifications which have been made to your particular model.
Beta Was this translation helpful? Give feedback.
All reactions