From 6f8040cf636afd1f81b97f84daf37659f47dcb59 Mon Sep 17 00:00:00 2001 From: Yaman Umuroglu <yamanu@xilinx.com> Date: Fri, 17 Dec 2021 23:01:30 +0100 Subject: [PATCH] [ChannelwiseOp] promote all dtypes to odt for correct add operation --- src/finn/custom_op/fpgadataflow/channelwise_op_batch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/finn/custom_op/fpgadataflow/channelwise_op_batch.py b/src/finn/custom_op/fpgadataflow/channelwise_op_batch.py index 302a729a9..f6c562454 100644 --- a/src/finn/custom_op/fpgadataflow/channelwise_op_batch.py +++ b/src/finn/custom_op/fpgadataflow/channelwise_op_batch.py @@ -354,9 +354,9 @@ class ChannelwiseOp_Batch(HLSCustomOp): elif func == "cmp_ge": func_str = "comp::greater_equal<%s, %s>" % (idt_hls, pdt_hls) elif func == "add": - func_str = "comp::add<%s, %s, %s>" % (idt_hls, pdt_hls, odt_hls) + func_str = "comp::add<%s, %s, %s>" % (odt_hls, odt_hls, odt_hls) elif func == "mul": - func_str = "comp::mul<%s, %s, %s>" % (idt_hls, pdt_hls, odt_hls) + func_str = "comp::mul<%s, %s, %s>" % (odt_hls, odt_hls, odt_hls) else: raise Exception( """Invalid value for attribute Func! Is currently set to: {} -- GitLab