From a258b803e9c47790e702eb84336a2418c00a3ae6 Mon Sep 17 00:00:00 2001 From: aziz bahri <azizb@amd.com> Date: Fri, 26 Aug 2022 10:49:41 +0100 Subject: [PATCH] VVAU: add weightstream width helper Signed-off-by: aziz bahri <azizb@amd.com> --- src/finn/custom_op/fpgadataflow/vectorvectoractivation.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/finn/custom_op/fpgadataflow/vectorvectoractivation.py b/src/finn/custom_op/fpgadataflow/vectorvectoractivation.py index 77fed5e3a..b0c05d1ad 100644 --- a/src/finn/custom_op/fpgadataflow/vectorvectoractivation.py +++ b/src/finn/custom_op/fpgadataflow/vectorvectoractivation.py @@ -1225,6 +1225,12 @@ class VectorVectorActivation(HLSCustomOp): else: return 0 + def get_weightstream_width_padded(self): + """Returns weight stream width padded to a multiple of 8. This is required + by the AXI Stream spec. Used in decoupled mode.""" + weight_width = self.get_weightstream_width() + return roundup_to_integer_multiple(weight_width, 8) + def get_op_and_param_counts(self): k_h, k_w = self.get_nodeattr("Kernel") fm = self.get_nodeattr("Channels") -- GitLab