finn icon indicating copy to clipboard operation
finn copied to clipboard

StreamingEltwise layer

Open maltanar opened this issue 3 years ago • 0 comments

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 StreamingEltwise layer
    • 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 PE attribute.
  • New convert_to_hls.InferStreamingEltwise transformation for matching corresponding ONNX nodes/patterns and converting to StreamingEltwise
  • Unit tests including HLS conversion, cppsim and rtlsim execution.

maltanar avatar Jul 21 '22 20:07 maltanar