finn
finn copied to clipboard
StreamingEltwise layer
Dependencies: https://github.com/Xilinx/finn-hlslib/pull/109
This PR introduces a new HLSCustomOp called StreamingEltwise, which corresponds to the proposed finn-hlslib component with the same name. This layer is intended to generalize parameter-less, elementwise operations on two tensors of identical shape, where each operation yields an element of the output tensor.
- New
StreamingEltwiselayer- Possible to configure which elementwise function is applied via an attribute (similar to
Pool_batch). Currently supports["Sub", "AbsDiff", "Add"]. The Add case is not used by the HLS conversion transformation since this is covered by `AddStreams_Batch . - Inputs can have different bitwidths (unlike
AddStreams_Batch) - Parallelism can be configured (along channels) via the
PEattribute.
- Possible to configure which elementwise function is applied via an attribute (similar to
- New
convert_to_hls.InferStreamingEltwisetransformation for matching corresponding ONNX nodes/patterns and converting toStreamingEltwise - Unit tests including HLS conversion, cppsim and rtlsim execution.