EPFL-LAP / dynamatic

DHLS (Dynamic High-Level Synthesis) compiler based on MLIR
Other
60 stars 18 forks source link

[Experimental][ResourceSharing] Introduce ResourceSharingFCCM22Pass #64

Closed dapfister313 closed 4 months ago

dapfister313 commented 8 months ago

This PR introduces the ResourceSharingFCCM22Pass. This implements the methodology described in paper "Resource Sharing of Dataflow Circuits" presented at FCCM '22. There is the implementation of the complete algorithm that finds a grouping scheme for operations of the same type, such that there is no performance degradation when a group of operations share the same physical functional unit.

For example, the following outputs the best possible grouping scheme for the multipliers:

dynamatic-opt handshake_transformed.mlir \
    --handshake-set-buffering-properties="version=fpga20" \
        --sharing-FCCM22="algorithm=fpga20 frequencies=$F_FREQUENCIES timing-models=$DYNAMATIC_DIR/data/components.json timeout=300 dump-logs" \
    > "handshake_buffered.mlir"
lucas-rami commented 8 months ago

Thanks for the contribution! I haven't had the time to look at it beyond a very far away glance (and will most likely not have time before the beginning of March unfortunately, having important deadlines on my side), but I already have a couple comments.

For reference, all of these recommendations are in our contribution guidelines.

dapfister313 commented 5 months ago

I'm not entirely sure, but I think, I resolved the conflicts.